CVE-2025-40244
Description
A flaw was discovered in the Linux kernel’s HFS+ filesystem driver where the __hfsplus_ext_cache_extent() function could operate on an uninitialized value. This was identified by the Kernel Memory Sanitizer during testing and can lead to undefined behavior — including kernel instability or panic — when filesystem write operations traverse this code path.
Statement
A moderate severity flaw was found in the Linux kernel's HFS+ (hfsplus) filesystem driver. The hfs_find_init() function allocated its search data with kmalloc() without zero-initializing it, so when a B-tree lookup performed by __hfsplus_ext_cache_extent() found no matching extent record during a write operation on an HFS+ filesystem, the function compared and operated on uninitialized memory. A local user with write access to an HFS+ volume could trigger this path, leading to undefined kernel behavior such as kernel instability or a panic, which is a denial of service. Red Hat Product Security rated this flaw Moderate (CVSS 3.1 score 4.7, AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H) because exploitation requires local privileges plus write access to an HFS+ filesystem, has high attack complexity, and affects availability only; this differs from the upstream CVE.org rating of Important (7.8). Per the current assessment, Red Hat Enterprise Linux 6 is out of support scope, and the maintained Red Hat Enterprise Linux 7 through 10 streams (including kernel-rt) and Red Hat In-Vehicle OS 1.1 are not affected because the vulnerable code is not present in those products.
Mitigation
Mitigation for this issue is either not available or the currently available options don't 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).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 4.7 | N/A | 7.8 |
| Attack Vector | Local | N/A | Local |
| Attack Complexity | High | N/A | Low |
| Privileges Required | Low | N/A | Low |
| User Interaction | None | N/A | None |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | None | N/A | High |
| Integrity Impact | None | N/A | High |
| Availability Impact | High | N/A | High |
Vector
Red Hat: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
cve.org: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Understanding the Weakness (CWE)
Confidentiality
Technical Impact: Read Memory; Read Application Data
When reusing a resource such as memory or a program variable, the original contents of that resource may not be cleared before it is sent to an untrusted party.
Access Control
Technical Impact: Bypass Protection Mechanism
If security-critical decisions rely on a variable having a "0" or equivalent value, and the programming language performs this initialization on behalf of the programmer, then a bypass of security may occur.
Availability
Technical Impact: DoS: Crash, Exit, or Restart
The uninitialized data may contain values that cause program flow to change in ways that the programmer did not intend. For example, if an uninitialized variable is used as an array index in C, then its previous contents may produce an index that is outside the range of the array, possibly causing a crash or an exit in other environments.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.