CVE-2026-99814: fs/ntfs3: validate $SDH entry size in ntfs_insert_security
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: validate $SDH entry size in ntfsinsertsecurity
ntfsinsertsecurity() walks the $Secure::$SDH index and reads e->sechdr.size for every entry returned by indxfind()/indxfindsort(). Those only guarantee the NTFSDE envelope (e->size), so a crafted $SDH entry shorter than a full NTFSDESDH at the tail of an index buffer makes the read of e->sechdr.size run past the allocation. Triggerable by an unprivileged setxattr(2) on a crafted NTFS image.
BUG: KASAN: slab-out-of-bounds in ntfsinsertsecurity (fs/ntfs3/fsntfs.c:2148) Read of size 4 at addr ffff88800fa1de00 by task exploit/142 ntfsinsertsecurity (fs/ntfs3/fsntfs.c:2148) ntfssetxattr (fs/ntfs3/xattr.c:947) vfssetxattr (fs/xattr.c:223) vfssetxattrnoperm (fs/xattr.c:257) vfssetxattr (fs/xattr.c:344) filenamesetxattr (fs/xattr.c:690) pathsetxattrat (fs/xattr.c:734) x64syssetxattr (fs/xattr.c:764) [...] The buggy address is located 0 bytes to the right of allocated 512-byte region [ffff88800fa1dc00, ffff88800fa1de00)
Stop the scan when an entry is too small to hold a SECURITYHDR.
Affected Software
Event History
Frequently Asked Questions
Who can trigger this issue?
An unprivileged user can trigger it with setxattr(2), but the operation must target a crafted NTFS image containing a malformed $Secure::$SDH index entry.
What conditions are required for exploitation?
The vulnerable ntfs3 code must process a crafted $SDH entry that fits within the NTFS_DE envelope but is too short to contain a full SECURITY_HDR. The attacker then invokes setxattr(2), causing ntfs_insert_security() to read past the allocated index buffer.
What can be done before applying the fix?
Avoid mounting or allowing untrusted users to modify crafted or untrusted NTFS images, particularly where they can invoke setxattr(2) on those filesystems. The fix stops the scan when an entry is too small to hold a SECURITY_HDR.
How might an affected system present during testing?
The provided report shows KASAN detecting a slab-out-of-bounds read of size 4 in ntfs_insert_security(), reached through ntfs_setxattr and the setxattr system call. The read occurs immediately past a 512-byte allocated region.