loop1: detected capacity change from 0 to 32768 ------------[ cut here ]------------ UBSAN: shift-out-of-bounds in fs/bcachefs/replicas.c:1010:20 shift exponent 155 is too large for 32-bit type 'int' CPU: 0 PID: 8083 Comm: syz-executor.1 Not tainted 6.9.0-rc7-syzkaller-gfda5695d692c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 dump_stack+0x1c/0x28 lib/dump_stack.c:123 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_shift_out_of_bounds+0x2f4/0x36c lib/ubsan.c:468 bch2_sb_dev_has_data+0x1bc/0x4c8 fs/bcachefs/replicas.c:1010 member_to_text+0xa8/0xc84 fs/bcachefs/sb-members.c:163 bch2_sb_members_v1_to_text+0x114/0x1d4 fs/bcachefs/sb-members.c:317 __bch2_sb_field_to_text fs/bcachefs/super-io.c:1228 [inline] bch2_sb_field_to_text+0x1a4/0x234 fs/bcachefs/super-io.c:1244 bch2_sb_field_validate+0x1cc/0x298 fs/bcachefs/super-io.c:1211 bch2_sb_validate+0x868/0xbf8 fs/bcachefs/super-io.c:460 __bch2_read_super+0xa4c/0x10a8 fs/bcachefs/super-io.c:822 bch2_read_super+0x38/0x4c fs/bcachefs/super-io.c:842 bch2_fs_open+0x1e0/0xb64 fs/bcachefs/super.c:2049 bch2_mount+0x558/0xe10 fs/bcachefs/fs.c:1903 legacy_get_tree+0xd4/0x16c fs/fs_context.c:662 vfs_get_tree+0x90/0x288 fs/super.c:1779 do_new_mount+0x278/0x900 fs/namespace.c:3352 path_mount+0x590/0xe04 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __arm64_sys_mount+0x45c/0x594 fs/namespace.c:3875 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 ---[ end trace ]--- bcachefs (/dev/loop1): error validating superblock: Invalid superblock section members_v1: device 0: not enough buckets (got 0, max 64) members_v1 (size 640): Device: 0 Label: (none) UUID: 00000000-0000-0000-3800-000000000000 Size: 0 read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 0 First bucket: 0 Buckets: 0 Last mount: (never) Last superblock write: 0 State: failed Data allowed: (none) Has data: Durability: 1 Discard: 0 Freespace initialized: 0