]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/ntfs: Correct attribute vs attribute list validation
authorAndrew Hamilton <adhamilt@gmail.com>
Thu, 22 May 2025 03:20:38 +0000 (22:20 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 29 May 2025 13:45:24 +0000 (15:45 +0200)
commit06914b6141890c8e783868df99082e941d981698
tree131d862714743df963c68fa599918d6f39be9318
parent0e1762c8a0c2a952e99caab9e3ffb64816799bcf
fs/ntfs: Correct attribute vs attribute list validation

Correct ntfs_test test failures around attempting to validate attribute
list entries as attributes. The NTFS code uses common logic in some
places to parse both attributes and attribute_lists which complicates
validation. Attribute lists contain different headers including a
different size of the length field (2 bytes) at offset 4 instead of the
4 byte length field used in attributes at offset 4. There are other
differences as well, but attempting to validate attribute list types
using attribute header validation was causing failure of the NTFS test
suite. This change restores some of the validation logic which may be
shared between attributes and attribute lists to be closer to the
original logic prior to fixes for previous CVEs. A following commit will
address some of the implications of removing this validation logic by
correcting some fuzzer failures (some which are exposed by removing the
validation in some of the cases).

Fixes: 067b6d225 (fs/ntfs: Implement attribute verification)
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/ntfs.c