CVE-2026-138872

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

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability involves a data‑race condition in the ext4 filesystem code that allows a speculative read of the s_group_info array before the size check is performed. An attacker who can trigger an online resize on the filesystem while simultaneously performing a lockless lookup of ext4_get_group_info() may cause the kernel to read memory beyond the allocated array. This out‑of‑bounds read can leak sensitive kernel memory contents, potentially enabling information disclosure or further exploitation. The flaw is a classic race‑based out‑of‑bounds read (CWE‑680).

Affected Systems

All Linux kernels prior to the applied fix are affected, regardless of distribution. The issue is present in any system where the kernel’s ext4 module is loaded and online file system resizing is enabled.

Risk and Exploitability

The vulnerability carries a high impact due to possible kernel memory disclosure. The EPSS score is not available and the advisory is not listed in the CISA KEV catalog, but the flaw is still exploitable when an attacker can execute the EXT4_IOC_GROUP_ADD ioctl and concurrently read group information. The attack requires local privileged access—or an attacker with the ability to grant such privileges—to perform the ioctl, making the risk moderate to high for unpatched systems. Updating the kernel mitigates the issue. In the absence of an immediate patch, monitoring for suspicious ext4_resize_begin activity and restricting ioctl usage is recommended.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel update that contains the ext4_get_group_info() fix
  • If the system must remain on an older kernel, restrict access to the EXT4_IOC_GROUP_ADD ioctl to privileged users only
  • Consider disabling online filesystem resizing with mount options or system configuration to reduce the attack surface

Generated by OpenCVE AI on November 30, 2026 at 17:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
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.
Title ext4: fix out-of-bounds read in ext4_get_group_info()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

No weakness.

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:25 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM