]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/xfs: Incorrect short form directory data boundary check
authorLidong Chen <lidong.chen@oracle.com>
Thu, 28 Sep 2023 22:33:44 +0000 (22:33 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 30 Oct 2023 16:16:18 +0000 (17:16 +0100)
commitad7fb8e2e02bb1dd0475ead9919c1c82514d2ef8
treea62a9520ae40636b4a3061d2b824b3c3bc57aad7
parent4e10213de66aae53c9292038ff6b8b6ae3d1ed6a
fs/xfs: Incorrect short form directory data boundary check

After parsing of the current entry, the entry pointer is advanced
to the next entry at the end of the "for" loop. In case where the
last entry is at the end of the data boundary, the advanced entry
pointer can point off the data boundary. The subsequent boundary
check for the advanced entry pointer can cause a failure.

The fix is to include the boundary check into the "for" loop
condition.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Tested-by: Marta Lewandowska <mlewando@redhat.com>
grub-core/fs/xfs.c