Skip to content

deps: Update chacha20 from the yanked 0.10.0 to 0.10.2 - #578

Merged
Niqnil merged 1 commit into
developfrom
deps/chacha20-0.10.2
Oct 10, 2026
Merged

Niqnil merged 1 commit into
developfrom
deps/chacha20-0.10.2

Conversation

@Niqnil

@Niqnil Niqnil commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Why

cargo audit warns that chacha20 0.10.0 in Cargo.lock is yanked. 0.10.0 and 0.10.1 were yanked because their SSE2 backend, used by the RNG and the 64-bit-counter variants, called an SSE4.1 intrinsic (_mm_extract_epi32). That is undefined behaviour on an x86 CPU without SSE4.1. 0.10.2 (RustCrypto/stream-ciphers#580) stores the counter row with a plain SSE2 store instead.

chacha20 reaches the workspace only through rand 0.10.3, which is used by rustrade-execution and by tungstenite, in turn used by rustrade-integration. The practical risk is low, since every x86 CPU since about 2008 has SSE4.1 and modern ones take the AVX2 path. Still, a yanked crate shouldn't stay in the lockfile.

Change

  • cargo update -p chacha20 --precise 0.10.2. Cargo.lock changes by this one package (version and checksum), and its dependency list is unchanged.
  • No Cargo.toml change: chacha20 is not a direct dependency.
  • No CHANGELOG entry, since the lockfile doesn't reach library users. A fresh resolve already skips yanked versions.

Supply-chain screen

  • Downloaded both .crate files. Their SHA-256 sums match the old and new Cargo.lock checksums.
  • Diffed src/ from 0.10.0 to 0.10.2:
    • the SSE2 fix;
    • an aarch64 NEON backend widened to 8-block batches;
    • crate-level docs moved to the README;
    • re-export reshuffles: Key and KeyIvInit are now re-exported at the crate root, and ChaCha20LegacyCore and Nonce are added;
    • a doc-comment fix and a constant naming in rng.rs.
  • No build.rs, no proc-macro, no network, process or env access, and no new dependencies. Not a tier-2 crate.

Verification

  • cargo test --workspace --all-features --lib --tests: 2836 passed.
  • The pre-commit clippy shows only the expected existing warning, and both rustdoc passes are clean.
  • Local cargo audit no longer reports the yanked crate. The remaining advisories are the ones already ignored in ci.yml and deny.toml.

chacha20 0.10.0 and 0.10.1 are yanked: their SSE2 backend for the RNG
and the 64-bit-counter variants used an SSE4.1 intrinsic, which is
undefined on an x86 CPU without SSE4.1. 0.10.2 stores the counter row
with plain SSE2 instead.

It reaches the workspace only through rand 0.10.3. Cargo.lock changes
by this one package; its dependencies are unchanged.
@Niqnil
Niqnil merged commit 61aa835 into develop Oct 10, 2026
11 checks passed
@Niqnil
Niqnil deleted the deps/chacha20-0.10.2 branch October 10, 2026 01:30
This was referenced Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant