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

CVE-2026-98539: Linux Kernel NTFS3 Race Condition Vulnerability

CVE-2026-98539 is a race condition flaw in the Linux kernel NTFS3 filesystem that causes lock corruption during concurrent directory operations. This post explains its technical details, system impact, and mitigation steps.

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-98539 Overview

CVE-2026-98539 is a race condition in the Linux kernel fs/ntfs3 filesystem driver. The flaw lives in ntfs_create_inode(), which calls d_instantiate() on a dentry while the new inode is still marked I_NEW. A concurrent path walk can lock the inode before unlock_new_inode() runs. When unlock_new_inode() later invokes lockdep_annotate_inode_mutex_key() on a directory inode, it reinitializes i_rwsem via init_rwsem(), destroying ownership metadata for a lock another task already holds.

Critical Impact

Concurrent mkdir() and mount() operations on an ntfs3 filesystem can corrupt i_rwsem state, triggering kernel warnings and causing subsequent inode_lock() callers to hang indefinitely.

Affected Products

  • Linux kernel fs/ntfs3 filesystem driver
  • Stable kernel branches referenced in the fix commits 1abd643, 1ae2a24, 37ec735, and 6fda712
  • Systems that mount NTFS volumes using the native ntfs3 driver

Discovery Timeline

  • 2026-10-18 - CVE-2026-98539 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98539

Vulnerability Analysis

The defect is a [CWE-362] race condition between filesystem object creation and concurrent VFS operations. ntfs_create_inode() allocates a new inode via ntfs_new_inode() and hashes it with insert_inode_locked(), leaving the I_NEW flag set until unlock_new_inode() is called. Between hashing and unlocking, the function calls d_instantiate(), which exposes the dentry to the dcache.

Because the parent dentry was already hashed by the lookup preceding the create, any concurrent path walk can locate the new dentry without acquiring the parent's i_rwsem. That walker can then take inode_lock() on the new directory inode. When unlock_new_inode() finally executes, lockdep_annotate_inode_mutex_key() calls init_rwsem(&inode->i_rwsem) to apply the i_mutex_dir_key class, zeroing the owner and count of a lock another task already holds.

Root Cause

The root cause is improper ordering of dentry instantiation and inode state finalization. Using d_instantiate() on an I_NEW inode permits lookups to acquire the inode's i_rwsem before the kernel reinitializes it for the directory lock class. On PREEMPT_RT kernels the same race surfaces as DEBUG_LOCKS_WARN_ON(rt_mutex_owner(lock) != current) in rt_mutex_slowunlock.

Attack Vector

Exploitation requires local access to a mounted ntfs3 filesystem and the ability to run concurrent mkdir() and mount() operations against the same path. The syzbot reproducer chdirs into a freshly mounted ntfs3 image, issues mkdir("./sys"), and races it with mount(NULL, "./sys", "sysfs"). The resulting up_write() underflows the reset count, after which any subsequent inode_lock() or inode_lock_shared() on the directory deadlocks. The practical impact is local denial of service rather than code execution.

The fix switches ntfs_create_inode() to d_instantiate_new() and removes the trailing unlock_new_inode(). All error paths exit before that point with I_NEW still set and continue using discard_new_inode().

Detection Methods for CVE-2026-98539

Indicators of Compromise

  • Kernel warnings referencing WARNING in do_new_mount or __up_write in kernel/locking/rwsem.c:1368.
  • DEBUG_RWSEMS_WARN_ON messages reporting a zero count and null owner for an inode rwsem.
  • On PREEMPT_RT builds, DEBUG_LOCKS_WARN_ON(rt_mutex_owner(lock) != current) emitted from rt_mutex_slowunlock.
  • Processes hung in D state inside inode_lock() or lookup_slow() after activity against an ntfs3 mount.

Detection Strategies

  • Query dmesg and persistent kernel logs for the warning signatures above across hosts that mount NTFS volumes with the ntfs3 driver.
  • Monitor task state for long-lived uninterruptible sleeps on paths beneath ntfs3 mount points, especially directories created shortly before the hang.
  • Audit kernel build versions against the stable commits 1abd643f3783, 1ae2a242c15b, 37ec7353f4ac, and 6fda7121cb6a to identify unpatched systems.

Monitoring Recommendations

  • Forward kernel ring buffer events to a central log pipeline and alert on WARNING in do_new_mount or rwsem underflow messages.
  • Track mount, unmount, and mkdir syscall telemetry against ntfs3 filesystems to spot workloads that trigger the race.
  • Correlate hung-task watchdog output (hung_task_timeout_secs) with filesystem type to surface deadlocks caused by this defect.

How to Mitigate CVE-2026-98539

Immediate Actions Required

  • Apply the upstream fs/ntfs3 fix that replaces d_instantiate() with d_instantiate_new() in ntfs_create_inode().
  • Rebuild or update the kernel to a stable release that incorporates commits 1abd643f3783, 1ae2a242c15b, 37ec7353f4ac, or 6fda7121cb6a.
  • Restrict local users who can create directories on ntfs3 mounts until patched kernels are deployed.

Patch Information

The fix is distributed across the stable kernel tree. Review the upstream commits for the exact changes: Linux Kernel Commit 1abd643, Linux Kernel Commit 1ae2a24, Linux Kernel Commit 37ec735, and Linux Kernel Commit 6fda712. The patch calls d_instantiate_new() after insert_inode_locked() and drops the trailing unlock_new_inode() so the I_NEW state is cleared atomically with dentry instantiation.

Workarounds

  • Avoid mounting untrusted NTFS media with the ntfs3 driver on unpatched kernels; use the FUSE-based ntfs-3g driver as an interim alternative where feasible.
  • Prevent unprivileged users from creating directories or performing concurrent mounts beneath ntfs3 mount points.
  • Disable automatic mounting of removable NTFS devices until the stable kernel update is installed.
bash
# Verify the running kernel contains the fix
uname -r
git -C /usr/src/linux log --oneline | grep -E '1abd643|1ae2a24|37ec735|6fda712'

# Temporary alternative: mount NTFS volumes via ntfs-3g instead of ntfs3
mount -t ntfs-3g /dev/sdX1 /mnt/ntfs

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.