KernelScan.io

HIGH Introduced in 7.1

ntfs AttrResize Corruption

CVE-2026-99101

CVSS 7.8 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: ntfs: move attribute payload before shrinking its record ntfs_new_attr_flags() resizes the non-resident attribute record before moving its name and mapping pairs to their shorter-header offsets when compression or sparse state is cleared. Shrinking the record first moves the following attribute over the tail of the old record. The subsequent memmove() therefore copies bytes from that following attribute instead of the old mapping pairs. Re-enabling compression on an empty file persists those bytes as a malformed mapping pairs array, which ntfsck reports as a missing or invalid run length. Move the payload before shrinking the record, while retaining the existing resize-before-move ordering when growing it.

02

Engine v0.9.0

Risk summary

A local user with write access to an NTFS filesystem can corrupt filesystem metadata by clearing the compression or sparse flag on a file. The bug causes the kernel to copy data from an adjacent attribute record into the mapping pairs array, persisting malformed metadata to disk. This leads to filesystem corruption, potential data loss, and possible incidental disclosure of adjacent attribute data.

Affectedfs/ntfs/ea.c (ntfs filesystem)

Vulnerability analysis

When clearing the compression or sparse flag on an NTFS file, the kernel's ntfs_new_attr_flags() function incorrectly resizes the attribute record before moving its internal payload (name and mapping pairs) to their new offsets. When shrinking the record, this resize operation shifts the following attribute record earlier in memory, overwriting the old payload area. The subsequent memmove() then reads from the stale offsets, copying the following attribute's data instead of the original mapping pairs. This corrupted data is written back to disk as the new mapping pairs array, causing persistent filesystem corruption that tools like ntfsck detect as invalid run lengths. The fix reorders the operations for the shrink case: the payload is moved to its new location before the record is resized, eliminating the overlap. The grow case retains the original resize-then-move order since it does not suffer from this overlap. Any local user who can modify file attributes on a mounted NTFS filesystem (via chattr or equivalent ioctl) can trigger this bug, making it reachable on systems with NTFS-formatted USB drives, loopback mounts created by root, or any writable NTFS volume.

03

BranchIntroducedFixed inPatch commit
7.27.17.2.137dc2c5246080
mainline7.17.30ab6dc1ac460