Skip to content

v3.30.9: Replace yanked chacha20 with SSE2 fix - #102

Merged
puretensor merged 1 commit into
mainfrom
audit/chacha20-sse2-fix
Sep 12, 2026
Merged

puretensor merged 1 commit into
mainfrom
audit/chacha20-sse2-fix

Conversation

@puretensor

Copy link
Copy Markdown
Owner

Problem and authoritative evidence

The locked dependency graph includes chacha20 0.10.0 with its RNG feature through rand 0.10.1, used by rmcp and uuid (including r2d2_sqlite's uuid/fast-rng path).

RustCrypto yanked 0.10.0 and 0.10.1 because the SSE2 RNG/legacy backend used an SSE4.1 intrinsic without the required target feature. The smallest fixed compatible release is 0.10.2, with unchanged MSRV 1.85:

This is a conditional correctness/portability problem for generic source builds on x86 lacking SSE4.1. Published ptask x86 release builds require x86-64-v3; aarch64 uses a different backend. No production crash, exploitation, or cryptographic confidentiality failure was demonstrated. Severity is low for the documented release targets, with a meaningful compatibility benefit for generic builds.

Chosen update

Executed cargo update -p chacha20 --precise 0.10.2. Only this external package's version/checksum changes. Parent dependency requirements already permit the patch release; no direct dependency or feature change is added. Workspace/internal requirements, workspace lock entries, and generated manpage version move together to 3.30.9.

Evidence and validation

cargo tree --locked --offline -i chacha20 -e features confirms the active RNG dependency path and the replacement version. The original cargo-deny run reported the yanked crate; the updated check no longer does. Its existing unused BSD-2-Clause allowance warning remains.

We did not locally reproduce the upstream undefined behavior: local tests did not emulate an SSE2-only processor or run Miri. The upstream reproducer/fix and active dependency graph justify this update; passing local tests alone are not evidence that the old implementation was sound.

Validation on Rust 1.98.1, all exit 0:

cargo test --workspace --locked
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo build --workspace --locked
cargo test -p ptask-distill --features native-ml --locked
cargo clippy -p ptask-distill --all-targets --features native-ml --locked -- -D warnings
cargo fmt --all -- --check
cargo deny check advisories licenses sources
bash scripts/ci-version-check.sh
bash scripts/generated-artifacts.sh --check
bash scripts/ci-production-build-check.sh
actionlint
python3 -m unittest discover -s scripts/tests -v
PYTHONPATH=dashboard python3 -m unittest discover -s dashboard/tests -v
node --test dashboard/tests/face_unlock.test.mjs dashboard/tests/face_unlock_markup.test.mjs dashboard/tests/domains_markup.test.mjs
git diff --check
git diff origin/main -- . ':!Cargo.lock' | gitleaks stdin --redact --no-banner --log-level warn

Builds used a dedicated audit target directory and CPU fence; database tests used disposable stores.

The fixed dependency branch passed 406 workspace tests, 49 native-feature tests, 66 dashboard Python tests, 5 script tests, and 35 Node tests. Native-feature counts include existing tests that may return early if model assets are unavailable; no model-loaded coverage is claimed. Native tests overlap workspace tests. Local debug builds were run, not release or cross-target builds.

Compatibility and rollout

No schema, configuration, public API, runtime minimum, deployment or production infrastructure change. Rebuilds consume the fixed lockfile. Keep the existing deployment/merge process; no deployment was performed.

Independent branch from confirmed main at a95a43b36c23b41532ee3fd7976e1185c8e9e204; no dependency on other audit PRs. Version metadata needs reconciliation when landing multiple independent audit branches. Other audit PRs intentionally retain their baseline dependency graph so this maintenance change stays focused.

Remote CI is separate from the executed local checks and must be reviewed before merge. No overlapping open dependency-update PR was found.

@puretensor
puretensor force-pushed the audit/chacha20-sse2-fix branch from 397b45f to e5a0e58 Compare September 12, 2026 10:01
@puretensor
puretensor merged commit ce1e3ab into main Sep 12, 2026
7 checks passed
@puretensor
puretensor deleted the audit/chacha20-sse2-fix branch September 12, 2026 10:56
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