Previously, MemBio::get_buf called slice::from_raw_parts with a null-pointer, which violates the functions invariants, leading to undefined behavior. In debug builds this would produce an assertion failure. This is now fixed.
This project contains known security vulnerabilities. Find detailed information at the bottom.
cargo(75 total, 24 outdated, 1 insecure)
| Crate | Required | Latest | Status |
|---|---|---|---|
| annotate-snippets | ^0.11.4 | 0.12.18 | out of date |
| anstream | ^0.6.15 | 1.0.0 | out of date |
| anstyle | ^1.0.8 | 1.0.14 | up to date |
| anyhow | ^1.0.86 | 1.0.105 | up to date |
| base64 | ^0.22.1 | 0.23.1 | out of date |
| blake3 | ^1.5.2 | 1.8.8 | up to date |
| bytesize | ^1.3 | 2.7.0 | out of date |
| cargo-credential | ^0.4.2 | 0.4.11 | up to date |
| cargo-credential-libsecret | ^0.4.7 | 0.5.11 | out of date |
| cargo-credential-macos-keychain | ^0.4.7 | 0.4.26 | up to date |
| cargo-credential-wincred | ^0.4.7 | 0.4.26 | up to date |
| cargo-platform | ^0.2.0 | 0.3.3 | out of date |
| cargo-util | ^0.2.14 | 0.2.33 | up to date |
| cargo-util-schemas | ^0.7.0 | 0.15.0 | out of date |
| clap | ^4.5.20 | 4.6.10 | up to date |
| clap_complete | ^4.5.35 | 4.6.12 | up to date |
| color-print | ^0.3.6 | 0.3.7 | up to date |
| crates-io | ^0.40.4 | 0.41.3 | out of date |
| curl | ^0.4.46 | 0.4.51 | up to date |
| curl-sys | ^0.4.73 | 0.4.91+curl-8.22.0 | up to date |
| filetime | ^0.2.23 | 0.2.30 | up to date |
| flate2 | ^1.0.30 | 1.1.11 | up to date |
| git2 | ^0.19.0 | 0.21.0 | out of date |
| git2-curl | ^0.20.0 | 0.22.0 | out of date |
| gix | ^0.69.1 | 0.91.0 | out of date |
| glob | ^0.3.1 | 0.3.4 | up to date |
| hex | ^0.4.3 | 0.4.3 | up to date |
| hmac | ^0.12.1 | 0.13.0 | out of date |
| home | ^0.5.9 | 0.5.12 | up to date |
| http-auth | ^0.1.9 | 0.1.10 | up to date |
| humantime | ^2.1.0 | 2.4.0 | up to date |
| ignore | ^0.4.22 | 0.4.35 | up to date |
| im-rc | ^15.1.0 | 15.1.0 | up to date |
| indexmap | ^2.2.6 | 2.14.2 | up to date |
| itertools | ^0.13.0 | 0.15.0 | out of date |
| jobserver | ^0.1.32 | 0.1.35 | up to date |
| lazycell | ^1.3.0 | 1.3.0 | up to date |
| libc | ^0.2.155 | 0.2.191 | up to date |
| libgit2-sys | ^0.17.0 | 0.18.8+1.9.7 | out of date |
| memchr | ^2.7.4 | 2.8.3 | up to date |
| opener | ^0.7.1 | 0.9.0 | out of date |
| openssl ⚠️ | =0.10.57 | 0.10.82 | insecure |
| os_info | ^3.8.2 | 3.15.0 | up to date |
| pasetors | ^0.7.0 | 0.8.1 | out of date |
| pathdiff | ^0.2.1 | 0.2.3 | up to date |
| rand | ^0.8.5 | 0.10.4 | out of date |
| regex | ^1.10.5 | 1.13.2 | up to date |
| rusqlite | ^0.32.0 | 0.43.0 | out of date |
| rustc-hash | ^2.0.0 | 2.1.3 | up to date |
| rustc-stable-hash | ^0.1.1 | 0.1.2 | up to date |
| rustfix | ^0.9.0 | 0.9.8 | up to date |
| same-file | ^1.0.6 | 1.0.6 | up to date |
| semver | ^1.0.23 | 1.0.28 | up to date |
| serde | ^1.0.204 | 1.0.229 | up to date |
| serde-untagged | ^0.1.6 | 0.1.9 | up to date |
| serde_ignored | ^0.1.10 | 0.1.14 | up to date |
| serde_json | ^1.0.120 | 1.0.154 | up to date |
| sha1 | ^0.10.6 | 0.11.0 | out of date |
| shell-escape | ^0.1.5 | 0.1.5 | up to date |
| supports-hyperlinks | ^3.0.0 | 3.2.0 | up to date |
| supports-unicode | ^3.0.0 | 3.0.0 | up to date |
| tar | ^0.4.42 | 0.4.46 | up to date |
| tempfile | ^3.10.1 | 3.27.0 | up to date |
| thiserror | ^1.0.63 | 2.0.21 | out of date |
| time | ^0.3.36 | 0.3.55 | up to date |
| toml | ^0.8.19 | 1.2.3+spec-1.1.0 | out of date |
| toml_edit | ^0.22.20 | 0.25.21+spec-1.1.0 | out of date |
| tracing | ^0.1.40 | 0.1.44 | up to date |
| tracing-chrome | ^0.7.2 | 0.7.2 | up to date |
| tracing-subscriber | ^0.3.18 | 0.3.23 | up to date |
| unicase | ^2.7.0 | 2.10.0 | up to date |
| unicode-width | ^0.2.0 | 0.2.3 | up to date |
| url | ^2.5.2 | 2.5.9 | up to date |
| walkdir | ^2.5.0 | 2.5.1 | up to date |
| windows-sys | ^0.59 | 0.61.2 | out of date |
(5 total, 4 outdated)
| Crate | Required | Latest | Status |
|---|---|---|---|
| annotate-snippets | ^0.11.4 | 0.12.18 | out of date |
| cargo-test-support | ^0.7.0 | 0.12.0 | out of date |
| gix | ^0.69.1 | 0.91.0 | out of date |
| same-file | ^1.0.6 | 1.0.6 | up to date |
| snapbox | ^0.6.20 | 1.2.2 | out of date |
openssl: `MemBio::get_buf` has undefined behavior with empty buffersPreviously, MemBio::get_buf called slice::from_raw_parts with a null-pointer, which violates the functions invariants, leading to undefined behavior. In debug builds this would produce an assertion failure. This is now fixed.
openssl: ssl::select_next_proto use after freeIn openssl versions before 0.10.70, ssl::select_next_proto can return a slice pointing into the server argument's buffer but with a lifetime bound to the client argument. In situations where the server buffer's lifetime is shorter than the client buffer's, this can cause a use after free. This could cause the server to crash or to return arbitrary memory contents to the client.
openssl 0.10.70 fixes the signature of ssl::select_next_proto to properly constrain the output buffer's lifetime to that of both input buffers.
In standard usage of ssl::select_next_proto in the callback passed to SslContextBuilder::set_alpn_select_callback, code is only affected if the server buffer is constructed within the callback. For example:
Not vulnerable - the server buffer has a 'static lifetime:
builder.set_alpn_select_callback(|_, client_protos| {
ssl::select_next_proto(b"\x02h2", client_protos).ok_or_else(AlpnError::NOACK)
});
Not vulnerable - the server buffer outlives the handshake:
let server_protos = b"\x02h2".to_vec();
builder.set_alpn_select_callback(|_, client_protos| {
ssl::select_next_proto(&server_protos, client_protos).ok_or_else(AlpnError::NOACK)
});
Vulnerable - the server buffer is freed when the callback returns:
builder.set_alpn_select_callback(|_, client_protos| {
let server_protos = b"\x02h2".to_vec();
ssl::select_next_proto(&server_protos, client_protos).ok_or_else(AlpnError::NOACK)
});
openssl: Use-After-Free in `Md::fetch` and `Cipher::fetch`When a Some(...) value was passed to the properties argument of either of these functions, a use-after-free would result.
In practice this would nearly always result in OpenSSL treating the properties as an empty string (due to CString::drop's behavior).
The maintainers thank quitbug for reporting this vulnerability to us.
openssl: Out-of-bounds write in `aes::unwrap_key`openssl::aes::unwrap_key guarded the size of its output buffer with an inverted assertion, out.len() + 8 <= in_.len(). Instead of rejecting an out buffer too small for the unwrapped key, it rejected buffers larger than needed and accepted buffers that were too small.
When out is shorter than in_.len() - 8 bytes, the underlying AES_unwrap_key call writes past the end of out. This out-of-bounds write is reachable from a safe function; applications that let untrusted input influence the input or output buffer sizes are exposed.
The function was added in 0.10.24. 0.10.78 corrects the assertion, so an output buffer that is too small now causes a panic before anything is written.
openssl: Buffer overflow in `Deriver::derive` and `PkeyCtxRef::derive` with OpenSSL 1.1.xDeriver::derive and PkeyCtxRef::derive pass the length of the caller's buffer to EVP_PKEY_derive and rely on OpenSSL to write no more than that. With OpenSSL 1.1.x, the X25519, X448 and HKDF-extract implementations ignore the length they are given and always write the whole result, so a buffer shorter than the shared secret or derived key is overrun. The overflow is reachable from safe code.
OpenSSL 3.x checks the length itself and is not affected. From 0.10.78, when built against OpenSSL 1.1.x or LibreSSL, both functions derive into a temporary buffer of the required size whenever the caller's buffer is too short, and copy only what fits.
openssl: `X509Ref::ocsp_responders` can produce a `&str` that is not valid UTF-8X509Ref::ocsp_responders returns the OCSP responder URLs from a certificate's Authority Information Access extension as OpensslString values, which dereference to str without validating the bytes. OpenSSL does not require these IA5String values to be ASCII, so for a certificate with non-UTF-8 bytes in an OCSP access location, safe code ends up holding a &str that is not valid UTF-8, which is undefined behavior. Certificates often come from untrusted peers.
ocsp_responders was added in 0.9.7. 0.10.79 checks each URL and returns an error if it is not valid UTF-8.
openssl: Buffer overflow in `MdCtxRef::digest_final`MdCtxRef::digest_final passed the caller's output slice to OpenSSL's EVP_DigestFinal without checking its length. EVP_DigestFinal always writes the full digest (EVP_MD_CTX_size bytes), so an output slice shorter than the digest is overrun. With a stack buffer this usually corrupts the stack. The overflow is reachable from safe code.
MdCtxRef was added in 0.10.39. 0.10.78 checks the slice length first and returns an error when the slice is too short for the digest.
openssl: Buffer overflow with AES key wrap with padding in `cipher_update`CipherCtxRef::cipher_update, CipherCtxRef::cipher_update_vec and symm::Crypter::update require (or allocate) input.len() + block_size bytes of output. With the AES key-wrap-with-padding ciphers (EVP_aes_128_wrap_pad, EVP_aes_192_wrap_pad, EVP_aes_256_wrap_pad), OpenSSL pads the input to a multiple of 8 bytes and adds an 8-byte block, so when the input length is not a multiple of 8 it writes up to 7 bytes past the end of the caller's buffer or Vec. If an attacker can influence the plaintext length, this is heap corruption they can partly control.
Only users of the AES key-wrap-with-padding ciphers are affected. 0.10.79 sizes the output for these ciphers as the input length rounded up to a multiple of 8, plus 8.
openssl: Buffer overflow with AES key wrap with padding in `cipher_update_inplace`CipherCtxRef::cipher_update_inplace had the same sizing error that 0.10.79 fixed in cipher_update (GHSA-xv59-967r-8726); that fix missed this method. It required room for inlen + block_size bytes, but with the AES key-wrap-with-padding ciphers OpenSSL writes up to 7 more bytes when inlen is not a multiple of 8, past the end of data.
Only users of the AES key-wrap-with-padding ciphers are affected. cipher_update_inplace was added in 0.10.50, and 0.10.80 applies the corrected size check to it.
openssl: Unchecked callback lengths in PSK and cookie callbacksThe 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.
openssl: Out-of-bounds read when a PEM password callback returns an oversized lengthThe *_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.