Skip to content

Upgrading rustls 0.22 to 0.23

Breaking0.22.4 → 0.23.46Breaking11Security13Platform5New93Changed133Fixed85Other311

BreakingUpgrade verdict

11 breaking changes and 5 platform requirement changes and 13 security fixes.

  • Removes the ClientHello constructor from the server API.
  • If you build rustls without the standard library support, the function that installs the default crypto provider now returns a different type than before.
  • Removes the `default_fips_provider()` item when aws_lc_rs is not enabled.
  • Renames SignatureScheme::sign.
Top 5 of 29 that need code or config changes

Rust requirement changed in 0.23.20: 1.61 → 1.71.

Breaking11
Removes the ClientHello constructor from the server API.
ClientHello
Corrects the return type of CryptoProvider::install_default() so it no longer varies with the std crate feature, a breaking API change for no_std users.
CryptoProvider::install_default()
Removes the default_fips_provider() item when aws_lc_rs is not enabled.
default_fips_provider()
Renames SignatureScheme::sign.
SignatureScheme::sign
Breaking change: CipherSuiteCommon::integrity_limit field removed (this was QUIC-specific, it has moved to quic::PacketKey::integrity_limit()).
CipherSuiteCommon::integrity_limitquic::PacketKey::integrity_limit()
Breaking change: crypto::cipher::BorrowedPlainMessage and crypto::cipher::OpaqueMessage have been renamed (to OutboundPlainMessage and OutboundOpaqueMessage) and altered to support performance…
crypto::cipher::BorrowedPlainMessagecrypto::cipher::OpaqueMessageOutboundPlainMessageOutboundOpaqueMessage
Breaking change: all protocol enum types (eg. [CipherSuite]) have had their get_u8/get_u16 accessor removed; use u8::from() / u16::from() instead.
CipherSuiteget_u8get_u16u8::from()u16::from()
Remove the TLS 1.2 session ticket on DecryptError.
Remove work-around for loading SEC1-format ECDSA keys.
Moves post-quantum key exchange from kyber768 to ML-KEM768.
kyber768ML-KEM768
Acceptor API error handling improvement.
AcceptorErr()Acceptor::acceptAccepted::into_connection
Security13
Fixes GHSA-h2v8-394m-p7vv: built-in Brotli certificate decompression can allocate up to 1 GiB of attacker-controlled memory before authentication.
Low · CVSS 3.7
Fixes GHSA-c8m5-c952-6cm4: Debug impls for Tls12ClientSessionValue and Tls13ClientSessionValue include secret data.
Tls12ClientSessionValueTls13ClientSessionValueDebugMedium · CVSS 4.0
Fixes GHSA-w44r-93j7-qv28: an unauthenticated ServerHello poisons per-name key-exchange hints so later ClientHellos carry only a classical X25519 share.
X25519Low · CVSS 3.7
Fixes GHSA-vp88-798v-h67f: in 0.23.44 and 0.23.45, buffered application data is sent even when the server rejects ECH.
ECHLow · CVSS 2.3
Fixes TLS 1.3 handshake messages being accepted at the wrong encryption level after a key-changing message in the same record.
Medium · CVSS 5.3
Affected versions are rustls 0.23.13 through 0.23.44 inclusive; upgrade to 0.23.45 or later.
Restricts files created by the built-in KeyLogFile implementation to owner-only read permissions.
KeyLogFile
Does not retain master secret during terminal key schedule state.
StoresServerSessions now guarantees keys are high entropy.
StoresServerSessions
Ensures only max_early_data_size bytes of early data are accepted when read while being received.
max_early_data_size
Tightens up ticketer decryption.
rustls::ConnectionCommon::complete_io could fall into an infinite loop based on network input
High · CVSS 7.5
rustls network-reachable panic in Acceptor::accept
Platform5
Keeps MSRV at 1.71 but recommends Rust 1.73 or later due to a compiler bug in 1.71.
Relaxes the MSRV back to 1.63 for this one-off release, which contains the RUSTSEC-2024-0399 fix.
Notes that this is a one-off: no future releases will have MSRV 1.63, and 0.23.20 returns to MSRV 1.71.
Moves the crate minimum supported Rust version to 1.71.
Raises the minimum supported Rust version (MSRV) from 1.61 to 1.63.