CVE-2025-24898

Description

A flaw was found in the rust-openssl package. In certain 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 error. This could cause the server to crash or return arbitrary memory contents to the client.

Statement

This Moderate-impact flaw affects Red Hat products that use the vulnerable rust-openssl functionality. In affected versions, ssl::select_next_proto can return a slice into the server buffer while its lifetime is tied only to the client buffer; if the server buffer is created within the callback and has a shorter lifetime, this can cause a use-after-free, potentially crashing the server or returning arbitrary memory contents to the client. Current affects identify affected records in Red Hat Enterprise Linux for rust-bootupd, python3.12-cryptography, bootc, keylime-agent-rust, and rpm-ostree, with trustee-guest-components and fido-device-onboard marked DEFER; the RHEL 8.4, 8.6, 8.8, and 8.10 python3.12-cryptography records and RHEL 9.6 sevctl record have delegated NOTAFFECTED resolutions, including vulnerable code not in the execute path where specified. Other Red Hat Enterprise Linux, Red Hat Directory Server, and Community Projects records are not affected because the vulnerable code is not present or not in the execute path. The Red Hat CVSS assessment is Moderate (4.8, CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L), consistent with the upstream Moderate rating.

Mitigation

Users should upgrade to an available vendor-provided update. Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score4.8N/AN/A
Attack VectorNetworkN/AN/A
Attack ComplexityHighN/AN/A
Privileges RequiredNoneN/AN/A
User InteractionNoneN/AN/A
ScopeUnchangedN/AN/A
ConfidentialityLowN/AN/A
Integrity ImpactNoneN/AN/A
Availability ImpactLowN/AN/A

Vector

Red Hat: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L

Understanding the Weakness (CWE)

Integrity

Technical Impact: Modify Memory

The use of previously freed memory may corrupt valid data, if the memory area in question has been allocated and used properly elsewhere.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

If chunk consolidation occurs after the use of previously freed data, the process may crash when invalid data is used as chunk information.

Confidentiality

Technical Impact: Read Memory

Read operations on freed memory can sometimes leak sensitive information instead of causing a crash

Integrity,Confidentiality,Availability

Technical Impact: Execute Unauthorized Code or Commands

If malicious data is entered before chunk consolidation can take place, it may be possible to take advantage of a write-what-where primitive to execute arbitrary code. If the newly allocated data happens to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.

Frequently Asked Questions

Want to get errata notifications? Sign up here.