Advisory

RUSTSEC-2026-0413

Also known as: GHSA-rc3f-4j82-cmrg

Summary

Use-after-free of caller-owned server name in client connection constructors

Details

In rustls-ffi 0.12.0 through 0.15.6, rustls_client_connection_new() and
rustls_client_connection_new_alpn() retained a reference to the caller's
server_name buffer after returning, rather than copying it. The API
documentation did not require the buffer to outlive the call and as a result
if the caller freed or reused the buffer, later TLS processing read freed
memory.

Clients that free or reuse the server_name buffer after the constructor
returns are affected. This is most likely for language bindings that pass
temporary strings. Callers that keep the server_name buffer alive for the
lifetime of the rustls_client_config are not affected.

Versions 0.12.0 through 0.15.6 are affected. Version 0.15.7+ changed these APIs
to copy the input buffer.

Severity

Not rated by the source.

Dates

Published
2026-10-26 12:00 UTC
Modified
2026-10-27 10:15 UTC

Affected packages and fixes

rustls-ffi

crates.io · All systems

Affected

  • introduced 0.12.0, fixed 0.15.7 (semver)

Fixed versions

0.15.7

Fix

  • Fixed version 0.15.7
    cargo update -p rustls-ffi --precise 0.15.7

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences