linux/fs/f2fs
Chao Yu e584bbe821 f2fs: fix shift-out-of-bounds in sanity_check_raw_super()
syzbot reported a bug which could cause shift-out-of-bounds issue,
fix it.

Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x107/0x163 lib/dump_stack.c:120
 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395
 sanity_check_raw_super fs/f2fs/super.c:2812 [inline]
 read_raw_super_block fs/f2fs/super.c:3267 [inline]
 f2fs_fill_super.cold+0x16c9/0x16f6 fs/f2fs/super.c:3519
 mount_bdev+0x34d/0x410 fs/super.c:1366
 legacy_get_tree+0x105/0x220 fs/fs_context.c:592
 vfs_get_tree+0x89/0x2f0 fs/super.c:1496
 do_new_mount fs/namespace.c:2896 [inline]
 path_mount+0x12ae/0x1e70 fs/namespace.c:3227
 do_mount fs/namespace.c:3240 [inline]
 __do_sys_mount fs/namespace.c:3448 [inline]
 __se_sys_mount fs/namespace.c:3425 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3425
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported-by: syzbot+ca9a785f8ac472085994@syzkaller.appspotmail.com
Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-12-10 09:13:19 -08:00
..
acl.c f2fs: Remove the redundancy initialization 2020-12-02 22:00:21 -08:00
acl.h f2fs: Use the correct style for SPDX License Identifier 2020-05-08 06:55:55 -07:00
checkpoint.c f2fs: avoid race condition for shrinker count 2020-12-03 00:59:26 -08:00
compress.c f2fs: fix race of pending_pages in decompression 2020-12-08 15:39:14 -08:00
data.c f2fs: fix race of pending_pages in decompression 2020-12-08 15:39:14 -08:00
debug.c f2fs: avoid race condition for shrinker count 2020-12-03 00:59:26 -08:00
dir.c f2fs: Handle casefolding with Encryption 2020-12-02 22:00:21 -08:00
extent_cache.c f2fs: support 64-bits key in f2fs rb-tree node entry 2020-09-10 14:03:30 -07:00
f2fs.h f2fs: fix race of pending_pages in decompression 2020-12-08 15:39:14 -08:00
file.c f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE 2020-12-03 00:12:08 -08:00
gc.c f2fs: change to use rwsem for cp_mutex 2020-12-02 22:00:21 -08:00
gc.h f2fs: support age threshold based garbage collection 2020-09-11 11:11:15 -07:00
hash.c f2fs: Handle casefolding with Encryption 2020-12-02 22:00:21 -08:00
inline.c f2fs: inline: fix wrong inline inode stat 2020-12-08 14:25:41 -08:00
inode.c f2fs: compress: support chksum 2020-12-02 22:00:22 -08:00
Kconfig f2fs: compress: support lzo-rle compress algorithm 2020-05-11 20:36:46 -07:00
Makefile f2fs: support data compression 2020-01-17 16:48:07 -08:00
namei.c fscrypt: Have filesystems handle their d_ops 2020-12-02 22:00:21 -08:00
node.c f2fs: fix to account inline xattr correctly during recovery 2020-12-08 14:25:41 -08:00
node.h f2fs: avoid race condition for shrinker count 2020-12-03 00:59:26 -08:00
recovery.c f2fs: change to use rwsem for cp_mutex 2020-12-02 22:00:21 -08:00
segment.c f2fs: add compress_mode mount option 2020-12-03 00:11:57 -08:00
segment.h f2fs: fix wrong total_sections check and fsmeta check 2020-09-29 01:48:34 -07:00
shrinker.c f2fs: avoid race condition for shrinker count 2020-12-03 00:59:26 -08:00
super.c f2fs: fix shift-out-of-bounds in sanity_check_raw_super() 2020-12-10 09:13:19 -08:00
sysfs.c f2fs: introduce max_io_bytes, a sysfs entry, to limit bio size 2020-12-07 08:41:25 -08:00
trace.c f2fs: do not use mutex lock in atomic context 2019-03-05 19:58:06 -08:00
trace.h f2fs: Use the correct style for SPDX License Identifier 2020-05-08 06:55:55 -07:00
verity.c mm/readahead: make page_cache_ra_unbounded take a readahead_control 2020-10-16 11:11:16 -07:00
xattr.c f2fs: clean up kvfree 2020-09-14 11:15:37 -07:00
xattr.h f2fs: code cleanup by removing ifdef macro surrounding 2020-05-26 18:56:10 -07:00