]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/ntfs: Implement attribute verification
authorB Horn <b@horn.uk>
Tue, 14 May 2024 11:39:56 +0000 (12:39 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Jan 2025 15:22:47 +0000 (16:22 +0100)
commit067b6d225d482280abad03944f04e30abcbdafa1
treeb5bdad04bb17f142c3884518e894957d13571cc9
parent048777bc29043403d077d41a81d0183767b8bc71
fs/ntfs: Implement attribute verification

It was possible to read OOB when an attribute had a size that exceeded
the allocated buffer. This resolves that by making sure all attributes
that get read are fully in the allocated space by implementing
a function to validate them.

Defining the offsets in include/grub/ntfs.h but they are only used in
the validation function and not across the rest of the NTFS code.

Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/ntfs.c
include/grub/ntfs.h