Advisory

RUSTSEC-2026-0478

Also known as: CVE-2026-41898, GHSA-hppc-g8h3-xhp3

Summary

Unchecked callback lengths in PSK and cookie callbacks

Details

The callbacks installed with SslContextBuilder::set_psk_client_callback (and its deprecated alias set_psk_callback), set_psk_server_callback, set_cookie_generate_cb and set_stateless_cookie_generate_cb each fill a &mut [u8] buffer and return how many bytes they wrote. The FFI trampolines handed that returned length straight to OpenSSL without checking it against the size of the buffer.

A callback that returns a length larger than its buffer makes OpenSSL read past the end of the buffer. For the cookie callbacks the cookie is sent to the peer, so adjacent memory can be disclosed over the network.

0.10.78 compares the returned length with the buffer size and treats a larger value as a callback failure.

Severity

Not rated by the source.

Dates

Published
2026-04-19 12:00 UTC
Modified
2026-11-10 14:00 UTC

Affected packages and fixes

openssl

crates.io · All systems

Affected

  • introduced 0.9.24, fixed 0.10.78 (semver)

Fixed versions

0.10.78

Fix

  • Fixed version 0.10.78
    cargo update -p openssl --precise 0.10.78

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