RustSec logo

History ⋅ Edit ⋅ JSON (OSV)

RUSTSEC-2026-0479

Out-of-bounds read when a PEM password callback returns an oversized length

Reported
Issued
Package
openssl (crates.io)
Type
Vulnerability
Categories
Keywords
#pem #password #callback #out-of-bounds-read
Aliases
References
Patched
  • >=0.10.78
Unaffected
  • <0.9.0

Description

The *_from_pem_callback functions, such as EcKey::private_key_from_pem_callback, pass the length returned by the user's password callback to OpenSSL without checking it against the size of the buffer the callback was given. If the callback reports more bytes than the buffer holds, some OpenSSL versions read past the end of the buffer while deriving the decryption key. OpenSSL 3.x is not affected.

0.10.78 treats a returned length larger than the buffer as a failed callback.

Advisory available under CC0-1.0 license.