CRITICAL Introduced in 7.0
ext4 BlockGroup Validation
CVE-2026-43067
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: ext4: handle wraparound when searching for blocks for indirect mapped blocks Commit 4865c768b563 ("ext4: always allocate blocks only from groups inode can use") restricts what blocks will be allocated for indirect block based files to block numbers that fit within 32-bit block numbers. However, when using a review bot running on the latest Gemini LLM to check this commit when backporting into an LTS based kernel, it raised this concern: If ac->ac_g_ex.fe_group is >= ngroups (for instance, if the goal group was populated via stream allocation from s_mb_last_groups), then start will be >= ngroups. Does this allow allocating blocks beyond the 32-bit limit for indirect block mapped files? The commit message mentions that ext4_mb_scan_groups_linear() takes care to not select unsupported groups. However, its loop uses group = *start, and the very first iteration will call ext4_mb_scan_group() with this unsupported group because next_linear_group() is only called at the end of the iteration. After reviewing the code paths involved and considering the LLM review, I determined that this can happen when there is a file system where some files/directories are extent-mapped and others are indirect-block mapped. To address this, add a safety clamp in ext4_mb_scan_groups().
02KernelScan AI Analysis
Risk summary
Local users with write access to ext4 filesystems can trigger out-of-bounds access in the block allocator, potentially leading to privilege escalation or system crashes. The vulnerability affects systems with mixed extent-mapped and indirect-block mapped files on large ext4 filesystems.
Vulnerability analysis
The vulnerability occurs in ext4's block allocation code where the group selection logic can use an out-of-bounds group number when searching for blocks for indirect-mapped files. The root cause is that ac->ac_g_ex.fe_group can be >= ngroups due to stream allocation from s_mb_last_groups, but the code directly uses this value as a starting group without bounds checking. This allows ext4_mb_scan_group() to be called with an invalid group number, potentially accessing memory beyond allocated structures. The fix adds a simple bounds check that resets the start group to 0 if it exceeds ngroups, preventing the out-of-bounds access. The attack surface is local filesystem operations requiring write access to trigger block allocation.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.15 | 5.15.203 | 5.16 | f89bba144938 |
| 6.1 | 6.1.167 | 6.1.168 | 83170a05908b |
| 6.12 | 6.12.77 | 6.12.80 | 12624c5b724a |
| 6.18 | 6.18.14 | 6.18.21 | 2a368ccddfc4 |
| 6.19 | 6.19.4 | 6.19.11 | bb81702370fa |
| 6.6 | 6.6.130 | 6.6.134 | 4bec4a498ce8 |
| cip/6.1 | 7.0 | 6.1.169-cip54 | f89bba144938 |
| cip/6.1-rt | 7.0 | 6.1.175-cip57-rt30 | f89bba144938 |
| cip/6.12 | 7.0 | 6.12.80-cip20 | 4bec4a498ce8 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.80-cip20 |
| cip/6.1 | Fixed in 6.1.169-cip54 |
| cip/6.1-rt | Fixed in 6.1.175-cip57-rt30 |