Skip to content

fix(deps): update tokio, webpki-roots and ctutils for three RustSec advisories - #1088

Merged
amrith merged 1 commit into
mainfrom
fix/deps-rustsec-1117
Nov 17, 2026
Merged

amrith merged 1 commit into
mainfrom
fix/deps-rustsec-1117

Conversation

@LeeroyHannigan

@LeeroyHannigan LeeroyHannigan commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

What

Cargo.lock and tests/rust/Cargo.lock move three crates to the first version that fixes a RustSec advisory:

Crate From To Advisory
tokio 1.52.3 1.53.3 RUSTSEC-2026-0386: the safe AsyncFd constructors violate I/O safety
webpki-roots 1.0.7 1.0.10 RUSTSEC-2026-0381: the bundled roots allow trust in distrusted emSign intermediates
ctutils 0.4.2 0.4.4 RUSTSEC-2026-0385: mask generation and u128 comparisons are not constant time

Each update is cargo update -p <crate> --precise <version>, with -p webpki-roots@1.0.7 in Cargo.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:

  • tokio: every crate. No ExtendDB code calls the AsyncFd constructors that 1.53.3 deprecates.
  • webpki-roots: the MongoDB driver (mongodb 3.8.0), and sqlx for PostgreSQL through webpki-roots 0.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 when sslmode is verify-ca or verify-full. With prefer or require, sqlx accepts any certificate.
  • ctutils: only the MongoDB driver, through digest 0.11.3 and the hmac, md-5, pbkdf2, sha1 and sha2 crates.

In tests/rust, aws-sigv4 reaches ctutils through hmac and sha2, and hyper-rustls and reqwest use webpki-roots.

Besides the emSign root, webpki-roots 1.0.10 differs from 1.0.7 in six roots:

  • removed: Atos TrustedRoot 2011 and SecureSign Root CA12
  • added: SECOM TLS ECC Root CA 2024 and SECOM TLS RSA Root CA 2024
  • added: Telia EC TLS Root CA v3 and Telia RSA TLS Root CA v3

The tokio changes from 1.52.4 to 1.53.3 include fixes in the timer, mpsc, semaphore, JoinSet and blocking pool code that ExtendDB uses. One change affects tests: on a current_thread runtime 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-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.

Why

cargo deny --locked check advisories on main 381c8c7 reports the three advisories in both lock files. The run used cargo-deny 0.20.2, no deny.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 in tests/rust.
  • cargo +1.97.0 fmt --all -- --check: pass.
  • Both clippy commands in clippy.yml, on 1.97.0 with --locked and -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 five backup_store tests in extenddb-server and two backup_catalog::write_lock_tests in extenddb-storage-sqlite, and main fails the same 7 here.
  • In an earlier run of the same command, extenddb-cache's concurrent_stale_hits_spawn_only_one_refresh failed 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-run in tests/rust: pass.
  • The four licence notice checks of licenses.yml: pass.
  • A SQLite server built with 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 and test_query_scan.py. 3,879 passed, 3 skipped, 9 xfailed.
  • git merge-tree with the head of chore(release): bump version to 0.1.15 and freeze migrations 1-12 #1069, the release pull request, which also changes Cargo.lock and the notices files: no conflict.

Checklist

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace)
  • Code is formatted (cargo fmt --check)
  • Clippy is clean (cargo clippy -- -W clippy::pedantic)
  • I have added or updated tests for new functionality
  • I have updated documentation if behavior changed
  • Breaking changes are noted below (if any)
  • If this changes the wire protocol, Storage trait, auth model, on-disk
    format, 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 sslmode verify-ca or verify-full. Naming that root as MongoDB's CA file or PostgreSQL's root certificate restores trust. Under prefer or require, 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.

…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.
@navareamol navareamol self-assigned this Nov 17, 2026

@amrith amrith left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. thanks @LeeroyHannigan

@amrith
amrith added this pull request to the merge queue Nov 17, 2026

@eliseong eliseong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Merged via the queue into main with commit 001e8c5 Nov 17, 2026
64 checks passed
@amrith
amrith deleted the fix/deps-rustsec-1117 branch November 17, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants