VYPR
Medium severityNVD Advisory· Published Feb 3, 2025· Updated Apr 15, 2026

CVE-2025-24898

CVE-2025-24898

Description

rust-openssl is a set of OpenSSL bindings for the Rust programming language. In affected versions 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 sever 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. The crateopenssl version 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. Users are advised to upgrade. 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.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
opensslcrates.io
>= 0.10.0, < 0.10.700.10.70

Patches

2
f014afb230de

Merge pull request #2360 from sfackler/fix-alpn-lifetimes

https://github.com/sfackler/rust-opensslSteven FacklerFeb 2, 2025via ghsa
1 file changed · +1 1
  • openssl/src/ssl/mod.rs+1 1 modified
    @@ -709,7 +709,7 @@ cfg_if! {
     ///
     /// [`SslContextBuilder::set_alpn_protos`]: struct.SslContextBuilder.html#method.set_alpn_protos
     #[corresponds(SSL_select_next_proto)]
    -pub fn select_next_proto<'a>(server: &[u8], client: &'a [u8]) -> Option<&'a [u8]> {
    +pub fn select_next_proto<'a>(server: &'a [u8], client: &'a [u8]) -> Option<&'a [u8]> {
         unsafe {
             let mut out = ptr::null_mut();
             let mut outlen = 0;
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.