CVE-2026-99171: ntfs3: free the sbi after a grace period
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. ntfsputsuper() and ntfs3killsb() 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 ntfsdhash() while the last reference to the mount goes away:
BUG: KASAN: slab-use-after-free in ntfsnlstoutf16+0x752/0x940 Read of size 8 at addr ff1100010453c850 by task walker/99 Call Trace: <TASK> ntfsnlstoutf16+0x752/0x940 ntfsdhash+0x22b/0x500 linkpathwalk+0x11ad/0x1d30 pathlookupat+0x63/0xb00 filenamelookup+0x1f1/0x5b0 vfsstatx+0xd7/0x3b0 [...] Allocated by task 95: kmalloccachenoprof+0x249/0x560 ntfsinitfscontext+0x2db/0x5a0 allocfscontext+0x52e/0xc70 [...] Freed by task 98: kfree+0x1db/0x5b0 deactivatelockedsuper+0x9c/0xf0 cleanupmnt+0x9f/0x130 taskworkrun+0x131/0x250
The bug is currently masked by the grace period in namespaceunlock() for umount(2). Keep the necessary information until the filesystem private info is freed and free it with an rcu delay.
ntfs3freesbi() now runs from an rcu callback and drops the upcase table via ntfsputshared(). So switch ssharedlock over to spinlockbh(). Otherwise the callback can deadlock against a task holding the lock on the same cpu.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.161 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.115 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.59 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.13 - Upgrade
Upgrade
azurelinux/kernelto a version that resolves this vulnerability.Fixed in 6.6.161.1-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.13-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.115-2~deb12u1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.3.0-10.10 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 7.3.0-1004.5 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 7.3.0-10.10.1 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.3.0-10.10.1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.117-1Fixed in 7.3.4-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.117-1~deb12u1
Event History
Frequently Asked Questions
Which mounts are exposed to this use-after-free path?
The vulnerable path applies to ntfs3 mounts using the "nocase" mount option, which enables custom hash and dentry comparison functions that access ntfs3 superblock private information during RCU pathwalk.
What race is required to trigger the issue?
A filesystem lookup must still be in the ntfs3 pathwalk, such as in ntfs_d_hash(), while the last reference to the mount is dropped and the superblock private information is freed.
Is there any existing behavior that reduces practical exposure?
The issue is currently masked for umount(2) by the grace period in namespace_unlock(). The described fix keeps the required information until an appropriate grace period has elapsed.