]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/ntfs: Track the end of the MFT attribute buffer
authorB Horn <b@horn.uk>
Tue, 7 Jan 2025 11:38:34 +0000 (11:38 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Jan 2025 15:22:46 +0000 (16:22 +0100)
commit237a71184a32d1ef7732f5f49ed6a89c5fe1c99a
tree11a960841b9c2ad146f76e61412854de17b82372
parentaff26318783a135562b904ff09e2359893885732
fs/ntfs: Track the end of the MFT attribute buffer

The end of the attribute buffer should be stored alongside the rest of
the attribute struct as right now it is not possible to implement bounds
checking when accessing attributes sequentially.

This is done via:
  - updating init_attr() to set at->end and check is is not initially out of bounds,
  - implementing checks as init_attr() had its type change in its callers,
  - updating the value of at->end when needed.

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