The FFI trampolines behind SslContextBuilder::set_psk_client_callback, set_psk_server_callback, set_cookie_generate_cb, and set_stateless_cookie_generate_cb forwarded 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.
{
"cwe_ids": [
"CWE-126",
"CWE-130"
],
"nvd_published_at": "2026-04-24T18:16:29Z",
"severity": "HIGH",
"github_reviewed_at": "2026-04-22T21:00:57Z",
"github_reviewed": true
}