]> git.proxmox.com Git - grub2.git/commit
fs/jfs: Limit the extents that getblk() can consider
authorDaniel Axtens <dja@axtens.net>
Mon, 18 Jan 2021 03:57:17 +0000 (14:57 +1100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Mar 2021 14:54:18 +0000 (15:54 +0100)
commitbd0cf8148ccf721f6e39ffbd70f8abad0c8897f0
treeacb40ffb470718a55a35f2f600f1ef7b33f18611
parentffd5a46f68710e2781899d0be4d701429a5a817d
fs/jfs: Limit the extents that getblk() can consider

getblk() implicitly trusts that treehead->count is an accurate count of
the number of extents. However, that value is read from disk and is not
trustworthy, leading to OOB reads and crashes. I am not sure to what
extent the data read from OOB can influence subsequent program execution.

Require callers to pass in the maximum number of extents for which
they have storage.

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