Skip to content

fix(deps): bump rust_decimal to drop the vulnerable rkyv 0.7 transitive dep - #778

Open
SafraNako wants to merge 2 commits into
dfinity:mainfrom
SafraNako:fix/rkyv-oob-read-advisory
Open

SafraNako wants to merge 2 commits into
dfinity:mainfrom
SafraNako:fix/rkyv-oob-read-advisory

Conversation

@SafraNako

Copy link
Copy Markdown

What

Cargo.lock carried rkyv 0.7.46 (via byte-unitrust_decimal
rkyv), flagged by RUSTSEC-2026-0235: insufficient archive validation can cause out-of-bounds
reads in archives containing Rc/Arc.

rust_decimal 1.42.1 pinned rkyv = "^0.7.46" exactly, so rkyv couldn't
be bumped on its own (cargo update -p rkyv fails to resolve). rust_decimal 1.43.0 moved to rkyv ^0.8.13 (well past the 0.8.17 fix) and, in this
workspace, doesn't pull rkyv in as a dependency at all anymore —
cargo update -p rust_decimal --precise 1.43.0 removes rkyv, bytecheck,
ptr_meta, and their supporting crates from the lockfile entirely.
byte-unit's ^1 requirement on rust_decimal already allows 1.43.0, so
this is a lockfile-only change.

Verified locally

cargo test --workspace --lib --bins55 tests passed, 0 failed.
(Also had to install the wasm32-unknown-unknown target this workspace's
build.rs needs for a canister crate — unrelated to this fix, just missing
in my environment.)

🤖 Generated with Claude Code

…ve dep

Cargo.lock carried rkyv 0.7.46 (via byte-unit -> rust_decimal -> rkyv),
flagged by RUSTSEC-2026-0235: insufficient archive validation can cause
out-of-bounds reads in archives containing Rc/Arc.

rust_decimal 1.42.1 pinned `rkyv = "^0.7.46"` exactly, so rkyv couldn't be
bumped on its own. rust_decimal 1.43.0 moved to `rkyv ^0.8.13` (well past
the 0.8.17 fix) and, in this workspace, doesn't pull rkyv in as a
dependency at all anymore -- `cargo update -p rust_decimal --precise
1.43.0` removes rkyv, bytecheck, ptr_meta and their supporting crates from
the lockfile entirely. `byte-unit`'s `^1` requirement on rust_decimal
already allows 1.43.0, so this is a lockfile-only change.

Verified locally: `cargo test --workspace --lib --bins` passes (55 tests),
after also installing the `wasm32-unknown-unknown` target this workspace's
build.rs needs for a canister crate (unrelated to this fix, just missing
in my environment).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@SafraNako
SafraNako requested a review from a team as a code owner September 11, 2026 22:31
Copilot AI balanced review requested due to automatic review settings September 11, 2026 22:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@SafraNako

Copy link
Copy Markdown
Author

Hi, checking in on this one. The fix removes a vulnerable rkyv 0.7 dependency (out of bounds read) by bumping rust_decimal instead of touching rkyv directly, since that pulled rkyv out of the graph entirely. I ran the full workspace test suite locally and 55 tests passed. It has been quiet for about a week, so wanted to see if you had a chance to look at it yet, or if there is anything I should change. Thanks in advance.

lwshang
lwshang previously approved these changes Sep 18, 2026
@lwshang
lwshang enabled auto-merge (squash) September 18, 2026 07:33
@marc0olo
marc0olo disabled auto-merge September 18, 2026 07:34
@lwshang
lwshang dismissed their stale review September 18, 2026 07:37

just dismiss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants