CVE-2026-142892: ntfs3: release ni_lock before dir_emit in ntfs_readdir to fix deadlocks
In the Linux kernel, the following vulnerability has been resolved:
ntfs3: release nilock before diremit in ntfsreaddir to fix deadlocks
ntfsreaddir() holds nilock while calling ntfsreadhdr(), which calls diremit() to copy directory entries to userspace. If the user buffer triggers a page fault, the fault handler may need mmaplock or mapping->invalidatelock, creating lock-order inversions with paths that acquire those locks before nilock (e.g. ntfsfallocate, mmap).
Fix by releasing nilock before calling ntfsreadhdr():
- For non-root index nodes, indxreadra() returns data in a kmalloc'd buffer (node->index) that remains valid after niunlock.
- For the root index header, the data lives in the main MFT record whose lifetime is bound to the inode. irwsem shared prevents concurrent directory modifications, so it is safe to access after niunlock.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
In ntfs3, release ni_lock before calling dir_emit() in ntfs_readdir().
Event History
Frequently Asked Questions
What conditions are required to trigger the deadlock?
A process must read an NTFS3 directory such that copying directory entries to its userspace buffer causes a page fault. The fault-handling path must then contend for mmap_lock or mapping->invalidate_lock while ni_lock is held, creating a lock-order inversion with NTFS3 paths such as fallocate or mmap.
Which systems are exposed?
Systems using the Linux kernel NTFS3 filesystem driver are exposed when they access NTFS directories. The issue is specifically in directory reads through ntfs_readdir().
Is there a workaround if an updated kernel cannot be deployed immediately?
The provided information does not identify a configuration-only workaround. Reducing or avoiding concurrent NTFS3 directory reads with NTFS3 mmap or fallocate activity may reduce exposure to the described lock inversion, but this is not stated as a complete mitigation.