# CVE-2026-138872: ext4: fix out-of-bounds read in ext4_get_group_info()

- Severity: High 7.0 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2026-11-30T13:25:46.643Z
- Modified: 2026-12-01T06:17:29.610Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

ext4: fix out-of-bounds read in ext4_get_group_info()

A plain read of s_groups_count in ext4_get_group_info() allows CPU
load-load reordering. On weak memory models, speculative prefetch of
s_group_info prior to the boundary check could lead to an out-of-bounds
read if a concurrent online resize expands the array and increments
s_groups_count.

The data race occurs between the ioctl configuration path (holding the
resize lock via ext4_resize_begin) and the lockless metadata lookup path:

   CPU 0 (Writer, Resize Lock)                CPU 1 (Reader, Lockless)
   ---------------------------                ------------------------
   ext4_ioctl()
     [EXT4_IOC_GROUP_ADD]
     ext4_ioctl_group_add()
       ext4_resize_begin() // Takes lock
       ext4_group_add()
         ext4_mb_alloc_groupinfo()
           // Publishes expanded array via RCU
           rcu_assign_pointer(s_group_info, ...)

         ext4_flex_group_add()
           ext4_update_super()
                                              ext4_get_group_info()
                                                // Speculative / out-of-order read
                                                [Loads old/smaller s_group_info pointer]
             [Plain C store / smp_wmb()]
             sbi->s_groups_count += ...;
                                                // Reads new s_groups_count,
                                                // boundary check passes
                                                if (group >= s_groups_count)

                                                // Out-of-bounds array access!
                                                sbi_array_rcu_deref(..., s_group_info)

Fix this by using ext4_get_groups_count() to enforce acquire semantics.

(As written by CVE List.)

## Affected

- Linux Linux: from 100c0ad6c04597fefeaaba2bb1827cc015d95067 before 840de582e3c98cbf01911472c8d363b9499932ca; from 620a3c28221bb219b81bc0bffd065cc187494302 before 22ee086e5c96d9e0f47ed0450b5e3b2d39ae9a89; from b4319e457d6e3fb33e443efeaf4634fc36e8a9ed before b3151c0908b0ae63bb2bc5faae8d8d3cf421169c; from 5354b2af34064a4579be8bc0e2f15a7b70f14b5f before de1e5704b3d71ef2c111ea424aa8e0e3ee8c6bf9; from 5354b2af34064a4579be8bc0e2f15a7b70f14b5f before cd24b217717f152195de4abf8272ea1ef2a7c4be; from 5354b2af34064a4579be8bc0e2f15a7b70f14b5f before 02eea74948bda0409d7e359969218a814238a42a; from 5354b2af34064a4579be8bc0e2f15a7b70f14b5f before 425add03ad9a2fd539bcb02a62b892e19ff0600d; from 5354b2af34064a4579be8bc0e2f15a7b70f14b5f before b067d3c1f90b536e9aa9f48b19580475a0b34f0f; 31668cebf45adfb6283e465e641c4f5a21b07afa; from 5.10.181 before 5.10.275; from 5.15.113 before 5.15.226; from 6.1.30 before 6.1.193; and 2 more (not affected: before 6.4; from 5.10.275 up to 5.10.*; from 5.15.226 up to 5.15.*; from 6.1.193 up to 6.1.*; from 6.6.163 up to 6.6.*; from 6.12.117 up to 6.12.*; from 6.18.63 up to 6.18.*; from 7.3.4 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/840de582e3c98cbf01911472c8d363b9499932ca>
- <https://git.kernel.org/stable/c/22ee086e5c96d9e0f47ed0450b5e3b2d39ae9a89>
- <https://git.kernel.org/stable/c/b3151c0908b0ae63bb2bc5faae8d8d3cf421169c>
- <https://git.kernel.org/stable/c/de1e5704b3d71ef2c111ea424aa8e0e3ee8c6bf9>
- <https://git.kernel.org/stable/c/cd24b217717f152195de4abf8272ea1ef2a7c4be>
- <https://git.kernel.org/stable/c/02eea74948bda0409d7e359969218a814238a42a>
- <https://git.kernel.org/stable/c/425add03ad9a2fd539bcb02a62b892e19ff0600d>
- <https://git.kernel.org/stable/c/b067d3c1f90b536e9aa9f48b19580475a0b34f0f>

## Sources

- CVE List: [CVE-2026-138872](https://www.cve.org/CVERecord?id=CVE-2026-138872), CVE Terms of Use, modified 2026-12-01
- NVD: [CVE-2026-138872](https://nvd.nist.gov/vuln/detail/CVE-2026-138872), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-138872 · Whole record: https://cve.day/CVE-2026-138872.json · Rebuilt by cve.day 2026-12-01T06:32:14.260Z
