syzbot


UBSAN: shift-out-of-bounds in init_sb (3)

Status: fixed on 2023/02/24 13:50
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+dcf33a7aae997956fe06@syzkaller.appspotmail.com
Fix commit: 670f8ce56dd0 gfs2: Check sb_bsize_shift after reading superblock
First crash: 790d, last: 720d
Discussions (9)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 5.10 01/16] crypto: qcom-rng - Fix qcom_rng_of_match unused warning 19 (19) 2022/10/20 13:19
[PATCH AUTOSEL 4.9 1/8] of/fdt: Don't calculate initrd size from DT if start > end 11 (11) 2022/10/19 05:58
[PATCH AUTOSEL 5.4 01/13] crypto: qcom-rng - Fix qcom_rng_of_match unused warning 15 (15) 2022/10/18 09:23
[PATCH AUTOSEL 5.19 01/29] crypto: qcom-rng - Fix qcom_rng_of_match unused warning 30 (30) 2022/10/18 01:04
[PATCH AUTOSEL 6.0 01/32] crypto: qcom-rng - Fix qcom_rng_of_match unused warning 33 (33) 2022/10/18 01:00
[PATCH AUTOSEL 4.14 1/8] of/fdt: Don't calculate initrd size from DT if start > end 8 (8) 2022/10/18 00:11
[PATCH AUTOSEL 4.19 01/10] crypto: qcom-rng - Fix qcom_rng_of_match unused warning 10 (10) 2022/10/18 00:11
[PATCH AUTOSEL 5.15 01/21] crypto: qcom-rng - Fix qcom_rng_of_match unused warning 21 (21) 2022/10/18 00:09
[syzbot] UBSAN: shift-out-of-bounds in init_sb (3) 0 (2) 2022/09/15 15:40
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: shift-out-of-bounds in init_sb gfs2 4 1067d 1195d 0/28 auto-closed as invalid on 2022/03/06 03:30
upstream UBSAN: shift-out-of-bounds in init_sb (2) gfs2 1 913d 909d 0/28 auto-closed as invalid on 2022/06/07 15:31

Sample crash report:
loop0: detected capacity change from 0 to 136
gfs2: fsid=loop0: Trying to join cluster "lock_nolock", "loop0"
gfs2: fsid=loop0: Now mounting FS (format 1801)...
================================================================================
UBSAN: shift-out-of-bounds in fs/gfs2/ops_fstype.c:295:19
shift exponent 7905031 is too large for 64-bit type 'unsigned long'
CPU: 1 PID: 3614 Comm: syz-executor138 Not tainted 6.0.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_shift_out_of_bounds+0x33d/0x3b0 lib/ubsan.c:322
 gfs2_read_sb fs/gfs2/ops_fstype.c:295 [inline]
 init_sb+0x11c6/0x12b0 fs/gfs2/ops_fstype.c:485
 gfs2_fill_super+0x18de/0x2610 fs/gfs2/ops_fstype.c:1207
 get_tree_bdev+0x400/0x620 fs/super.c:1323
 gfs2_get_tree+0x50/0x210 fs/gfs2/ops_fstype.c:1323
 vfs_get_tree+0x88/0x270 fs/super.c:1530
 do_new_mount+0x289/0xad0 fs/namespace.c:3040
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3568
 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:0x7fc6782311ca
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd30c80c48 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fc6782311ca
RDX: 0000000020000080 RSI: 0000000020000100 RDI: 00007ffd30c80c60
RBP: 00007ffd30c80c60 R08: 00007ffd30c80ca0 R09: 0000555556e1a2c0
R10: 0000000000000418 R11: 0000000000000282 R12: 0000000000000004
R13: 00007ffd30c80ca0 R14: 0000000000000001 R15: 0000000020000058
 </TASK>
================================================================================

