Skip to main content
Vulnerability Database/CVE-2026-97487

CVE-2026-97487: Linux Kernel JFS Buffer Overflow Vulnerability

CVE-2026-97487 is a buffer overflow vulnerability in the Linux kernel JFS filesystem that occurs when handling block sizes larger than PAGE_SIZE. This article covers technical details, affected versions, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-97487 Overview

CVE-2026-97487 is a Linux kernel vulnerability in the Journaled File System (JFS) implementation. The flaw stems from JFS failing to handle set_blocksize failures correctly. JFS uses buffer_heads, which do not handle block sizes greater than PAGE_SIZE well. Mounting a crafted or incompatible JFS volume triggers a BUG_ON(offset >= folio_size(folio)) assertion inside folio_set_bh on the first __bread_gfp call. The result is a kernel panic driven by an unchecked error condition during filesystem mount.

Critical Impact

A local user capable of mounting a JFS filesystem can trigger a kernel BUG_ON, causing a denial-of-service condition on the affected host.

Affected Products

  • Linux kernel versions containing the vulnerable JFS set_blocksize call path
  • Distributions shipping JFS as a loadable module prior to the fix commits
  • Systems that permit mounting of untrusted JFS block devices or images

Discovery Timeline

  • 2026-09-24 - CVE-2026-97487 published to NVD
  • 2026-09-28 - Last updated in NVD database

Technical Details for CVE-2026-97487

Vulnerability Analysis

The defect lives in the JFS mount path within the Linux kernel. JFS relies on the legacy buffer_head layer to read on-disk metadata. The buffer_head layer assumes block sizes less than or equal to the system PAGE_SIZE. When set_blocksize is invoked with an incompatible block size and its return value is ignored, subsequent I/O proceeds against an inconsistent state. The next __bread_gfp call reaches folio_set_bh, where an invariant check fires: BUG_ON(offset >= folio_size(folio)). The kernel then aborts execution of the current task, producing an oops or panic depending on configuration.

This class of issue falls under Kernel Vulnerability and Denial of Service through an unchecked return value during filesystem initialization.

Root Cause

The root cause is missing error handling around set_blocksize inside the JFS mount routine. The function can fail when a filesystem advertises a block size greater than PAGE_SIZE, but JFS continued past the failure. Downstream code then operated on a buffer-head configuration that violated the folio size invariant enforced by the modern block layer.

Attack Vector

Exploitation requires the ability to mount a JFS filesystem. The attack surface includes crafted disk images, removable media mounted automatically by desktop daemons, and container or virtualization workflows that expose block devices to lower-privileged users. Successful mounting of a malformed JFS volume triggers the BUG_ON and halts the offending kernel thread, producing a reliable denial-of-service condition.

No verified public exploit code is available. The upstream fix is distributed across three stable commits: 05107f5, 153374e, and a0ac22a.

Detection Methods for CVE-2026-97487

Indicators of Compromise

  • Kernel log entries containing BUG_ON(offset >= folio_size(folio)) originating from folio_set_bh
  • Oops or panic traces referencing __bread_gfp within the JFS mount path
  • Unexpected mount attempts of JFS filesystems from removable media or user-supplied disk images

Detection Strategies

  • Collect kernel ring buffer output through journalctl -k or dmesg and alert on JFS-related oops signatures.
  • Monitor mount syscalls with filesystem type jfs using auditd or eBPF-based telemetry.
  • Correlate kernel crash reports with the user, process, and device path that initiated the mount.

Monitoring Recommendations

  • Forward kernel logs to a centralized logging platform and build detections for folio_set_bh panics.
  • Track loaded kernel modules and flag unexpected loads of the jfs module on hosts that do not require it.
  • Review automated mount policies for udisks, systemd, and container runtimes that may expose the vulnerable code path.

How to Mitigate CVE-2026-97487

Immediate Actions Required

  • Apply distribution kernel updates that incorporate the upstream JFS set_blocksize fix.
  • Blacklist the jfs kernel module on systems that do not require JFS support.
  • Restrict mount privileges to trusted administrators and disable automatic mounting of untrusted block devices.

Patch Information

The vulnerability is resolved by the following upstream commits: 05107f5, 153374e, and a0ac22a. The fix adds proper handling of set_blocksize return values so that JFS aborts mount cleanly instead of proceeding into the broken buffer-head path.

Workarounds

  • Prevent loading of the JFS module by adding blacklist jfs to /etc/modprobe.d/ configuration.
  • Remove jfs from /etc/filesystems and from /proc/filesystems where supported to prevent automount handlers from selecting it.
  • Disable user-initiated mounting via udisks policies and restrict CAP_SYS_ADMIN within unprivileged user namespaces.
bash
# Blacklist the JFS kernel module to prevent automatic loading
echo 'blacklist jfs' | sudo tee /etc/modprobe.d/blacklist-jfs.conf
sudo depmod -a

# Verify the module is not currently loaded
lsmod | grep jfs

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.