In the Linux kernel, the following vulnerability has been resolved:
ntfs3: validate split-point offset in indx_insert_into_buffer
indx_insert_into_buffer() computes
<pre>
used = used1 - to_copy - sp_size;
memmove(de_t, Add2Ptr(sp, sp_size), used - le32_to_cpu(hdr1->de_off));
</pre>
where sp and sp_size come from hdr_find_split(). hdr_find_split()
walks entries by le16_to_cpu(e->size) without validating that each
step stays within hdr->used or that the size field is at least
sizeof(struct NTFS_DE). index_hdr_check(), the on-load gatekeeper,
only validates header-level fields (used, total, de_off) and does
not walk per-entry sizes.
A crafted NTFS image whose leaf INDEX_HDR reports used == total but
contains one interior NTFS_DE with size = 0xFFF0 therefore passes
validation, descends to indx_insert_into_buffer() through the
ntfs_create() -> indx_insert_entry() path, and makes hdr_find_split()
return an sp whose sp_size (0xFFF0) greatly exceeds the remaining
bytes in the buffer. The u32 subtraction underflows and the memmove
count becomes a near-4-GiB value, producing an out-of-bounds kernel
write that corrupts adjacent allocations and panics the kernel.
Reproduced on 7.0.0-rc7 with UML + KASAN via a crafted image and a
single 'touch' inside the mounted directory; crash site resolves to
fs/ntfs3/index.c at the memmove. Trigger requires only local mount
of an attacker-supplied filesystem image (USB, loopback, or removable
media auto-mount).
Reject the split whenever the chosen sp plus its declared size
already extends past hdr1->used. This is the minimal fix; it
preserves the existing hdr_find_split() contract and relies on the
same out: cleanup path as the pre-existing error returns.
A prior OOB read in the very same indx_insert_into_buffer() memmove
was fixed in commit b8c44949044e ("fs/ntfs3: Fix OOB read in
indx_insert_into_buffer") by tightening hdr_find_e(), but that fix
does not cover the split-point size field path addressed here: sp is
returned by hdr_find_split(), not hdr_find_e(), and the underflow is
driven by sp->size rather than hdr->used exceeding hdr->total.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - Remote SMB CREATE via ksmbd vfs_create on an ntfs3-exported share reaches ntfs_create_inode→indx_insert_entry→indx_insert_into_buffer; the same memmove path is also reachable locally via open(O_CREAT)/touch on a mounted crafted image.
AC:L - The attacker fully controls the on-disk leaf INDEX_HDR and NTFS_DE size (e.g. 0xFFF0); once the buffer is full and a create forces a split, hdr_find_split() deterministically selects the bad entry and the u32 underflow yields a reliable near-4GiB OOB memmove with no race.
PR:N - Exploitation requires only a crafted NTFS image and a create in the malicious directory—no root on the target—via udisks2/systemd automount of attacker USB media, or a remote ksmbd client with guest/anonymous write access to an already-mounted ntfs3 export.
UI:N - After the crafted volume is mounted (automounter or admin), a single attacker-initiated touch/create or remote SMB CREATE in the prepared full directory triggers the split and OOB memmove without any further victim clicks, prompts, or confirmation.
S:U - The OOB memmove corrupts kernel heap memory within the same host OS security domain as ntfs3; it can enable local privilege escalation but does not cross a VM/hypervisor, IOMMU, or container sandbox boundary.
C:H - The underflowed memmove length reads far beyond the kmalloc'd index buffer from attacker-controlled on-disk bytes, giving a large out-of-bounds kernel heap read and disclosure/corruption primitive in addition to the write side.
I:H - The same memmove performs a massive out-of-bounds kernel heap write of adjacent slab objects with attacker-influenced source data, enabling arbitrary memory corruption and potential control-flow hijack beyond a simple denial of service.
A:H - Reproduced on 7.0.0-rc7 with KASAN: the oversized memmove corrupts adjacent allocations and panics the kernel at fs/ntfs3/index.c; even failed exploitation attempts typically cause oops or hard lockup from the unbounded copy.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - Remote SMB CREATE via ksmbd vfs_create on an ntfs3-exported share reaches ntfs_create_inode→indx_insert_entry→indx_insert_into_buffer; the same memmove path is also reachable locally via open(O_CREAT)/touch on a mounted crafted image.
AC:L - The attacker fully controls the on-disk leaf INDEX_HDR and NTFS_DE size (e.g. 0xFFF0); once the buffer is full and a create forces a split, hdr_find_split() deterministically selects the bad entry and the u32 underflow yields a reliable near-4GiB OOB memmove with no race.
PR:N - Exploitation requires only a crafted NTFS image and a create in the malicious directory—no root on the target—via udisks2/systemd automount of attacker USB media, or a remote ksmbd client with guest/anonymous write access to an already-mounted ntfs3 export.
UI:N - After the crafted volume is mounted (automounter or admin), a single attacker-initiated touch/create or remote SMB CREATE in the prepared full directory triggers the split and OOB memmove without any further victim clicks, prompts, or confirmation.
S:U - The OOB memmove corrupts kernel heap memory within the same host OS security domain as ntfs3; it can enable local privilege escalation but does not cross a VM/hypervisor, IOMMU, or container sandbox boundary.
C:H - The underflowed memmove length reads far beyond the kmalloc'd index buffer from attacker-controlled on-disk bytes, giving a large out-of-bounds kernel heap read and disclosure/corruption primitive in addition to the write side.
I:H - The same memmove performs a massive out-of-bounds kernel heap write of adjacent slab objects with attacker-influenced source data, enabling arbitrary memory corruption and potential control-flow hijack beyond a simple denial of service.
A:H - Reproduced on 7.0.0-rc7 with KASAN: the oversized memmove corrupts adjacent allocations and panics the kernel at fs/ntfs3/index.c; even failed exploitation attempts typically cause oops or hard lockup from the unbounded copy.
CVSS 3.1