Bug 2527981 - CVE-2026-71219 gfs2-utils: gfs2-utils: stack overflow via alloca(1<<di_depth) in hash table traversal [fedora-all]
Summary: CVE-2026-71219 gfs2-utils: gfs2-utils: stack overflow via alloca(1<<di_depth)...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gfs2-utils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Andrew Price
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: {"flaws": ["da400d38-ce58-453a-b14b-7...
Depends On:
Blocks: CVE-2026-71219
TreeView+ depends on / blocked
 
Reported: 2026-09-03 11:41 UTC by Samuele Negrini
Modified: 2026-09-03 11:41 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Samuele Negrini 2026-09-03 11:41:25 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

A flaw was found in gfs2-utils. The hash table traversal code in fsck.gfs2 (metawalk.c) uses alloca(1 << di_depth) where di_depth is a uint16 field read directly from on-disk directory inode metadata without bounds validation. An attacker can craft a GFS2 filesystem image with a large di_depth value (e.g., 24+) that causes an exponentially large stack allocation (1 << 24 = 16M entries * 8 bytes = 128MB), far exceeding the default 8MB stack limit and crashing the process with SIGSEGV.

Additionally, for di_depth >= 31 on platforms where int is 32 bits, the expression 1 << di_depth invokes undefined behavior (signed integer overflow per C11 6.5.7p4), which may produce a small or wrapped alloca result rather than a large one, with unpredictable consequences.

The Linux kernel GFS2 driver validates i_depth in gfs2_dinode_in() (see CVE-2025-38710), but the userspace gfs2-utils performs no equivalent validation. This affects fsck.gfs2, gfs2_edit, and savemeta when processing directory metadata from crafted images.


Note You need to log in before you can comment on or make changes to this bug.