Repository navigation
fix(deps): update tokio, webpki-roots and ctutils for three RustSec advisories - #1088
Conversation
…dvisories cargo deny check advisories on main 381c8c7, with the RustSec advisory database of 2026-11-17, reports three advisories that a lock update can fix: - RUSTSEC-2026-0386, tokio 1.52.3: the safe AsyncFd constructors violate I/O safety. Fixed in 1.53.3. - RUSTSEC-2026-0381, webpki-roots 1.0.7: the bundled roots allow trust in distrusted emSign intermediates. Fixed in 1.0.10, which removes the emSign ECC Root CA - G3 root. - RUSTSEC-2026-0385, ctutils 0.4.2: mask generation and u128 comparisons are not constant time. Fixed in 0.4.4. The MongoDB driver reaches it through its digest crates, and in tests/rust aws-sigv4 reaches it through hmac and sha2. Cargo.lock and tests/rust/Cargo.lock move each crate to its first fixed version with cargo update --precise. Each of the three declares a minimum Rust version at or below 1.91.1. No ExtendDB code calls the AsyncFd constructors that tokio 1.53.3 deprecates. Moving webpki-roots from 1.0.7 to 1.0.10 also removes the Atos TrustedRoot 2011 and SecureSign Root CA12 roots. It adds the SECOM TLS ECC and RSA Root CA 2024 roots and the Telia EC and RSA TLS Root CA v3 roots. The MongoDB driver verifies a server against this list when its configuration names no CA file. sqlx verifies a PostgreSQL server against this list and the configured root certificate when sslmode is verify-ca or verify-full. With sslmode prefer or require, sqlx accepts any certificate. The update also moves Windows-only windows-sys edges, within the range each crate accepts. In Cargo.lock, errno, rustix and tempfile point at 0.52.0 instead of 0.61.2. In tests/rust/Cargo.lock, errno and socket2 point at 0.61.2 instead of 0.52.0 and 0.60.2. Each lock already held the versions it now points at. The four licence notices files list the new versions.
dc0e699 to
4a074ba
Compare
amrith
left a comment
There was a problem hiding this comment.
Looks good. thanks @LeeroyHannigan
eliseong
left a comment
There was a problem hiding this comment.
LGTM
I built the branch and checked the advisory fix. cargo deny --locked check advisories reports none of RUSTSEC-2026-0386, RUSTSEC-2026-0381 or RUSTSEC-2026-0385 at this head, in the root workspace or in tests/rust, and all three at the base. Only tokio, webpki-roots and ctutils change version in each lock file. No other crate moves, and no vulnerable copy is left: the webpki-roots 0.26.11 entry re-exports the 1.0.10 roots.
The build holds on the MSRV 1.91.1, and the four license notices match the new versions. The 53 tests that pause time pass under tokio 1.53.3, which is the one behavior change in that bump. No ExtendDB code uses the AsyncFd constructors the advisory names.
The breaking-change note is accurate. webpki-roots 1.0.10 drops emSign ECC Root CA - G3, Atos TrustedRoot 2011 and SecureSign Root CA12, and adds the four roots the note lists. That list reaches only the MongoDB driver and the PostgreSQL path through sqlx, not the server's own TLS listener, so it changes which servers ExtendDB trusts as a client, and not which clients it accepts.
One optional wording point: for MongoDB, a CA file replaces the bundled roots rather than adding to them, so the suggested fix makes that connection trust only the named root.
What
Cargo.lockandtests/rust/Cargo.lockmove three crates to the first version that fixes a RustSec advisory:AsyncFdconstructors violate I/O safetyu128comparisons are not constant timeEach update is
cargo update -p <crate> --precise <version>, with-p webpki-roots@1.0.7inCargo.lock, which also holds 0.26.11. No other crate changes version. Each of the three declares a minimum Rust version at or below 1.91.1. The four licence notices files list the new versions.The crates that use them:
AsyncFdconstructors that 1.53.3 deprecates.mongodb3.8.0), and sqlx for PostgreSQL throughwebpki-roots0.26.11, which takes its roots from 1.0.10. The MongoDB driver verifies a server against this list when its configuration names no CA file. sqlx verifies a PostgreSQL server against this list and the configured root certificate whensslmodeisverify-caorverify-full. Withpreferorrequire, sqlx accepts any certificate.digest0.11.3 and thehmac,md-5,pbkdf2,sha1andsha2crates.In
tests/rust,aws-sigv4reaches ctutils throughhmacandsha2, andhyper-rustlsandreqwestuse webpki-roots.Besides the emSign root, webpki-roots 1.0.10 differs from 1.0.7 in six roots:
The tokio changes from 1.52.4 to 1.53.3 include fixes in the timer, mpsc, semaphore,
JoinSetand blocking pool code that ExtendDB uses. One change affects tests: on acurrent_threadruntime with paused time, an I/O wake no longer advances the clock (tokio #8595). The ExtendDB tests that pause time pass.The update also moves Windows-only
windows-sysedges, within the range each crate accepts. InCargo.lock,errno,rustixandtempfilepoint at 0.52.0 instead of 0.61.2. Intests/rust/Cargo.lock,errnoandsocket2point at 0.61.2 instead of 0.52.0 and 0.60.2. Each lock already held the versions it now points at.Why
cargo deny --locked check advisorieson main 381c8c7 reports the three advisories in both lock files. The run used cargo-deny 0.20.2, nodeny.toml, and the RustSec advisory database at commit 233155b of 2026-11-17. Dependabot has no alert for any of the three. #1084 proposes a CI check for these advisories.No issue.
Testing done
These results are for e766f46e1 on main 381c8c7. The head of this pull request, 4a074ba, is the same change on main 85c5843, with a reworded commit message. #999, the one commit between them, changes no lock, manifest or notices file.
cargo deny --locked check advisories: RUSTSEC-2026-0386, RUSTSEC-2026-0381 and RUSTSEC-2026-0385 no longer appear, in the root workspace or intests/rust.cargo +1.97.0 fmt --all -- --check: pass.clippy.yml, on 1.97.0 with--lockedand-D warnings: pass.cargo +1.91.1 check --locked --workspace --all-targets: pass.cargo +1.97.0 test --locked --workspace --exclude extenddb-backup-store --lib --no-fail-fast: 4,182 passed, 85 ignored, 7 failed. The 7 need a temporary directory whose ancestors belong to root or to the test user, and this host has none. They are fivebackup_storetests inextenddb-serverand twobackup_catalog::write_lock_testsinextenddb-storage-sqlite, and main fails the same 7 here.extenddb-cache'sconcurrent_stale_hits_spawn_only_one_refreshfailed once, on a host with a load average of 50 to 60. Its assertion counts skipped refreshes, which depends on the order in which the runtime runs the tasks. It then passed 40 of 40 runs alone and 30 of 30 runs of the whole cache test binary, at this commit and at main.cargo +stable test --locked --no-runintests/rust: pass.licenses.yml: pass.cargo build --locked -p extenddb --no-default-features --features sqlite, on 127.0.0.1. 67 of the 151 test files ran: the PartiQL, transaction, validation, expression, authorization, streams and TTL files andtest_query_scan.py. 3,879 passed, 3 skipped, 9 xfailed.git merge-treewith the head of chore(release): bump version to 0.1.15 and freeze migrations 1-12 #1069, the release pull request, which also changesCargo.lockand the notices files: no conflict.Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
ADR / RFC: n/a
Breaking changes
Two setups stop trusting a server whose chain ends at Atos TrustedRoot 2011, SecureSign Root CA12 or emSign ECC Root CA - G3. These are MongoDB lacking a CA file, and PostgreSQL under
sslmodeverify-caorverify-full. Naming that root as MongoDB's CA file or PostgreSQL's root certificate restores trust. Underpreferorrequire, nothing changes, since sqlx then accepts any certificate.By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.