CVE-2026-31449: ext4: validate p_idx bounds in ext4_ext_correct_indexes
In the Linux kernel, the following vulnerability has been resolved:
ext4: validate pidx bounds in ext4extcorrectindexes
ext4extcorrectindexes() walks up the extent tree correcting index entries when the first extent in a leaf is modified. Before accessing path[k].pidx->eiblock, there is no validation that pidx falls within the valid range of index entries for that level.
If the on-disk extent header contains a corrupted or crafted ehentries value, pidx can point past the end of the allocated buffer, causing a slab-out-of-bounds read.
Fix this by validating path[k].pidx against EXTLASTINDEX() at both access sites: before the while loop and inside it. Return -EFSCORRUPTED if the index pointer is out of range, consistent with how other bounds violations are handled in the ext4 extent tree code.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
On affected systems, treat this as a kernel ext4 bounds-validation issue and limit risk by using filesystem snapshots/mount options and restricting access to vulnerable ext4 volumes until the kernel fix is applied (vulnerability occurs during ext4 extent index correction when path[k].p_idx is crafted/out of range).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-31449?
The severity of CVE-2026-31449 is rated high with a score of 7.8.
How do I fix CVE-2026-31449?
To fix CVE-2026-31449, apply the available patch provided by the Linux kernel.
What does CVE-2026-31449 affect?
CVE-2026-31449 affects the ext4 file system in the Linux kernel.
What type of vulnerability is CVE-2026-31449?
CVE-2026-31449 is a vulnerability related to improper validation of index bounds in the ext4 file system.
Can CVE-2026-31449 lead to data corruption?
Yes, CVE-2026-31449 can potentially lead to data corruption and increased risk due to improper handling of extent trees.