linux/fs/squashfs
Phillip Lougher 12427de943 Squashfs: fix variable overflow triggered by sysbot
Sysbot reports a slab out of bounds write in squashfs_readahead().

This is ultimately caused by a file reporting an (infeasibly) large file
size (1407374883553280 bytes) with the minimum block size of 4K.

This causes variable overflow.

Link: https://lkml.kernel.org/r/20231113160901.6444-1-phillip@squashfs.org.uk
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Reported-by: syzbot+604424eb051c2f696163@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/000000000000b1fda20609ede0d1@google.com/
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-12-10 17:21:26 -08:00
..
block.c squashfs: squashfs_read_data need to check if the length is 0 2023-12-06 16:12:45 -08:00
cache.c
decompressor.c
decompressor.h
decompressor_multi.c
decompressor_multi_percpu.c
decompressor_single.c
dir.c
export.c
file.c Squashfs: fix variable overflow triggered by sysbot 2023-12-10 17:21:26 -08:00
file_cache.c
file_direct.c Squashfs: fix variable overflow triggered by sysbot 2023-12-10 17:21:26 -08:00
fragment.c
id.c
inode.c
Kconfig
lz4_wrapper.c
lzo_wrapper.c
Makefile
namei.c
page_actor.c
page_actor.h
squashfs.h
squashfs_fs.h
squashfs_fs_i.h
squashfs_fs_sb.h
super.c
symlink.c
xattr.c
xattr.h
xattr_id.c
xz_wrapper.c
zlib_wrapper.c
zstd_wrapper.c