loop2: detected capacity change from 0 to 32768 ------------[ cut here ]------------ UBSAN: shift-out-of-bounds in fs/bcachefs/sb-members.c:250:2 shift exponent 255 is too large for 64-bit type 'unsigned long long' CPU: 1 UID: 0 PID: 6523 Comm: syz.2.12 Not tainted 6.12.0-rc3-syzkaller-g77a9c08f0659 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:319 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:326 __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_shift_out_of_bounds+0x2f4/0x36c lib/ubsan.c:468 member_to_text+0x898/0x89c fs/bcachefs/sb-members.c:250 bch2_sb_members_v1_to_text+0x10c/0x1c8 fs/bcachefs/sb-members.c:295 __bch2_sb_field_to_text fs/bcachefs/super-io.c:1256 [inline] bch2_sb_field_to_text+0x1a4/0x234 fs/bcachefs/super-io.c:1272 bch2_sb_field_validate+0x1d8/0x2a8 fs/bcachefs/super-io.c:1239 bch2_sb_validate+0x93c/0xd04 fs/bcachefs/super-io.c:467 __bch2_read_super+0xa18/0x1020 fs/bcachefs/super-io.c:832 bch2_read_super+0x38/0x4c fs/bcachefs/super-io.c:852 bch2_fs_open+0x20c/0x27c4 fs/bcachefs/super.c:2018 bch2_fs_get_tree+0x53c/0x1030 fs/bcachefs/fs.c:2065 vfs_get_tree+0x90/0x28c fs/super.c:1800 do_new_mount+0x278/0x900 fs/namespace.c:3507 path_mount+0x590/0xe04 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __arm64_sys_mount+0x45c/0x5a8 fs/namespace.c:4032 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:732 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:750 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 ---[ end trace ]--- bcachefs (/dev/loop2): error validating superblock: Invalid superblock section members_v1: device 0: too many buckets (got 17465240829919494272, max 2147483583) members_v1 (size 64): Device: 0 Label: (none) UUID: 7af6772b-00de-4159-84cd-1faead05aceb Size: 4467570834646433792 read errors: 0 write errors: 0 checksum errors: 0 seqread iops: 0 seqwrite iops: 0 randread iops: 0 randwrite iops: 0 Bucket size: 33553920 First bucket: 65535 Buckets: 17465240829919494272 Last mount: 1714681267 Last superblock write: 0 State: rw Data allowed: journal,btree,user Has data: journal,btree,user Btree allocated bitmap blocksize:9223372036854775808 Btree allocated bitmap bcachefs: bch2_fs_get_tree() error: invalid_sb_members