CVE-2026-99812: fs/ntfs3: fix slab-out-of-bounds write in attr_insert_range()
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: fix slab-out-of-bounds write in attrinsertrange()
When fallocate(FALLOCFLINSERTRANGE) grows a still-resident ntfs3 attribute, attrinsertrange() shifts the inline data using the insert length 'bytes' as both the destination offset and the copy size:
memmove(data + bytes, data, bytes);
Both are wrong: the shift must start at the insertion point 'vbo' and move only the data past it (datasize - vbo). When bytes > datasize the memmove runs off the end of the datasize + bytes buffer and overflows the adjacent slab object.
Since vbo < datasize is already enforced above, the reworked offsets stay within the datasize + bytes buffer and cannot under/overflow.
BUG: KASAN: slab-out-of-bounds in attrinsertrange (fs/ntfs3/attrib.c:2581) Write of size 512 at addr ffff8880135e8b10 by task exploit/142 ... asanmemmove (mm/kasan/shadow.c:95) attrinsertrange (fs/ntfs3/attrib.c:2581) ntfsfallocate (fs/ntfs3/file.c:618) vfsfallocate (fs/open.c:338) x64sysfallocate (fs/open.c:362) ...
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger the out-of-bounds write?
An attacker or local process must invoke fallocate with FALLOC_FL_INSERT_RANGE against an ntfs3 attribute that remains resident. The insertion length must exceed the attribute data size; the insertion point is already required to be within the existing data.
How can I identify evidence that this issue has been triggered?
A KASAN-enabled kernel may report a slab-out-of-bounds write in attr_insert_range, with a stack trace including ntfs_fallocate, vfs_fallocate, and the fallocate system call. The reported example shows a write of size 512.