]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/ntfs: Correct next_attribute validation
authorAndrew Hamilton <adhamilt@gmail.com>
Sun, 1 Jun 2025 15:52:22 +0000 (10:52 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 24 Oct 2025 18:05:07 +0000 (20:05 +0200)
commit000e48b42c7e41d0f75cb7c6d5bcc76f8df6311f
treec99b4e5dd3c36d6719bab7e9265a329d84afd9b0
parent5ff9c43cfe01964ac0b7eb0481a8a70adbdd98d6
fs/ntfs: Correct next_attribute validation

Improved ad-hoc fuzzing coverage revealed a possible access violation
around line 342 of grub-core/fs/ntfs.c when accessing the attr_cur
pointer due to possibility of moving pointer "next" beyond of the end of
the valid buffer inside next_attribute. Prevent this for cases where
full attribute validation is not performed (such as on attribute lists)
by performing a sanity check on the newly calculated next pointer.

Fixes: 06914b614 (fs/ntfs: Correct attribute vs attribute list validation)
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/ntfs.c