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-98135 Overview
CVE-2026-98135 is a vulnerability in the Linux kernel's NTFS filesystem driver. The flaw resides in is_boot_sector_ntfs(), which validates the sectors_per_cluster field in an NTFS boot sector. The existing range check rejects values between 0x81 and 0xf3 but accepts zero and other non-power-of-two values. A zero value propagates to parse_ntfs_boot_sector() in fs/ntfs/super.c, where ffs(0) - 1 produces (unsigned)-1 and triggers an undefined shift operation. The Undefined Behavior Sanitizer (UBSAN) reports a shift-out-of-bounds condition when a crafted NTFS image is mounted.
Critical Impact
Mounting a maliciously crafted NTFS filesystem image triggers undefined behavior in the kernel, potentially leading to kernel instability or denial of service.
Affected Products
- Linux kernel versions containing the NTFS legacy driver (fs/ntfs/super.c)
- Distributions shipping the in-tree NTFS read-only driver
- Systems that permit mounting untrusted NTFS images or removable media
Discovery Timeline
- 2026-09-25 - CVE-2026-98135 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-98135
Vulnerability Analysis
The vulnerability affects the NTFS boot sector validation path in the Linux kernel. The function is_boot_sector_ntfs() performs a bounds check on the sectors_per_cluster byte, rejecting the range 0x81..0xf3. The check does not verify the value is a power of two, and does not reject zero. Any non-power-of-two value, including 0, passes validation and reaches cluster-size computation.
In parse_ntfs_boot_sector() at fs/ntfs/super.c:673, the kernel computes sectors_per_cluster_bits = ffs(sectors_per_cluster) - 1 and uses the result as a shift exponent: vol->cluster_size = vol->sector_size << sectors_per_cluster_bits. When the input is zero, ffs(0) returns 0, producing a shift exponent of 4294967295. The resulting shift on a 32-bit int is undefined behavior under the C standard and is flagged by UBSAN.
Root Cause
The root cause is incomplete input validation [CWE-20] of attacker-controlled filesystem metadata. The validation routine assumes the sectors_per_cluster field is well-formed and never zero, but it does not enforce the power-of-two requirement implicit in the downstream ffs()-based bit calculation. The mismatch between accepted values and values the arithmetic can safely process produces a shift-count overflow.
Attack Vector
An attacker supplies a crafted NTFS image, for example on a USB device, loopback mount, or disk image, with a sectors_per_cluster field set to zero or another non-power-of-two value. When a privileged process or an auto-mounting service mounts the image, the kernel executes the invalid shift. The result is undefined behavior that can lead to incorrect cluster-size state or kernel-level anomalies affecting availability.
See the upstream fix in the Kernel Git Commit 323751a and the companion Kernel Git Commit 7524c3 for the exact validation change.
Detection Methods for CVE-2026-98135
Indicators of Compromise
- UBSAN kernel log entries referencing shift-out-of-bounds in fs/ntfs/super.c:673 with a shift exponent of 4294967295.
- Kernel oops, warning, or dmesg traces originating from parse_ntfs_boot_sector() following an NTFS mount attempt.
- Mount operations against NTFS images from untrusted removable media or user-supplied disk images.
Detection Strategies
- Monitor /var/log/kern.log and journalctl -k for UBSAN messages tied to fs/ntfs/super.c.
- Audit mount syscalls with filesystem type ntfs originating from non-administrative contexts or auto-mount daemons such as udisks2.
- Inspect the first 512 bytes of NTFS images for a sectors_per_cluster byte at offset 0x0D that is zero or not a power of two.
Monitoring Recommendations
- Collect kernel ring buffer data from Linux endpoints and forward it to a central analytics platform for correlation of UBSAN and filesystem driver faults.
- Alert on repeated NTFS mount failures from the same device identifier or user session.
- Track insertion of removable storage followed immediately by kernel filesystem driver errors.
How to Mitigate CVE-2026-98135
Immediate Actions Required
- Apply the upstream kernel patches referenced in Kernel Git Commit 323751a and Kernel Git Commit 7524c3 once distribution packages become available.
- Restrict the ability of unprivileged users to mount NTFS filesystems from removable media.
- Disable NTFS auto-mounting on servers and workstations that do not require it.
Patch Information
The fix updates is_boot_sector_ntfs() to reject any sectors_per_cluster value that is not a power of two. This aligns the validation with the arithmetic performed by ffs(sectors_per_cluster) - 1 in parse_ntfs_boot_sector(), eliminating the undefined shift. Rebuild and deploy kernels incorporating the referenced commits across affected distributions.
Workarounds
- Blacklist the legacy ntfs kernel module where NTFS support is not required by using modprobe configuration to prevent loading.
- Where NTFS access is needed, prefer the userspace ntfs-3g FUSE driver, which does not share this code path.
- Enforce administrator-only mounting policies in udisks2 or equivalent auto-mount services to block untrusted media handling.
# Prevent the in-tree NTFS driver from loading
echo "blacklist ntfs" | sudo tee /etc/modprobe.d/disable-ntfs.conf
sudo update-initramfs -u
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

