CVE-2026-31449 Overview
A slab-out-of-bounds read vulnerability has been discovered in the Linux kernel's ext4 filesystem implementation, specifically within the ext4_ext_correct_indexes() function. This function walks up the extent tree to correct index entries when the first extent in a leaf is modified. However, before accessing path[k].p_idx->ei_block, there is no validation that p_idx falls within the valid range of index entries for that level.
Critical Impact
If an attacker can craft or corrupt the on-disk extent header with a malicious eh_entries value, p_idx can point past the end of the allocated buffer, triggering a slab-out-of-bounds read that could lead to information disclosure or system instability.
Affected Products
- Linux Kernel (ext4 filesystem component)
- Systems using ext4 filesystem with potentially corrupted or malicious disk images
- Environments processing untrusted ext4 filesystem images
Discovery Timeline
- April 22, 2026 - CVE-2026-31449 published to NVD
- April 23, 2026 - Last updated in NVD database
Technical Details for CVE-2026-31449
Vulnerability Analysis
The vulnerability exists in the ext4 extent tree handling code within the ext4_ext_correct_indexes() function. When the first extent in a leaf node is modified, this function traverses up the extent tree to update corresponding index entries. The core issue is a missing bounds check before dereferencing the p_idx pointer to access ei_block data.
The ext4 filesystem uses B-tree-like structures called extent trees to map logical block addresses to physical disk blocks. Each level of this tree contains headers (eh_entries count) and either index entries (interior nodes) or extent entries (leaf nodes). The ext4_ext_correct_indexes() function relies on the eh_entries value from the extent header to determine valid index bounds.
When processing a corrupted or maliciously crafted filesystem image, the eh_entries field in the extent header may contain an invalid value that exceeds the actual allocated buffer size. Without proper validation against EXT_LAST_INDEX(), the code may attempt to read memory beyond the allocated slab object, resulting in an out-of-bounds read condition.
Root Cause
The root cause is insufficient input validation in the ext4_ext_correct_indexes() function. The code fails to validate that path[k].p_idx falls within the valid range defined by EXT_LAST_INDEX() before accessing the index entry's ei_block field. This validation gap exists at two locations: before the while loop and inside the loop during tree traversal.
The fix adds proper bounds checking at both access sites, returning -EFSCORRUPTED when the index pointer is out of range. This approach is consistent with how other bounds violations are handled throughout the ext4 extent tree code.
Attack Vector
An attacker could exploit this vulnerability by:
- Crafting a malicious ext4 filesystem image with a corrupted extent header containing an inflated eh_entries value
- Mounting the malicious filesystem image on a vulnerable system, or triggering extent tree operations through file operations
- The kernel's extent correction code would then read beyond allocated buffer boundaries when processing the corrupted extent tree
The vulnerability requires local access or the ability to cause the system to mount/process a malicious filesystem image. This could occur through USB devices, network-mounted filesystems, or container image processing scenarios.
Detection Methods for CVE-2026-31449
Indicators of Compromise
- Kernel log messages indicating ext4 filesystem corruption errors
- Unexpected -EFSCORRUPTED errors during filesystem operations
- Kernel KASAN (Kernel Address Sanitizer) reports showing slab-out-of-bounds reads in ext4 extent code
- System crashes or instability when mounting or accessing ext4 filesystems
Detection Strategies
- Monitor kernel logs for ext4-related error messages, particularly those mentioning extent tree corruption or bounds violations
- Deploy kernel debugging tools such as KASAN to detect out-of-bounds memory access attempts
- Implement filesystem integrity monitoring to detect potentially malicious or corrupted disk images before mounting
- Use SentinelOne's kernel-level monitoring to detect anomalous filesystem driver behavior
Monitoring Recommendations
- Enable kernel logging verbosity for ext4 filesystem operations in sensitive environments
- Configure automated alerts for ext4 extent-related kernel warnings and errors
- Monitor for unusual filesystem mount operations, especially from removable media or network sources
- Implement SentinelOne endpoint protection to detect exploitation attempts targeting kernel vulnerabilities
How to Mitigate CVE-2026-31449
Immediate Actions Required
- Update the Linux kernel to a patched version that includes the bounds validation fix
- Restrict mounting of untrusted ext4 filesystem images until patches are applied
- Enable KASAN in development and testing environments to detect similar vulnerabilities
- Review and audit any processes that handle external filesystem images
Patch Information
The Linux kernel development team has released patches that add proper validation of path[k].p_idx against EXT_LAST_INDEX() at both access sites in ext4_ext_correct_indexes(). The patched code returns -EFSCORRUPTED when the index pointer is out of range.
Patches are available through the following kernel git commits:
- Kernel Git Commit 01bf1e0b
- Kernel Git Commit 2acb5c12
- Kernel Git Commit 407c944f
- Kernel Git Commit 93f2e975
Workarounds
- Avoid mounting untrusted ext4 filesystem images on vulnerable systems until patches can be applied
- Use filesystem sandboxing or containerization when processing external disk images
- Run e2fsck to verify ext4 filesystem integrity before mounting untrusted images
- Consider using alternative filesystems for handling untrusted media until the kernel is patched
# Verify ext4 filesystem integrity before mounting
e2fsck -n /dev/sdX1
# Mount with read-only option as a precaution for untrusted images
mount -o ro,noexec /dev/sdX1 /mnt/untrusted
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

