]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/iso9660: Prevent read past the end of system use area
authorLidong Chen <lidong.chen@oracle.com>
Wed, 1 Feb 2023 16:08:44 +0000 (17:08 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 2 Feb 2023 18:44:56 +0000 (19:44 +0100)
commit8f41d35fcecb65746b60aaa99936cbbdf5fb27ba
treeef7bf1facc078fe42bf6c08c0eb016423ff000d5
parent4e0bab34ece7b757a1b96be59ba54a009a5cc354
fs/iso9660: Prevent read past the end of system use area

In the code, the for loop advanced the entry pointer to the next entry before
checking if the next entry is within the system use area boundary. Another
issue in the code was that there is no check for the size of system use area.
For a corrupted system, the size of system use area can be less than the size
of minimum SUSP entry size (4 bytes). These can cause buffer overrun. The fixes
added the checks to ensure the read is valid and within the boundary.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Thomas Schmitt <scdbackup@gmx.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/iso9660.c