CVE-2025-22079
NoneCVSS
—
EPSS
0.3%
Published
Apr 16, 2025
CISA due date
—
Cloudanix analysis
A missing safety check in the Linux kernel's handling of certain disk structures could let a specially crafted storage device crash the system or corrupt memory when it is mounted.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Privilege Gain
- Component
- OS kernel
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw permits out-of-bounds memory access during OCFS2 extent tree traversal when an on-disk l_tree_depth value exceeds OCFS2_MAX_PATH_DEPTH; the 16-bit field is read from potentially corrupted media without validation before indexing internal kernel structures.
Why it matters to the business
Systems using the OCFS2 clustered filesystem risk kernel instability, crashes, or memory corruption when mounting attacker-controlled or corrupted volumes, leading to service outages in storage clusters or high-availability setups; the low EPSS and absence from KEV indicate limited observed exploitation but still require prompt patching given the kernel's foundational role.
How an attack unfolds
An attacker prepares a malicious OCFS2 filesystem image containing an invalid l_tree_depth larger than the defined maximum, then causes the target kernel to mount the image (via local device, network share, or container volume); during metadata parsing the unchecked depth triggers an out-of-bounds read or write in kernel memory.
How to fix it
Apply the upstream fix (commit ef34840bda333fe99bafbd2d73b70ceaaf9eba66) or later; for affected Red Hat packages update libreswan to 0:4.6-3.el9_0.3 (or equivalent) and ensure the running kernel contains the ocfs2 depth validation; rebuild and reboot with the patched kernel, then verify the mount path rejects invalid depth values.
How to confirm the fix worked
Confirm the patched kernel source contains the l_tree_depth bounds check before OCFS2_MAX_PATH_DEPTH usage; test by attempting to mount a crafted image with excessive depth and verify the operation is rejected without kernel oops or panic.
Typical attack path
- Craft OCFS2 disk image with l_tree_depth exceeding OCFS2_MAX_PATH_DEPTH
- Deliver the image to the target (USB, network filesystem, container layer)
- Trigger mount operation on the corrupted volume
- Kernel extent-tree walker performs unbounded array access
- Resulting memory corruption or panic occurs
How to detect it
Inspect kernel logs (dmesg, /var/log/kern.log, journalctl) for OCFS2 extent-tree or l_tree_depth related oops/panic messages; correlate mount events of OCFS2 volumes with subsequent crashes; no widespread threat-actor campaigns are documented.
What your security team should do
- Prioritize kernel updates containing the ocfs2 validation fix across all OCFS2-using systems
- Restrict mounting of OCFS2 volumes to trusted sources only
- Enable filesystem integrity checks and monitor kernel logs for ocfs2-related faults
- Review downstream package dependencies for the fixed commit and schedule reboots
The record
In the Linux kernel, the following vulnerability has been resolved: ocfs2: validate l_tree_depth to avoid out-of-bounds access The l_tree_depth field is 16-bit (__le16), but the actual maximum depth is limited to OCFS2_MAX_PATH_DEPTH. Add a check to prevent out-of-bounds access if l_tree_depth has an invalid value, which may occur when reading from a corrupted mounted disk [1].
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | linux | 0 | No fix |
| Debian:11 | linux-6.1 | 0 | 6.1.137-1~deb11u1 |
| Debian:12 | linux | 0 | No fix |
| Debian:13 | linux | 0 | No fix |
| Debian:13 | linux | 0 | 6.12.25-1 |
| Linux | Kernel | 2.6.16 | 5.4.292 |
| Mageia:9 | kernel | 0 | 6.6.88-3.mga9 |
| Mageia:9 | kernel-linus | 0 | 6.6.88-1.mga9 |
| Mageia:9 | kmod-virtualbox | 0 | 7.0.24-70.mga9 |
| Mageia:9 | kmod-xtables-addons | 0 | 3.24-78.mga9 |
Related vulnerabilities
- CVE-2025-39885 In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix recursive… Also affects linux
- CVE-2025-39883 In the Linux kernel, the following vulnerability has been resolved: mm/memory-failure… Also affects linux
- CVE-2025-39876 In the Linux kernel, the following vulnerability has been resolved: net: fec: Fix… Also affects linux
- CVE-2025-39869 In the Linux kernel, the following vulnerability has been resolved: dmaengine: ti: edma… Also affects linux
- CVE-2025-39873 In the Linux kernel, the following vulnerability has been resolved: can: xilinx_can… Also affects linux
- CVE-2025-39863 In the Linux kernel, the following vulnerability has been resolved: wifi: brcmfmac: fix… Also affects linux
- CVE-2025-39865 In the Linux kernel, the following vulnerability has been resolved: tee: fix NULL pointer… Also affects linux
- CVE-2025-39866 In the Linux kernel, the following vulnerability has been resolved: fs: writeback: fix… Also affects linux