Skip to content

Security: fix rustls-webpki cert-verification advisories (upstream #419) - #1

Closed
MattJackson wants to merge 4 commits into
mainfrom
fix/rustls-security-419
Closed

Security: fix rustls-webpki cert-verification advisories (upstream #419)#1
MattJackson wants to merge 4 commits into
mainfrom
fix/rustls-security-419

Conversation

@MattJackson

Copy link
Copy Markdown
Owner

Rebranch of upstream tiberius-rs/tiberius#419 (author @jakewimmer) into the fork.

What this fixes

Bumps tokio-rustls 0.24 → 0.26 (pulling rustls-webpki 0.101.7 → 0.103.15) and updates the rustls TLS stream code accordingly.

Clears the following advisories that currently make cargo audit fail on main (upstream issues #428 / #417):

  • RUSTSEC-2026-0098 — rustls-webpki: name constraints for URI names incorrectly accepted
  • RUSTSEC-2026-0099 — rustls-webpki: name constraints accepted for wildcard certs
  • RUSTSEC-2026-0104 — rustls-webpki: reachable panic in CRL parsing
  • RUSTSEC-2026-0258 — h2 unbounded empty DATA frames

Validation (local)

  • cargo build (default features): green
  • cargo build --no-default-features --features rustls,tds73,winauth: green
  • cargo audit: 5 → 1 remaining (rkyv via the optional rust_decimal feature only; not in default build — tracked as a follow-up dep bump)

Closes #428, #417.

Upgrade tokio-rustls to 0.26, rustls to 0.23, and rustls-native-certs to
0.8 to resolve RUSTSEC-2024-0421 and RUSTSEC-2025-0010.

Migrate the TLS stream to the rustls 0.23 API. Switch the crypto provider
to aws-lc-rs via builder_with_provider to avoid the dual-provider conflict
that tokio-rustls 0.26 introduces when ring is also in the dependency graph.

Pin to TLS 1.2 to prevent TLS 1.3 KeyUpdate messages from triggering
UnexpectedEof on the macOS CI runner.
azure_core 0.20.0 switched from reqwest 0.11 to reqwest 0.12, which
pulls in rustls 0.23 and rustls-webpki 0.103.13. Bumping azure_identity
to 0.20.0 closes RUSTSEC-2026-0098, 0099, and 0104 in the dev build
without any changes to the production stack.

client_credentials_flow::perform now takes &str for the client secret.
Updated aad-auth.rs to pass raw env var strings and dropped the oauth2
ClientId/ClientSecret wrappers. Also bump reqwest 0.11 -> 0.12 and
oauth2 4.2.3 -> 5.0 in dev-dependencies to match.

Remove .cargo/audit.toml - the suppressions are no longer needed.
Migrate the macOS runner to macos-26-intel and add docker/setup-docker-action
so Docker is available for SQL Server. Replace all manual cargo cache steps
with Swatinem/rust-cache and add a sanitization step that replaces commas
with + to keep matrix variants isolated.
Two tests written before #[test_on_runtimes] existed and never updated.

cyrillic_collations_should_work previously created a dedicated database with
a Cyrillic default collation, requiring an admin connection and DROP DATABASE
at teardown. The DROP raced against open connections on macOS/rustls CI,
causing flaky failures. Replace with a session-local temp table using
column-level COLLATE clauses. The code path under test (COLMETADATA collation
-> encoding_rs decode) is identical.

application_name_should_be_set_correctly needed the application name set
before connecting. Add APP_NAME_CONN_STR embedding it in the connection
string so the macro-generated harness connects with it set.
@MattJackson
MattJackson deleted the fix/rustls-security-419 branch August 29, 2026 17:52
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.

Blocker: unfixed certificate-verification advisories (RUSTSEC-2026-0098, -0099, -0104)

2 participants