HIGH Introduced in 7.1
ntfs SetAttr Race
CVE-2026-99102
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: ntfs: take invalidate_lock in ntfs_setattr_size() ntfs_setattr_size() updates i_size and resizes the on-disk attribute without holding mapping->invalidate_lock. Page faults take the lock shared, so a fault racing the resize can resolve a VCN against the transient runlist state of ntfs_non_resident_attr_expand() and fail with a spurious SIGBUS, and can interleave with the size-change epilogue (truncate_pagecache(), i_size_write(), pagecache_isize_extended()). Take invalidate_lock exclusively around the whole resize after inode_dio_wait(), matching the fallocate path and other filesystems such as xfs, which wraps truncate in its mmaplock (= invalidate_lock).
02KernelScan AI Analysis
Risk summary
A local user with write access to an NTFS filesystem can trigger a race condition between file size changes (truncate/extend) and concurrent page faults, causing spurious SIGBUS crashes, potential data corruption, or memory access errors. The vulnerability affects any system with an NTFS volume mounted and is exploitable from unprivileged contexts including containers.
Vulnerability analysis
The ntfs_setattr_size() function modifies a file's size and updates the on-disk attribute without holding the mapping's invalidate_lock. Page faults acquire this lock in shared mode, so a concurrent fault can observe the filesystem's transient runlist state during attribute expansion, leading to incorrect VCN resolution and a spurious SIGBUS. The fault can also interleave with the size-change epilogue (truncate_pagecache, i_size_write, pagecache_isize_extended), creating a window for memory access errors or data corruption. The fix serializes the entire resize operation by taking invalidate_lock exclusively after waiting for direct I/O, matching the synchronization used by fallocate and other filesystems such as XFS. Any local user who can write to a file on a mounted NTFS volume — including processes inside containers or user namespaces — can trigger this race by concurrently memory-mapping the file and changing its size.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 7.2 | 7.1 | 7.2.13 | f0b0738ba957 |
| mainline | 7.1 | 7.3 | 9cc5761b8f28 |