]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/ntfs: Fix an OOB read when parsing a volume label
authorMaxim Suhanov <dfirblog@gmail.com>
Mon, 28 Aug 2023 13:38:19 +0000 (16:38 +0300)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 3 Oct 2023 13:38:48 +0000 (15:38 +0200)
commit1fe82c41e070385e273d7bb1cfb482627a3c28e8
tree02aaffe266069340f174e7ef05186ff487a50395
parent7a5a116739fa6d8a625da7d6b9272c9a2462f967
fs/ntfs: Fix an OOB read when parsing a volume label

This fix introduces checks to ensure that an NTFS volume label is always
read from the corresponding file record segment.

The current NTFS code allows the volume label string to be read from an
arbitrary, attacker-chosen memory location. However, the bytes read are
always treated as UTF-16LE. So, the final string displayed is mostly
unreadable and it can't be easily converted back to raw bytes.

The lack of this check is a minor issue, likely not causing a significant
data leak.

Reported-by: Maxim Suhanov <dfirblog@gmail.com>
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/ntfs.c