Vulnerability · Published Feb 3, 2025 · Assigned by GitHub_M

CVE-2025-24898rust openssl ssl::select_next_proto use after free

Medium 6.3

In plain English

A medium-severity use-after-free in rust-openssl from sfackler. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 53% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)6.3Medium
Exploit odds (30 days)0.7%top 47.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 crate`openssl` 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 & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:9bootc1.1.6-3.el9_6ALSA-2025:7160
AlmaLinux:9bootupd0.2.27-3.el9ALSA-2025:7241
AlmaLinux:9keylime-agent-rust0.2.2-2.el9ALSA-2025:7313
AlmaLinux:9python3.12-cryptography41.0.7-2.el9ALSA-2025:7317
AlmaLinux:9rpm-ostree2025.5-1.el9ALSA-2025:7147
AlmaLinux:9rpm-ostree-libs2025.5-1.el9ALSA-2025:7147
AlmaLinux:9system-reinstall-bootc1.1.6-3.el9_6ALSA-2025:7160
Debian:12rust-opensslno fix listedDEBIAN-CVE-2025-24898
Debian:13rust-openssl0.10.70-1DEBIAN-CVE-2025-24898
Debian:14rust-openssl0.10.70-1DEBIAN-CVE-2025-24898
Rocky Linux:9bootc0:1.1.6-3.el9_6RLSA-2025:7160
Rocky Linux:9keylime-agent-rust0:0.2.2-2.el9RLSA-2025:7313
Rocky Linux:9python3.12-cryptography0:41.0.7-2.el9RLSA-2025:7317
Rocky Linux:9rust-bootupd0:0.2.27-3.el9RLSA-2025:7241

Affected products (as reported)

VendorProductVersions
sfackler rust-openssl >= 0.10.0, < 0.10.70

Weakness: CWE-416 · Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N

References