chore(deps): bump ruint to 1.20.0 for RUSTSEC-2026-0220 - #191
Merged
Conversation
`cargo audit` fails on RUSTSEC-2026-0220, "Uint shift operations: incorrect overflow flags and truncated shift amounts", against `ruint` 1.19.0. The advisory prescribes upgrading to 1.20.0, which is what this does. `ruint` provides fixed-width unsigned integers with const-generic bit lengths, the crate behind types such as `U256`. Nothing here depends on it directly: it arrives through the Ethereum stack, where 256-bit arithmetic underpins EVM word operations, RLP encoding and trie node maths. The path is `ruint` through `nybbles`, `alloy-trie` and the rest of `alloy` into `evmlib`. The flaw is worth more than a red check. Incorrect overflow flags mean a shift can report that it did not overflow when it did, and truncated shift amounts mean an operation can silently use the wrong one. Those produce wrong values rather than a crash, on a dependency path that carries payment arithmetic. Which alloy code paths reach the affected operations has not been traced, so this is an upgrade on the advisory's say-so rather than on a demonstrated exploit. The change is confined to the lockfile; no manifest or source file is touched. The removed entries are `windows-*` crates that 1.20.0 no longer pulls in. Verified on this branch: `cargo audit` reports no vulnerabilities, leaving only the seven warnings already allowed; the workspace builds; and the library test suite passes in full.
dirvine
approved these changes
Aug 4, 2026
dirvine
left a comment
Collaborator
There was a problem hiding this comment.
Approved on head f7d49527bcb3a29232b45bea7a4a2e4fc1e1a600.
Verified:
- lockfile-only
ruint1.19.0 → 1.20.0 update maps exactly to the patched version for RUSTSEC-2026-0220; - the lockfile reproduces from
mainwithcargo update -p ruint --precise 1.20.0; cargo audit: zero vulnerabilities (seven pre-existing allowed warnings);- local
cargo test --lib --locked --no-fail-fast: 768 passed, 0 failed; - all three OS build jobs, unit-test steps, clippy, format, docs, audit, and policy checks pass;
- independent review panel found no material blockers.
The three OS e2e steps are still running, so merge should remain gated on their completion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear issue
Risk tier
Proposed rather than asserted, because the boundary question is genuinely arguable here. Nothing in this change alters node behaviour, the wire protocol, stored formats, economics or the upgrade mechanism, which is what T1 asks. The counter-argument is that the bug being fixed is in arithmetic on the payment dependency path, so if the affected operations are reachable, the corrected behaviour is itself a behaviour change. I have not traced reachability. If a reviewer thinks that warrants T2, I have no objection.
Compatibility
Semver impact
Test evidence
cargo audit: no vulnerabilities. Before this change it reported one; after it, only the seven warnings already allowed onmain.cargo build: clean.cargo test --lib: 768 passed, 0 failed.Run on this branch, which is a single commit on top of
mainatc8f0ce1.New dependency
None. This is a version bump of an existing transitive dependency,
ruint1.19.0 to 1.20.0. The removed lockfile entries arewindows-*crates that 1.20.0 no longer pulls in.ADR
n/a — Tier 1.
Mitigation / rollback
Revert the commit. It touches nothing but
Cargo.lock, so there is no migration and no stored-data or wire implication either way.What this is
cargo auditfails on RUSTSEC-2026-0220, "Uint shift operations: incorrect overflow flags and truncated shift amounts", againstruint1.19.0. The advisory prescribes upgrading to 1.20.0, which is what this does.ruintprovides fixed-width unsigned integers with const-generic bit lengths — the crate behind types such asU256. Nothing in this repository depends on it directly. It arrives through the Ethereum stack, where 256-bit arithmetic underpins EVM word operations, RLP encoding and trie node maths:Why it is worth more than a green check
Incorrect overflow flags mean a shift can report that it did not overflow when it did, and truncated shift amounts mean an operation can silently use the wrong one. Both produce wrong values rather than a crash, on a dependency path that carries payment arithmetic.
Stated honestly: which
alloycode paths reach the affected operations has not been traced, so this is an upgrade on the advisory's say-so rather than on a demonstrated exploit. That seemed like the right way round for a one-line lockfile change.Why this is its own PR
mainpins the vulnerable version, so this reddens the Security Audit check onmainand on every open PR the moment their CI re-runs. It is nobody's individual change to carry, and folding it into a feature branch would put an unrelated dependency change inside that branch's review. Landing it here fixes the check for everyone at once, and open branches pick it up on their next rebase.