]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/nilfs2: Don't search children if provided number is too large
authorDaniel Axtens <dja@axtens.net>
Mon, 18 Jan 2021 05:49:44 +0000 (16:49 +1100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Mar 2021 14:54:18 +0000 (15:54 +0100)
commit37c0eb05cdcc64c28d31c4ebd300f14d5239d05e
treeb05f7e3c2ed3a972d4b63286c58a7d0e78805d5e
parent20ab8cb44bc140a1dedda82a3fccdd45e9bc6929
fs/nilfs2: Don't search children if provided number is too large

NILFS2 reads the number of children a node has from the node. Unfortunately,
that's not trustworthy. Check if it's beyond what the filesystem permits and
reject it if so.

This blocks some OOB reads. I'm not sure how controllable the read is and what
could be done with invalidly read data later on.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/nilfs2.c