RUSTSEC-2026-0478

Source
https://rustsec.org/advisories/RUSTSEC-2026-0478
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0478.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2026-0478
Aliases
Published
2026-04-19T12:00:00Z
Modified
2026-11-10T14:00:02Z
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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / openssl

Package

Name
openssl
View open source insights on deps.dev
Purl
pkg:cargo/openssl

Affected ranges

Type
SEMVER
Events
Introduced
0.9.24
Fixed
0.10.78

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "arch": [],
        "functions": [
            "openssl::ssl::SslContextBuilder::set_cookie_generate_cb",
            "openssl::ssl::SslContextBuilder::set_psk_callback",
            "openssl::ssl::SslContextBuilder::set_psk_client_callback",
            "openssl::ssl::SslContextBuilder::set_psk_server_callback",
            "openssl::ssl::SslContextBuilder::set_stateless_cookie_generate_cb"
        ],
        "os": []
    }
}

Database specific

categories
[
    "memory-exposure"
]
cvss
null
informational
null
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0478.json"