rust-openssl: Unchecked callback length in PSK/cookie trampolines leaks adjacent memory to peer
High severity
GitHub Reviewed
Published
Apr 19, 2026
in
rust-openssl/rust-openssl
•
Updated Apr 27, 2026
Description
Published to the GitHub Advisory Database
Apr 22, 2026
Reviewed
Apr 22, 2026
Published by the National Vulnerability Database
Apr 24, 2026
Last updated
Apr 27, 2026
The FFI trampolines behind
SslContextBuilder::set_psk_client_callback,set_psk_server_callback,set_cookie_generate_cb, andset_stateless_cookie_generate_cbforwarded the user closure's returned usize directly to OpenSSL without checking it against the&mut [u8]that was handed to the closure. This can lead to buffer overflows and other unintended consequences.References