[Pkg-rust-maintainers] Bug#1134881: rust-openssl: CVE-2026-41676 CVE-2026-41677 CVE-2026-41678 CVE-2026-41681 CVE-2026-41898
Moritz Mühlenhoff
jmm at inutil.org
Sat Apr 25 11:29:36 BST 2026
Source: rust-openssl
X-Debbugs-CC: team at security.debian.org
Severity: important
Tags: security
Hi,
The following vulnerabilities were published for rust-openssl.
All fixed in 0.10.78.
CVE-2026-41676[0]:
| rust-openssl provides OpenSSL bindings for the Rust programming
| language. From 0.9.27 to before 0.10.78, Deriver::derive (and
| PkeyCtxRef::derive) sets len = buf.len() and passes it as the in/out
| length to EVP_PKEY_derive, relying on OpenSSL to honor it. On
| OpenSSL 1.1.x, X25519, X448, DH and HKDF-extract ignore the incoming
| *keylen, unconditionally writing the full shared secret
| (32/56/prime-size bytes). A caller passing a short slice gets a
| heap/stack overflow from safe code. OpenSSL 3.x providers do check,
| so this only impacts older OpenSSL. This vulnerability is fixed in
| 0.10.78.
CVE-2026-41677[1]:
| rust-openssl provides OpenSSL bindings for the Rust programming
| language. From 0.9.0 to before 0.10.78, the *_from_pem_callback
| APIs did not validate the length returned by the user's callback. A
| password callback that returns a value larger than the buffer it was
| given can cause some versions of OpenSSL to over-read this buffer.
| OpenSSL 3.x is not affected by this. This vulnerability is fixed in
| 0.10.78.
CVE-2026-41678[2]:
| rust-openssl provides OpenSSL bindings for the Rust programming
| language. From to before 0.10.78, aes::unwrap_key() contains an
| incorrect assertion: it checks that out.len() + 8 <= in_.len(), but
| this condition is reversed. The intended invariant is out.len() >=
| in_.len() - 8, ensuring the output buffer is large enough. Because
| of the inverted check, the function only accepts buffers at or below
| the minimum required size and rejects larger ones. If a smaller
| buffer is provided the function will write past the end of out by
| in_.len() - 8 - out.len() bytes, causing an out-of-bounds write from
| a safe public function. This vulnerability is fixed in 0.10.78.
CVE-2026-41681[3]:
| rust-openssl provides OpenSSL bindings for the Rust programming
| language. From 0.10.39 to before 0.10.78, EVP_DigestFinal() always
| writes EVP_MD_CTX_size(ctx) to the out buffer. If out is smaller
| than that, MdCtxRef::digest_final() writes past its end, usually
| corrupting the stack. This is reachable from safe Rust. This
| vulnerability is fixed in 0.10.78.
CVE-2026-41898[4]:
| rust-openssl provides OpenSSL bindings for the Rust programming
| language. From 0.9.24 to before 0.10.78, 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. This vulnerability is fixed in 0.10.78.
If you fix the vulnerabilities please also make sure to include the
CVE (Common Vulnerabilities & Exposures) ids in your changelog entry.
For further information see:
[0] https://security-tracker.debian.org/tracker/CVE-2026-41676
https://www.cve.org/CVERecord?id=CVE-2026-41676
[1] https://security-tracker.debian.org/tracker/CVE-2026-41677
https://www.cve.org/CVERecord?id=CVE-2026-41677
[2] https://security-tracker.debian.org/tracker/CVE-2026-41678
https://www.cve.org/CVERecord?id=CVE-2026-41678
[3] https://security-tracker.debian.org/tracker/CVE-2026-41681
https://www.cve.org/CVERecord?id=CVE-2026-41681
[4] https://security-tracker.debian.org/tracker/CVE-2026-41898
https://www.cve.org/CVERecord?id=CVE-2026-41898
Please adjust the affected versions in the BTS as needed.
More information about the Pkg-rust-maintainers
mailing list