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

Published Nov 30, 2026
·
Updated

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

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

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

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

CPU 0 (Writer, Resize Lock) CPU 1 (Reader, Lockless) --------------------------- ------------------------ ext4ioctl() [EXT4IOCGROUPADD] ext4ioctlgroupadd() ext4resizebegin() // Takes lock ext4groupadd() ext4mballocgroupinfo() // Publishes expanded array via RCU rcuassignpointer(sgroupinfo, ...)

ext4flexgroupadd() ext4updatesuper() ext4getgroupinfo() // Speculative / out-of-order read [Loads old/smaller sgroupinfo pointer] [Plain C store / smpwmb()] sbi->sgroupscount += ...; // Reads new sgroupscount, // boundary check passes if (group >= sgroupscount)

// Out-of-bounds array access! sbiarrayrcuderef(..., sgroupinfo)

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

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In ext4_get_group_info(), use ext4_get_groups_count() to enforce acquire semantics when reading s_groups_count.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:25 PM
Data Sourced
via MITRE·01:25 PM
Description

Frequently Asked Questions

1

What conditions are required for this issue to occur?

The affected ext4 filesystem must undergo a concurrent online resize that expands the group-info array while another CPU performs a lockless metadata lookup. The problematic ordering is described for weak memory models, where the reader can observe a new group count with an old, smaller array pointer.

2

Which resize operation is involved in the race?

The writer side is the ioctl configuration path using EXT4_IOC_GROUP_ADD. It takes the resize lock, publishes an expanded s_group_info array through RCU, and then increases s_groups_count while lockless readers may still observe stale array state.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203