Crashes (40):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/04 20:15 upstream 4fe89d07dcc2 eab8f949 .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/24 17:39 upstream bf682942cd26 0042f2b4 .config strace log report syz C [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/24 17:03 upstream a63f2e7cb110 0042f2b4 .config strace log report syz C ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in init_sb
2022/09/17 03:07 upstream 6879c2d3b960 dd9a85ff .config strace log report syz C [disk image] [vmlinux] ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in init_sb
2022/09/15 15:39 linux-next e47eb90a0a9a dd9a85ff .config strace log report syz C [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in init_sb
2022/10/18 04:07 upstream 493ffd6605b2 94744d21 .config console log report info ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/10/17 16:33 upstream 493ffd6605b2 94744d21 .config console log report info ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/10/15 21:44 upstream 493ffd6605b2 67cb024c .config console log report info ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/10/13 21:39 upstream 493ffd6605b2 adf90437 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/10/13 01:54 upstream 493ffd6605b2 3f6b40a1 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/10/10 10:11 upstream 4899a36f91a9 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-smack-root UBSAN: shift-out-of-bounds in init_sb
2022/10/10 09:04 upstream 4899a36f91a9 aea5da89 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/10/09 04:00 upstream a6afa4199d3d aea5da89 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/10/08 17:12 upstream 62e6e5940c0c aea5da89 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/10/05 15:34 upstream 0326074ff465 267e3bb1 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/28 06:56 upstream 46452d3786a8 75c78242 .config console log report info ci-upstream-kasan-gce-smack-root UBSAN: shift-out-of-bounds in init_sb
2022/09/28 02:11 upstream 46452d3786a8 75c78242 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/27 02:30 upstream f76349cf4145 d59ba983 .config console log report info ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/25 18:48 upstream 105a36f3694e 0042f2b4 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/25 18:10 upstream 105a36f3694e 0042f2b4 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/25 04:20 upstream 3db61221f4e8 0042f2b4 .config console log report info ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/23 16:04 upstream bf682942cd26 0042f2b4 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/22 20:49 upstream dc164f4fb00a 0042f2b4 .config console log report info ci-upstream-kasan-gce-smack-root UBSAN: shift-out-of-bounds in init_sb
2022/09/22 20:44 upstream dc164f4fb00a 0042f2b4 .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in init_sb
2022/09/22 20:25 upstream dc164f4fb00a 0042f2b4 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/22 20:24 upstream dc164f4fb00a 0042f2b4 .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-selinux-root UBSAN: shift-out-of-bounds in init_sb
2022/09/20 21:44 upstream 60891ec99e14 c4b8ccfd .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/19 23:53 upstream 521a547ced64 dd9a85ff .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/19 13:58 upstream 521a547ced64 dd9a85ff .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: shift-out-of-bounds in init_sb
2022/09/17 15:16 upstream a335366bad13 dd9a85ff .config console log report info ci-upstream-kasan-gce-smack-root UBSAN: shift-out-of-bounds in init_sb
2022/09/17 15:16 upstream a335366bad13 dd9a85ff .config console log report info ci-upstream-kasan-gce-selinux-root UBSAN: shift-out-of-bounds in init_sb
2022/09/17 15:15 upstream a335366bad13 dd9a85ff .config console log report info ci-qemu-upstream UBSAN: shift-out-of-bounds in init_sb
2022/09/17 15:11 upstream a335366bad13 dd9a85ff .config console log report info ci-upstream-kasan-gce-root UBSAN: shift-out-of-bounds in init_sb
2022/08/09 20:48 upstream 200e340f2196 c2a623d6 .config console log report info ci-upstream-kasan-gce-smack-root UBSAN: shift-out-of-bounds in init_sb
2022/09/22 20:41 upstream dc164f4fb00a 0042f2b4 .config console log report info ci-qemu-upstream-386 UBSAN: shift-out-of-bounds in init_sb
2022/09/22 20:41 upstream dc164f4fb00a 0042f2b4 .config console log report info ci-qemu-upstream-386 UBSAN: shift-out-of-bounds in init_sb
2022/09/17 15:33 upstream a335366bad13 dd9a85ff .config console log report info ci-qemu-upstream-386 UBSAN: shift-out-of-bounds in init_sb
2022/09/17 15:16 upstream a335366bad13 dd9a85ff .config console log report info ci-qemu-upstream-386 UBSAN: shift-out-of-bounds in init_sb
2022/09/17 15:15 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in init_sb
2022/09/15 15:26 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in init_sb
* Struck through repros no longer work on HEAD.