CVE-2026-139704

gfs2: Fix journaled truncate range end offset

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: Fix journaled truncate range end offset

The third argument to truncate_pagecache_range() is the inclusive end
offset, but gfs2_journaled_truncate_range() passes the length of each
chunk. A hole punch at an offset larger than its length therefore
creates an inverted range.

Commit 86066914edff ("gfs2: Don't support fallocate on jdata files")
disables fallocate for jdata files. Otherwise, the following bug
could occur:

The MM truncation path then underflows the unsigned partial-folio
length and passes an oversized range to folio_zero_range(), triggering
a BUG. Pass the last byte of the chunk so page-cache invalidation
covers the intended range.

Analysis

AI-generated

Technical impact

An error in the GFS2 filesystem’s truncate routine incorrectly passes the chunk length as the inclusive end offset to truncate_pagecache_range(). The resulting inverted range underflows an unsigned length value, causing folio_zero_range to receive an oversized argument and trigger a BUG, which terminates the kernel. An attacker who can write to a jdata file and invoke fallocate on an offset larger than the file’s length can therefore cause a local system crash, denying service for all users on the affected host.

Affected Systems

All Linux kernels that contain the buggy GFS2 implementation before the patch that disables fallocate for jdata files. No specific release line is listed, but the vulnerability is present in kernels that have not applied commit 86066914edff.

Risk and Exploitability

The attack is local; it requires the ability to perform a hole punch on a jdata file using fallocate at a legitimate offset. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. Because the flaw leads directly to a kernel crash rather than privilege escalation or data exfiltration, the primary risk is denial of service, and the likelihood of exploitation is dependent on the presence of writable jdata files and the use of fallocate.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes commit 86066914edff, which disables fallocate on jdata files and fixes the inverted range bug.
  • If an immediate kernel upgrade is not feasible, configure the system so that fallocate cannot be executed on jdata files—this can be achieved by removing or restricting the fallocate capability for the users or by using filesystem‑level ACLs to prevent write operations on those files.
  • After applying the patch or configuration change, review kernel logs for BUG messages and run a kernel‑level stability test to confirm that the crash no longer occurs.

Generated by OpenCVE AI on December 1, 2026 at 01:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-191
CWE-193
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: gfs2: Fix journaled truncate range end offset The third argument to truncate_pagecache_range() is the inclusive end offset, but gfs2_journaled_truncate_range() passes the length of each chunk. A hole punch at an offset larger than its length therefore creates an inverted range. Commit 86066914edff ("gfs2: Don't support fallocate on jdata files") disables fallocate for jdata files. Otherwise, the following bug could occur: The MM truncation path then underflows the unsigned partial-folio length and passes an oversized range to folio_zero_range(), triggering a BUG. Pass the last byte of the chunk so page-cache invalidation covers the intended range.
Title gfs2: Fix journaled truncate range end offset
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-191

    Integer Underflow (Wrap or Wraparound)

  • CWE-193

    Off-by-one Error

Sources

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