CVE-2026-99815: fs/ntfs3: validate EA entry layout against ef->size in ntfs_read_ea
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: validate EA entry layout against ef->size in ntfsreadea
In ntfsreadea(), the ef->size branch only checks that the declared entry size fits the remaining buffer; unlike the zero-size branch it never verifies that the entry's own name and value fit inside ef->size. A crafted image can thus present an in-bounds ef->size with an arbitrary elength, which findea()/ntfsgetea() later use as the memcpy length, reading past the allocation and leaking adjacent heap memory:
BUG: KASAN: slab-out-of-bounds in ntfsgetea (fs/ntfs3/xattr.c:302) Read of size 65535 at addr ffff888010770b0f by task exploit/142 ... asanmemcpy (mm/kasan/shadow.c:105) ntfsgetea (fs/ntfs3/xattr.c:302) ntfsgetxattr (fs/ntfs3/xattr.c:848) vfsgetxattr (fs/xattr.c:446) vfsgetxattr (fs/xattr.c:479) dogetxattr (fs/xattr.c:808) filenamegetxattr (fs/xattr.c:837) pathgetxattrat (fs/xattr.c:876) dosyscall64 (arch/x86/entry/syscall64.c:94) ... The buggy address is located 15 bytes inside of allocated 20-byte region, cache kmalloc-32
Validate the name/value layout in the ef->size branch too, bounding it against ef->size, as the zero-size branch validates it against the buffer.
[almaz.alexandrovich@paragon-software.com: remove duplicate check of need > easize]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In Linux kernel fs/ntfs3, validate that the EA entry’s name and value fit within ef->size in the ef->size branch of ntfs_read_ea().
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Linux systems that process a crafted NTFS image and perform extended-attribute handling through the ntfs3 filesystem code are exposed. The affected path includes ntfs_getxattr and related xattr operations.
What must an attacker control to trigger the out-of-bounds read?
An attacker needs a crafted NTFS image containing an extended-attribute entry whose declared size fits the remaining buffer but whose name and value layout does not fit within that declared size. The malformed entry can cause a later memcpy to use an attacker-influenced length.
What is the observed impact of successful triggering?
The reported failure is a slab out-of-bounds read in ntfs_get_ea, which can read past an allocated heap region. The description states that this can leak adjacent heap memory.