grub2/grub-core/fs
Darren Kenny 589500ad37 fs/btrfs: Fix more fuzz issues related to chunks
The corpus was generating issues in grub_btrfs_read_logical() when
attempting to iterate over stripe entries in the superblock's
bootmapping.

In most cases the reason for the failure was that the number of stripes
in chunk->nstripes exceeded the possible space statically allocated in
superblock bootmapping space. Each stripe entry in the bootmapping block
consists of a grub_btrfs_key followed by a grub_btrfs_chunk_stripe.

Another issue that came up was that while calculating the chunk size,
in an earlier piece of code in that function, depending on the data
provided in the btrfs file system, it would end up calculating a size
that was too small to contain even 1 grub_btrfs_chunk_item, which is
obviously invalid too.

Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2022-06-08 12:41:03 +02:00
..
zfs fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
affs.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
afs.c Leverage BFS implementation to read AFS. 2011-10-30 16:10:18 +01:00
archelp.c archelp: Never pass NULL as mtime. 2015-07-27 13:19:02 +02:00
bfs.c Change fs functions to add fs_ prefix 2019-04-09 10:03:29 +10:00
btrfs.c fs/btrfs: Fix more fuzz issues related to chunks 2022-06-08 12:41:03 +02:00
cbfs.c disk: Rename grub_disk_get_size() to grub_disk_native_sectors() 2020-12-12 01:19:03 +01:00
cpio_be.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
cpio_common.c cpio: Disable gcc9 -Waddress-of-packed-member 2019-04-23 11:37:08 +02:00
cpio.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
exfat.c exfat reader 2011-04-11 18:13:00 +02:00
ext2.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
f2fs.c fs/f2fs: Do not copy file names that are too long 2022-06-08 12:41:03 +02:00
fat.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
fshelp.c fs/fshelp: Catch impermissibly large block sizes in read helper 2021-03-02 15:54:18 +01:00
hfs.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
hfsplus.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
hfspluscomp.c Make grub_zlib_decompress handle incomplete chunks. 2013-12-18 23:39:49 +01:00
iso9660.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
jfs.c fs/jfs: Catch infinite recursion 2021-03-02 15:54:18 +01:00
minix2_be.c Handle big-endian minixfs (fixes minixfs tests on bigendian). 2012-04-01 21:35:18 +02:00
minix2.c Split minix.mod into minix.mod and minix2.mod. 2010-09-08 19:13:48 +02:00
minix3_be.c Handle big-endian minixfs (fixes minixfs tests on bigendian). 2012-04-01 21:35:18 +02:00
minix3.c minix3fs support 2011-04-11 08:16:13 +02:00
minix_be.c Handle big-endian minixfs (fixes minixfs tests on bigendian). 2012-04-01 21:35:18 +02:00
minix.c fs/minix: Avoid mistakenly probing ext2 filesystems 2021-04-12 16:22:44 +02:00
newc.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
nilfs2.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
ntfs.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
ntfscomp.c Fix warnings when compiling with -O3 2016-02-17 17:56:41 +01:00
odc.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
proc.c Change fs functions to add fs_ prefix 2019-04-09 10:03:29 +10:00
reiserfs.c Change fs functions to add fs_ prefix 2019-04-09 10:03:29 +10:00
romfs.c Change fs functions to add fs_ prefix 2019-04-09 10:03:29 +10:00
sfs.c fs/sfs: Fix over-read of root object name 2021-03-02 15:54:18 +01:00
squash4.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
tar.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
udf.c udf: Fix memory leak 2020-07-29 16:55:48 +02:00
ufs2.c automake commit without merge history 2010-05-06 11:34:04 +05:30
ufs_be.c Support big-endian UFS1. 2012-12-08 20:56:58 +01:00
ufs.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
xfs.c fs/xfs: Fix unreadable filesystem with v4 superblock 2021-09-27 20:09:39 +01:00