Skip to content

fix(deps): opensrv-mysql → aws-lc-rs fork on rustls ≥0.23.45 (RUSTSEC-2026-0285) - #42

Merged
luthermonson merged 1 commit into
mainfrom
fix/rustls-2026-0285
Oct 5, 2026
Merged

luthermonson merged 1 commit into
mainfrom
fix/rustls-2026-0285

Conversation

@luthermonson

Copy link
Copy Markdown
Contributor

DO NOT MERGE without review — prepared for human review, coordinate ordering with #41.

What

Fixes RUSTSEC-2026-0285 (rustls < 0.23.45 accepts TLS 1.3 handshake messages at the wrong encryption level; LOW — conformance bug, transcript stays authenticated) in litewire's dependency graph.

The only affected copy is rustls 0.22.4, pulled by opensrv-mysql 0.7.0 (crates.io latest) → tokio-rustls 0.25. There is no fixed opensrv-mysql on crates.io. This PR redirects opensrv-mysql at an ePHPm-org fork of 0.7.0 whose sole change is tokio-rustls 0.25 → 0.26 (rustls ≥ 0.23.45), pinned to the aws-lc-rs provider (never ring).

  • Fork: https://github.com/ephpm/opensrv-mysql (rev 42efd44), [patch.crates-io] in Cargo.toml.
  • Drops rustls 0.22.4, tokio-rustls 0.25.0, rustls-webpki 0.102.8; bumps the existing rustls 0.23 line to 0.23.45.
  • deny.toml: removes the now-unused RUSTSEC-2026-0049 webpki ignore (the 0.102.8 copy is gone; 0098/0099/0104 stay — still matched by the tiberius 0.101.7 dev-dep), and allows the fork git source.

Invariants preserved

  • opensrv-mysql tls auth feature (Guard the opensrv-mysql tls feature — default-features = false would expose the CLIENT_SSL no-username path #32): the fork changes only Cargo.toml; src/** (the tls feature, secure_run_with_options, and the init_after_ssl re-parse that makes CLIENT_SSL auth work) is byte-for-byte upstream 0.7.0. The compile-time fence in litewire-mysql/src/lib.rs still holds — verified by cargo check -p litewire-mysql against the fork.
  • No ring: the fork pins aws-lc-rs; cargo tree -e no-dev -i ring is empty in the production graph.
  • MSRV 1.88: rustls 0.23.45 / tokio-rustls 0.26 / aws-lc-rs 1.18 / rustls-webpki 0.103.15 all declare rust-version = 1.71.

Verified

  • cargo deny check advisories sources → advisories ok, sources ok (0285 no longer matches anything).
  • cargo check -p litewire-mysql against the fork → clean (fence holds).
  • cargo tree confirms rustls 0.23.45, no 0.22.x, no ring.

Coordination

Follow-up

Retire the fork/patch when a fixed opensrv-mysql is published to crates.io, or when litewire migrates off opensrv-mysql.

…(RUSTSEC-2026-0285)

opensrv-mysql 0.7.0 (crates.io, latest) pulls tokio-rustls 0.25 -> rustls 0.22,
which is affected by RUSTSEC-2026-0285 (TLS 1.3 handshake messages accepted at
the wrong encryption level; LOW). There is no fixed opensrv-mysql on crates.io.

Redirect opensrv-mysql at the ePHPm fork of 0.7.0
(github.com/ephpm/opensrv-mysql), whose only change is tokio-rustls 0.25 -> 0.26
(rustls >= 0.23.45) pinned to aws-lc-rs (never ring). This drops rustls 0.22.4,
tokio-rustls 0.25.0 and rustls-webpki 0.102.8 from the graph and bumps the
existing rustls 0.23 line to 0.23.45.

The opensrv-mysql tls feature and its auth-load-bearing init_after_ssl re-parse
(#32) are byte-for-byte upstream; the compile-time fence in litewire-mysql still
holds. deny.toml: drop the now-unused RUSTSEC-2026-0049 webpki ignore (the
0.102.8 copy is gone) and allow the fork git source.

Note: a [patch] is honoured only for litewire's own builds; a downstream git
consumer (ePHPm) must declare the same patch in its own root Cargo.toml.
@ephpm

ephpm Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

ePHPm Preview — removed

Preview deployment has been torn down.

@ephpm
ephpm Bot temporarily deployed to preview-pr-42 September 24, 2026 17:34 Inactive
@ephpm
ephpm Bot temporarily deployed to preview-pr-42 September 24, 2026 17:34 Inactive
@ephpm
ephpm Bot temporarily deployed to preview-pr-42 September 24, 2026 17:34 Inactive
@luthermonson
luthermonson marked this pull request as ready for review October 5, 2026 03:54
@luthermonson
luthermonson merged commit 07b13c0 into main Oct 5, 2026
5 checks passed
@luthermonson
luthermonson deleted the fix/rustls-2026-0285 branch October 5, 2026 03:54
luthermonson added a commit to ephpm/ephpm that referenced this pull request Oct 5, 2026
litewire#42 squash-merged; move the rev off the PR branch head (ee6fc127)
onto the merge commit on litewire main. Lock delta is the litewire source
rev only; rustls stays at 0.23.45 with no 0.22.x copy.

This branch was previously deployed

1 inactive deployment
preview-pr-42 — ee6fc127 Deployed Sep 24, 2026 by ephpm[bot]
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