syzbot


UBSAN: shift-out-of-bounds in gfs2_fill_super

Status: upstream: reported on 2025/04/11 08:28
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+b0018b7468b2af33b4d5@syzkaller.appspotmail.com
Fix commit: gfs2: check sb_min_blocksize return value
Patched on: [], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 42d, last: 20d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] gfs2: capture blocksize set failed 2 (2) 2025/04/12 12:24
[syzbot] [gfs2?] UBSAN: shift-out-of-bounds in gfs2_fill_super 0 (1) 2025/04/11 08:28

Sample crash report:
loop0: detected capacity change from 0 to 32768
btrfs: Unknown parameter 'fragment'
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in fs/gfs2/ops_fstype.c:1172:19
shift exponent 4294967287 is too large for 64-bit type 'unsigned long'
CPU: 0 UID: 0 PID: 5317 Comm: syz.0.0 Not tainted 6.15.0-rc4-syzkaller-00011-gf15d97df5afa #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 ubsan_epilogue+0xa/0x40 lib/ubsan.c:231
 __ubsan_handle_shift_out_of_bounds+0x386/0x410 lib/ubsan.c:492
 gfs2_fill_super+0x1d36/0x2050 fs/gfs2/ops_fstype.c:1172
 get_tree_bdev_flags+0x40b/0x4d0 fs/super.c:1636
 gfs2_get_tree+0x51/0x1e0 fs/gfs2/ops_fstype.c:1330
 vfs_get_tree+0x8f/0x2b0 fs/super.c:1759
 do_new_mount+0x24a/0xa40 fs/namespace.c:3884
 do_mount fs/namespace.c:4224 [inline]
 __do_sys_mount fs/namespace.c:4435 [inline]
 __se_sys_mount+0x317/0x410 fs/namespace.c:4412
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fdd9698e969
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdd97726038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fdd96bb5fa0 RCX: 00007fdd9698e969
RDX: 0000200000000280 RSI: 0000200000000180 RDI: 0000200000000100
RBP: 00007fdd96a10ab1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fdd96bb5fa0 R15: 00007ffe289842b8
 </TASK>
---[ end trace ]---

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/29 03:23 upstream f15d97df5afa aeb6ec69 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root UBSAN: shift-out-of-bounds in gfs2_fill_super
2025/04/27 20:43 upstream 5bc1018675ec c6b4fb39 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root UBSAN: shift-out-of-bounds in gfs2_fill_super
2025/04/07 08:20 linux-next a4cda136f021 1c65791e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in gfs2_fill_super
* Struck through repros no longer work on HEAD.