Linux: ntfs: move attribute payload before shrinking its record
What fixes it
- 7dc2c524608039d1b082a0087f7aa0751edd4ffbLinuxCVE List
- 0ab6dc1ac4601c8d79e5448a024daed6b0c5ef64LinuxCVE List
- 7.2.13LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
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.
Text from CVE List
Affected versions 5
- Linuxaffected: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 7dc2c524608039d1b082a0087f7aa0751edd4ffbCVE List
- Linuxaffected: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 0ab6dc1ac4601c8d79e5448a024daed6b0c5ef64CVE List
- Linuxaffected: all versions before 7.2.13CVE List
- Linuxunaffected: 7.2.13 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List