Description
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().
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 5.15.203 – < 5.16, 6.1.167 – < 6.1.168, 6.6.130 – < 6.6.134, 6.12.77 – < 6.12.80, 6.18.14 – < 6.18.21, 6.19.4 – < 6.19.11 | 5.16 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 6.19.11-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Nvidia-BlueField 22.04 LTS | linux-bluefield | No fix yet | — |
| Ubuntu 24.04 LTS | linux-riscv +15 | No fix yet | — |
| Ubuntu 22.04 LTS | linux +49 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime-6.14 | No fix yet | — |
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime +1 | No fix yet | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro 20.04 LTS | linux-aws-5.15 +10 | No fix yet | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | kernel-livepatch-6.18.25-52.107 +1 | 1:1.0-0.amzn2023 | ALAS2023-2026-1746, ALAS2023-2026-1646 |
| Amazon Linux 2023 | perf6.12 +14 | 1:6.12.80-105.147.amzn2023 | ALAS2023-2026-1646 |
| Amazon Linux 2023 | perf6.18 +11 | 1:6.18.25-52.107.amzn2023 | ALAS2023-2026-1746 |
Advisories 3
- WID-SEC-2026-1385 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- ALAS2023-2026-1746 Important: kernel6.18 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jul 1, 2026
- ALAS2023-2026-1646 Important: kernel6.12 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · May 11, 2026
References
- https://git.kernel.org/stable/c/f89bba144938921a2249237ad04a0183ff3f8930
- https://git.kernel.org/stable/c/83170a05908b6cf2fb3235d3065bf613ff866f3c
- https://git.kernel.org/stable/c/4bec4a498ce86314d470ae6144120461f2138c29
- https://git.kernel.org/stable/c/12624c5b724a81e14e532972b40d863b0de3b7d1
- https://git.kernel.org/stable/c/2a368ccddfc492a0aa951e2caef2985f20e96503
- https://git.kernel.org/stable/c/bb81702370fad22c06ca12b6e1648754dbc37e0f