]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/ext2: Fix out-of-bounds read for inline extents
authorMichael Chang <mchang@suse.com>
Fri, 31 May 2024 07:14:23 +0000 (15:14 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Jan 2025 15:22:46 +0000 (16:22 +0100)
commit7e2f750f0a795c4d64ec7dc7591edac8da2e978c
treeaf9f58dc1f58fdd5186165787033ac319016d355
parentedd995a26ec98654d907a9436a296c2d82bc4b28
fs/ext2: Fix out-of-bounds read for inline extents

When inline extents are used, i.e. the extent tree depth equals zero,
a maximum of four entries can fit into the inode's data block. If the
extent header states a number of entries greater than four the current
ext2 implementation causes an out-of-bounds read. Fix this issue by
capping the number of extents to four when reading inline extents.

Reported-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Chang <mchang@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/ext2.c