HIGH Introduced in 6.2
ntfs3 Nocase UAF
CVE-2026-99171
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: ntfs3: free the sbi after a grace period If the "nocase" mount option ntfs3 uses custom hash and dentry compare functions. Both access ntfs3 superblock private information in rcu pathwalk. ntfs_put_super() and ntfs3_kill_sb() drop the info without any rcu delay. A lookup that's still inside the filesystem when the last reference to the mount is dropped causes a UAF. With a pathwalk held up in ntfs_d_hash() while the last reference to the mount goes away: BUG: KASAN: slab-use-after-free in ntfs_nls_to_utf16+0x752/0x940 Read of size 8 at addr ff1100010453c850 by task walker/99 Call Trace: <TASK> ntfs_nls_to_utf16+0x752/0x940 ntfs_d_hash+0x22b/0x500 link_path_walk+0x11ad/0x1d30 path_lookupat+0x63/0xb00 filename_lookup+0x1f1/0x5b0 vfs_statx+0xd7/0x3b0 [...] Allocated by task 95: __kmalloc_cache_noprof+0x249/0x560 ntfs_init_fs_context+0x2db/0x5a0 alloc_fs_context+0x52e/0xc70 [...] Freed by task 98: kfree+0x1db/0x5b0 deactivate_locked_super+0x9c/0xf0 cleanup_mnt+0x9f/0x130 task_work_run+0x131/0x250 The bug is currently masked by the grace period in namespace_unlock() for umount(2). Keep the necessary information until the filesystem private info is freed and free it with an rcu delay. ntfs3_free_sbi() now runs from an rcu callback and drops the upcase table via ntfs_put_shared(). So switch s_shared_lock over to spin_lock_bh(). Otherwise the callback can deadlock against a task holding the lock on the same cpu.
02KernelScan AI Analysis
Risk summary
A local attacker with CAP_SYS_ADMIN in a user namespace can trigger a use-after-free in the NTFS3 filesystem by mounting a volume with the 'nocase' option and racing a concurrent pathwalk against unmount. This leads to kernel memory corruption, enabling privilege escalation or denial of service. Systems running untrusted workloads in user namespaces or with exposed USB/SD media ports are at highest risk.
Vulnerability analysis
When an NTFS3 filesystem is mounted with the 'nocase' option, the filesystem installs custom dentry hash and compare functions that read the superblock's upcase table and NLS data during RCU-protected pathwalk. The original code freed this superblock private data immediately in ntfs_put_super() and ntfs3_kill_sb() without waiting for an RCU grace period. If a pathwalk was inside those dentry operations when the last mount reference was dropped, the superblock info would be freed while still in use, causing a use-after-free. The fix moves the superblock teardown into an RCU callback so the memory remains valid until all pre-existing RCU readers complete. It also changes the shared upcase table lock to a bottom-half spinlock to prevent deadlock when the RCU callback releases the upcase table. The bug is reachable by any local user who can mount an NTFS3 filesystem with 'nocase' — typically via a user namespace with CAP_SYS_ADMIN, a malicious USB/SD storage device, or a loopback mount — making container hosts and multi-tenant systems the primary exposure.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 6.2 | 6.12.115 | 36e6753daf9b |
| 6.18 | 6.2 | 6.18.59 | c8b1a4840467 |
| 6.6 | 6.2 | 6.6.161 | c39150784a80 |
| 7.2 | 6.2 | 7.2.13 | 7abecef26a9b |
| mainline | 6.2 | 7.3 | c01b091b0641 |
| cip/6.12 | 6.2 | 6.12.117-cip35 | 36e6753daf9b |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.117-cip35 |