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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | bootc | 1.1.6-3.el9_6 | ALSA-2025:7160 |
| AlmaLinux:9 | bootupd | 0.2.27-3.el9 | ALSA-2025:7241 |
| AlmaLinux:9 | keylime-agent-rust | 0.2.2-2.el9 | ALSA-2025:7313 |
| AlmaLinux:9 | python3.12-cryptography | 41.0.7-2.el9 | ALSA-2025:7317 |
| AlmaLinux:9 | rpm-ostree | 2025.5-1.el9 | ALSA-2025:7147 |
| AlmaLinux:9 | rpm-ostree-libs | 2025.5-1.el9 | ALSA-2025:7147 |
| AlmaLinux:9 | system-reinstall-bootc | 1.1.6-3.el9_6 | ALSA-2025:7160 |
| Debian:12 | rust-openssl | no fix listed | DEBIAN-CVE-2025-24898 |
| Debian:13 | rust-openssl | 0.10.70-1 | DEBIAN-CVE-2025-24898 |
| Debian:14 | rust-openssl | 0.10.70-1 | DEBIAN-CVE-2025-24898 |
| Rocky Linux:9 | bootc | 0:1.1.6-3.el9_6 | RLSA-2025:7160 |
| Rocky Linux:9 | keylime-agent-rust | 0:0.2.2-2.el9 | RLSA-2025:7313 |
| Rocky Linux:9 | python3.12-cryptography | 0:41.0.7-2.el9 | RLSA-2025:7317 |
| Rocky Linux:9 | rust-bootupd | 0:0.2.27-3.el9 | RLSA-2025:7241 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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