loop0: detected capacity change from 0 to 32768 BTRFS: device fsid a6a605fc-d5f1-4e66-8595-3726e2b761d6 devid 1 transid 8 /dev/loop0 (7:0) scanned by syz.0.0 (5315) BTRFS info (device loop0 state S): first mount of filesystem a6a605fc-d5f1-4e66-8595-3726e2b761d6 BTRFS info (device loop0 state S): using blake2b (blake2b-256-generic) checksum algorithm BTRFS info (device loop0 state S): using free-space-tree BTRFS warning (device loop0 state CS): mismatching generation and generation_v2 found in root item. This root was probably mounted with an older kernel. Resetting all new fields. BTRFS error (device loop0 state CS): block group 6881280 len 1638400 type flags 0x2 mismatch with chunk type flags 0x5 BTRFS info (device loop0 state CS): scrub: started on devid 1 Oops: general protection fault, probably for non-canonical address 0xdffffc0000000041: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000208-0x000000000000020f] CPU: 0 UID: 0 PID: 5315 Comm: syz.0.0 Not tainted 6.15.0-rc4-syzkaller-00208-g00b827f0cffa #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 RIP: 0010:btrfs_lookup_csums_bitmap+0xc3/0x11b0 fs/btrfs/file-item.c:610 Code: 8c 24 90 00 00 00 42 c7 44 21 08 f3 f3 f3 f3 e8 13 a4 02 fe 48 89 9c 24 80 00 00 00 48 81 c3 08 02 00 00 48 89 d8 48 c1 e8 03 <42> 80 3c 20 00 74 08 48 89 df e8 be 98 64 fe 48 8b 03 48 89 44 24 RSP: 0018:ffffc9000d397220 EFLAGS: 00010206 RAX: 0000000000000041 RBX: 0000000000000208 RCX: 0000000000100000 RDX: ffffc9000e1c2000 RSI: 0000000000015d61 RDI: 0000000000015d62 RBP: ffffc9000d397390 R08: ffff888011aa2c00 R09: ffffc9000d3974a0 R10: dffffc0000000000 R11: ffffed100a4f402e R12: dffffc0000000000 R13: 1ffff1100a4f4016 R14: 0000000000500000 R15: 0000000000500000 FS: 00007fc2b3d916c0(0000) GS:ffff88808d6cc000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055b90397c028 CR3: 0000000040694000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: scrub_find_fill_first_stripe+0xca1/0xff0 fs/btrfs/scrub.c:1622 queue_scrub_stripe fs/btrfs/scrub.c:1925 [inline] scrub_simple_mirror+0x648/0xa20 fs/btrfs/scrub.c:2156 scrub_stripe+0xa11/0x2790 fs/btrfs/scrub.c:2321 scrub_chunk+0x2a3/0x430 fs/btrfs/scrub.c:2447 scrub_enumerate_chunks+0xa35/0x11b0 fs/btrfs/scrub.c:2711 btrfs_scrub_dev+0x732/0xd50 fs/btrfs/scrub.c:3033 btrfs_ioctl_scrub+0x228/0x360 fs/btrfs/ioctl.c:3164 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:892 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:0x7fc2b2f8e969 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:00007fc2b3d91038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fc2b31b5fa0 RCX: 00007fc2b2f8e969 RDX: 0000200000000000 RSI: 00000000c400941b RDI: 0000000000000004 RBP: 00007fc2b3010ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fc2b31b5fa0 R15: 00007fff2a628ed8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_lookup_csums_bitmap+0xc3/0x11b0 fs/btrfs/file-item.c:610 Code: 8c 24 90 00 00 00 42 c7 44 21 08 f3 f3 f3 f3 e8 13 a4 02 fe 48 89 9c 24 80 00 00 00 48 81 c3 08 02 00 00 48 89 d8 48 c1 e8 03 <42> 80 3c 20 00 74 08 48 89 df e8 be 98 64 fe 48 8b 03 48 89 44 24 RSP: 0018:ffffc9000d397220 EFLAGS: 00010206 RAX: 0000000000000041 RBX: 0000000000000208 RCX: 0000000000100000 RDX: ffffc9000e1c2000 RSI: 0000000000015d61 RDI: 0000000000015d62 RBP: ffffc9000d397390 R08: ffff888011aa2c00 R09: ffffc9000d3974a0 R10: dffffc0000000000 R11: ffffed100a4f402e R12: dffffc0000000000 R13: 1ffff1100a4f4016 R14: 0000000000500000 R15: 0000000000500000 FS: 00007fc2b3d916c0(0000) GS:ffff88808d6cc000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055b90397c028 CR3: 0000000040694000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 8c 24 90 mov %fs,(%rax,%rdx,4) 3: 00 00 add %al,(%rax) 5: 00 42 c7 add %al,-0x39(%rdx) 8: 44 21 08 and %r9d,(%rax) b: f3 f3 f3 f3 e8 13 a4 repz repz repz repz call 0xfe02a427 12: 02 fe 14: 48 89 9c 24 80 00 00 mov %rbx,0x80(%rsp) 1b: 00 1c: 48 81 c3 08 02 00 00 add $0x208,%rbx 23: 48 89 d8 mov %rbx,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) <-- trapping instruction 2f: 74 08 je 0x39 31: 48 89 df mov %rbx,%rdi 34: e8 be 98 64 fe call 0xfe6498f7 39: 48 8b 03 mov (%rbx),%rax 3c: 48 rex.W 3d: 89 .byte 0x89 3e: 44 rex.R 3f: 24 .byte 0x24