loop0: detected capacity change from 0 to 32768 bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=errors=continue,metadata_checksum=none,data_checksum=none,compression=lz4,background_compression=zstd,str_hash=crc32c,nojournal_transaction_names,noexcl,no_data_io invalid bkey in superblock btree=inodes level=1: u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 2a20405ac3f40602 written 24 min_key POS_MIN durability: 1 ptr: 0:536870950:0 gen 0 invalid pointer past last bucket (536870950 > 128): delete?, fixing bcachefs (loop0): recovering from clean shutdown, journal seq 13 bcachefs (loop0): Version upgrade from 1.3: rebalance_work to 1.7: mi_btree_bitmap incomplete Doing compatible version upgrade from 1.3: rebalance_work to 1.20: directory_size running recovery passes: check_allocations,check_extents_to_backpointers,check_subvols,check_inodes,check_dirents bcachefs (loop0): error validating btree node on loop0 at btree extents level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 4e0410879b0c2f04 written 15 min_key POS_MIN durability: 1 ptr: 0:27:0 gen 0 node offset 8/15 bset u64s 51: checksum error, type chacha20_poly1305_128: got d84c9b6bdcb743fdc733ca336672ca63 should be 37f1d6087d67d21bebd469bc807a31f8, fixing bcachefs (loop0): error validating btree node on loop0 at btree extents level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 4e0410879b0c2f04 written 15 min_key POS_MIN durability: 1 ptr: 0:27:0 gen 0 node offset 8/15 bset u64s 51: bset past end of btree node (offset 8 len 8 but written 15), fixing bcachefs (loop0): error validating btree node on loop0 at btree extents level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 4e0410879b0c2f04 written 15 min_key POS_MIN durability: 1 ptr: 0:27:0 gen 0 node offset 8/15 bset u64s 0: empty bset, fixing bcachefs (loop0): btree_node_read_work: rewriting btree node at due to error btree=extents level=0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 4e0410879b0c2f04 written 15 min_key POS_MIN durability: 1 ptr: 0:27:0 gen 0 bcachefs (loop0): error validating btree node on loop0 at btree dirents level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 267fcf747c875937 written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0 node offset 8/24 bset u64s 6: checksum error, type chacha20_poly1305_128: got f28cd69eb48db9426ddc13f04996e5e0 should be abbf307d6f4195551a4398bf111cbb27, fixing bcachefs (loop0): btree_node_read_work: rewriting btree node at due to error btree=dirents level=0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 267fcf747c875937 written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0 bcachefs (loop0): error validating btree node on loop0 at btree alloc level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1818ce08861e3527 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0 node offset 8/40 bset u64s 375: checksum error, type chacha20_poly1305_128: got 3a82557add093526b6b133a1fd2afb34 should be 61ec379a8789477e76ff1a5280fd6dbd, fixing bcachefs (loop0): btree_node_read_work: rewriting btree node at due to error btree=alloc level=0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1818ce08861e3527 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0 bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): stripes_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... bucket 0:26 gen 0 has wrong data_type: got (invalid data type), should be btree, fixing bucket 0:26 gen 0 data type btree has wrong dirty_sectors: got 3161278832, should be 256, fixing bucket 0:26 gen 0 data type btree has wrong cached_sectors: got 22686, should be 0, fixing bucket 0:34 gen 0 has wrong data_type: got user, should be need_discard, fixing bucket 0:34 gen 0 data type need_discard has wrong dirty_sectors: got 16, should be 0, fixing bucket 0:38 gen 0 has wrong data_type: got btree, should be need_discard, fixing bucket 0:38 gen 0 data type need_discard has wrong dirty_sectors: got 256, should be 0, fixing done bcachefs (loop0): going read-write bcachefs (loop0): journal_replay... done bcachefs (loop0): check_extents_to_backpointers... bcachefs (loop0): scanning for missing backpointers in 3/128 buckets done bcachefs (loop0): check_subvols... subvolume 1 points to missing subvolume root 4096:4294967295, fixing Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 UID: 0 PID: 5317 Comm: syz.0.0 Not tainted 6.14.0-rc1-syzkaller-00034-g92514ef226f5 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:__bch2_subvolume_delete fs/bcachefs/subvolume.c:444 [inline] RIP: 0010:bch2_subvolume_delete+0x24bc/0x3bb0 fs/bcachefs/subvolume.c:468 Code: 89 ef 48 8d b4 24 40 04 00 00 e8 9f 2e cc ff 4d 85 ff 75 9d e8 95 31 48 fd 4c 89 e0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 63 12 00 00 45 8b 34 24 44 89 f7 8b 5c 24 RSP: 0018:ffffc9000d4de760 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000fffff799 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc9000d4debae RBP: ffffc9000d4dee30 R08: ffffc9000d4debad R09: 0000000000000000 R10: ffffc9000d4deba0 R11: fffff52001a9bd76 R12: 0000000000000000 R13: ffff8880555fc000 R14: 0000000000000000 R15: fffffffffffff799 FS: 00007fba47d216c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055a1e611a0b8 CR3: 0000000032d5a000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: check_subvol fs/bcachefs/subvolume.c:115 [inline] bch2_check_subvols+0x1cac/0x3d80 fs/bcachefs/subvolume.c:163 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:226 bch2_run_recovery_passes+0x2ad/0xa90 fs/bcachefs/recovery_passes.c:291 bch2_fs_recovery+0x265a/0x3de0 fs/bcachefs/recovery.c:936 bch2_fs_start+0x37c/0x610 fs/bcachefs/super.c:1030 bch2_fs_get_tree+0xd8d/0x1740 fs/bcachefs/fs.c:2203 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3560 do_mount fs/namespace.c:3900 [inline] __do_sys_mount fs/namespace.c:4111 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4088 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fba46f8e58a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007fba47d20e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fba47d20ef0 RCX: 00007fba46f8e58a RDX: 000020000000f640 RSI: 0000200000000140 RDI: 00007fba47d20eb0 RBP: 000020000000f640 R08: 00007fba47d20ef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000140 R13: 00007fba47d20eb0 R14: 000000000000f62f R15: 0000200000000180 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__bch2_subvolume_delete fs/bcachefs/subvolume.c:444 [inline] RIP: 0010:bch2_subvolume_delete+0x24bc/0x3bb0 fs/bcachefs/subvolume.c:468 Code: 89 ef 48 8d b4 24 40 04 00 00 e8 9f 2e cc ff 4d 85 ff 75 9d e8 95 31 48 fd 4c 89 e0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 63 12 00 00 45 8b 34 24 44 89 f7 8b 5c 24 RSP: 0018:ffffc9000d4de760 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000fffff799 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc9000d4debae RBP: ffffc9000d4dee30 R08: ffffc9000d4debad R09: 0000000000000000 R10: ffffc9000d4deba0 R11: fffff52001a9bd76 R12: 0000000000000000 R13: ffff8880555fc000 R14: 0000000000000000 R15: fffffffffffff799 FS: 00007fba47d216c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055a1e611a0b8 CR3: 0000000032d5a000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 89 ef mov %ebp,%edi 2: 48 8d b4 24 40 04 00 lea 0x440(%rsp),%rsi 9: 00 a: e8 9f 2e cc ff call 0xffcc2eae f: 4d 85 ff test %r15,%r15 12: 75 9d jne 0xffffffb1 14: e8 95 31 48 fd call 0xfd4831ae 19: 4c 89 e0 mov %r12,%rax 1c: 48 c1 e8 03 shr $0x3,%rax 20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx 27: fc ff df * 2a: 0f b6 04 08 movzbl (%rax,%rcx,1),%eax <-- trapping instruction 2e: 84 c0 test %al,%al 30: 0f 85 63 12 00 00 jne 0x1299 36: 45 8b 34 24 mov (%r12),%r14d 3a: 44 89 f7 mov %r14d,%edi 3d: 8b .byte 0x8b 3e: 5c pop %rsp 3f: 24 .byte 0x24