CVE-2026-139020

gfs2: reject invalid inode sizes

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

gfs2: reject invalid inode sizes

A corrupted GFS2 image can store a dinode size that is larger than what VFS
i_size can represent. gfs2_dinode_in() reads the on-disk di_size as a u64 and
writes it directly into inode->i_size. If the value is larger than S64_MAX, the
incore i_size becomes negative. That negative value can bypass the existing
stuffed inode size check:

inode->i_size > gfs2_max_stuffed_size(ip)

Later, gfs2_quotad may try to sync the quota file and unstuff the quota inode.
gfs2_unstuffer_folio() reads the negative i_size into an unsigned length and
passes it to memcpy(), turning it into a huge copy size and triggering a
out-of-bound issue.

Reject dinodes whose size exceeds sb->s_maxbytes before storing the value in
inode->i_size. Also make the stuffed inode check use the raw on-disk size while
it is still unsigned.

Analysis

AI-generated

Technical impact

A malformed GFS2 filesystem can store an inode size larger than the signed 64‑bit maximum. The kernel reads this value directly into inode->i_size, turning it into a negative number. When subsequent quota sync code treats that value as an unsigned length for a memcpy, a massive copy is performed, overrunning the target buffer and corrupting memory. The flaw can cause arbitrary code execution, kernel panic, or silent data corruption, impacting confidentiality, integrity, and availability.

Affected Systems

The vulnerability affects Linux kernel versions that implement the GFS2 filesystem. Any distribution exposing a vulnerable GFS2 driver may be susceptible. Exact version ranges are not listed, but the fix is present in newer kernel releases that reject oversized dinodes before conversion.

Risk and Exploitability

The EPSS score is unavailable and the issue is not listed in the CISA KEV catalog. Without an explicit CVSS score, the severity cannot be quantified, but the nature of the flaw—an uncontrolled memory copy—implies high potential damage if exploited locally on a system that mounts a corrupted GFS2 volume. The likely attack vector is a local attacker supplying a malicious GFS2 image or causing the system to re‑mount a tampered volume.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a release that contains the GFS2 inode size validation patch.
  • If an immediate kernel update is not possible, remount or unmount the GFS2 volume as read‑only to prevent the quota sync from executing the unsafe memcpy.
  • Confirm that the patched kernel does not exhibit the signed-to‑unsigned conversion flaw by running controlled tests with corrupted GFS2 images.

Generated by OpenCVE AI on November 30, 2026 at 18:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-122
CWE-180
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: gfs2: reject invalid inode sizes A corrupted GFS2 image can store a dinode size that is larger than what VFS i_size can represent. gfs2_dinode_in() reads the on-disk di_size as a u64 and writes it directly into inode->i_size. If the value is larger than S64_MAX, the incore i_size becomes negative. That negative value can bypass the existing stuffed inode size check: inode->i_size > gfs2_max_stuffed_size(ip) Later, gfs2_quotad may try to sync the quota file and unstuff the quota inode. gfs2_unstuffer_folio() reads the negative i_size into an unsigned length and passes it to memcpy(), turning it into a huge copy size and triggering a out-of-bound issue. Reject dinodes whose size exceeds sb->s_maxbytes before storing the value in inode->i_size. Also make the stuffed inode check use the raw on-disk size while it is still unsigned.
Title gfs2: reject invalid inode sizes
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

  • CWE-180

    Incorrect Behavior Order: Validate Before Canonicalize

Sources

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