syzbot


UBSAN: shift-out-of-bounds in f2fs_fill_super (2)

Status: auto-obsoleted due to no activity on 2023/05/22 14:18
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+fea4bcda5eb938ee88ed@syzkaller.appspotmail.com
First crash: 455d, last: 455d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] f2fs: fix shift-out-of-bounds in f2fs_fill_super 2 (2) 2023/01/29 09:18
[syzbot] [f2fs?] UBSAN: shift-out-of-bounds in f2fs_fill_super (2) 0 (1) 2023/01/26 14:23
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: shift-out-of-bounds in f2fs_fill_super f2fs C 4 1230d 1229d 19/26 fixed on 2021/03/10 01:49

Sample crash report:
F2FS-fs (loop0): Fix alignment : internally, start(4096) end(16896) block(12288)
F2FS-fs (loop0): Magic Mismatch, valid(0xf2f52010) - read(0xe8b)
F2FS-fs (loop0): Can't find valid F2FS filesystem in 2th superblock
================================================================================
UBSAN: shift-out-of-bounds in fs/f2fs/super.c:4184:41
shift exponent 613 is too large for 64-bit type 'loff_t' (aka 'long long')
CPU: 1 PID: 5467 Comm: syz-executor.0 Not tainted 6.2.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1b1/0x290 lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_shift_out_of_bounds+0x33d/0x3a0 lib/ubsan.c:321
 f2fs_fill_super+0x5518/0x6ee0 fs/f2fs/super.c:4184
 mount_bdev+0x26c/0x3a0 fs/super.c:1359
 legacy_get_tree+0xea/0x180 fs/fs_context.c:610
 vfs_get_tree+0x88/0x270 fs/super.c:1489
 do_new_mount+0x289/0xad0 fs/namespace.c:3145
 do_mount fs/namespace.c:3488 [inline]
 __do_sys_mount fs/namespace.c:3697 [inline]
 __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3674
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f7ad2e8d5fa
Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f7ad3bccf88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00000000000054f7 RCX: 00007f7ad2e8d5fa
RDX: 0000000020000040 RSI: 0000000020000080 RDI: 00007f7ad3bccfe0
RBP: 00007f7ad3bcd020 R08: 00007f7ad3bcd020 R09: 0000000000000003
R10: 0000000000000003 R11: 0000000000000202 R12: 0000000020000040
R13: 0000000020000080 R14: 00007f7ad3bccfe0 R15: 00000000200056c0
 </TASK>
================================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/22 14:18 upstream 2241ab53cbb5 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: shift-out-of-bounds in f2fs_fill_super
* Struck through repros no longer work on HEAD.