KernelScan.io

CRITICAL Introduced in 7.0

ext4 BlockGroup Validation

CVE-2026-43067

CVSS 9.8 / 10.0 NVD

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

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().

02

Engine v0.2.0

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.

Affectedfs/ext4/mballoc.c (ext4 filesystem)

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.

03

BranchIntroducedFixed inPatch commit
5.155.15.2035.16f89bba144938
6.16.1.1676.1.16883170a05908b
6.126.12.776.12.8012624c5b724a
6.186.18.146.18.212a368ccddfc4
6.196.19.46.19.11bb81702370fa
6.66.6.1306.6.1344bec4a498ce8
cip/6.17.06.1.169-cip54f89bba144938
cip/6.1-rt7.06.1.175-cip57-rt30f89bba144938
cip/6.127.06.12.80-cip204bec4a498ce8

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.80-cip20
cip/6.1Fixed in 6.1.169-cip54
cip/6.1-rtFixed in 6.1.175-cip57-rt30