loop3: detected capacity change from 0 to 32768 bcachefs (loop3): mounting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,nojournal_transaction_names bcachefs (loop3): recovering from clean shutdown, journal seq 10 Oops: general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027] CPU: 3 PID: 7712 Comm: syz-executor.3 Not tainted 6.10.0-rc4-syzkaller-00217-g35bb670d65fc #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 RIP: 0010:crypto_skcipher_alg include/crypto/skcipher.h:375 [inline] RIP: 0010:crypto_skcipher_encrypt+0x48/0x170 crypto/skcipher.c:637 Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 22 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 6b 40 48 8d 7d 18 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 f5 00 00 00 48 8d 7d 04 4c 8b 65 18 48 b8 00 00 RSP: 0018:ffffc90002c3e5f8 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffffc90002c3e668 RCX: ffffc9000340d000 RDX: 0000000000000004 RSI: ffffffff8447ccd0 RDI: 0000000000000020 RBP: 0000000000000008 R08: 0000000000000020 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000003 R12: 0000000000000008 R13: 0000000000000020 R14: ffff8880557f6100 R15: ffff8880557f6100 FS: 0000000000000000(0000) GS:ffff88802c300000(0063) knlGS:00000000f5e47b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000f5e48000 CR3: 00000000127b0000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: do_encrypt_sg+0xcc/0x160 fs/bcachefs/checksum.c:108 do_encrypt+0x26d/0x450 fs/bcachefs/checksum.c:150 gen_poly_key.isra.0+0x113/0x2c0 fs/bcachefs/checksum.c:191 bch2_checksum+0x1f9/0x2a0 fs/bcachefs/checksum.c:227 bch2_btree_node_read_done+0x9ea/0x4fb0 fs/bcachefs/btree_io.c:1074 btree_node_read_work+0x567/0x1060 fs/bcachefs/btree_io.c:1345 bch2_btree_node_read+0x8b3/0xe40 fs/bcachefs/btree_io.c:1730 __bch2_btree_root_read fs/bcachefs/btree_io.c:1769 [inline] bch2_btree_root_read+0x2bd/0x680 fs/bcachefs/btree_io.c:1793 read_btree_roots fs/bcachefs/recovery.c:475 [inline] bch2_fs_recovery+0x1ba8/0x3db0 fs/bcachefs/recovery.c:803 bch2_fs_start+0x2e9/0x600 fs/bcachefs/super.c:1035 bch2_fs_open+0xde0/0x10f0 fs/bcachefs/super.c:2127 bch2_mount+0xe0c/0x11a0 fs/bcachefs/fs.c:1919 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8f/0x380 fs/super.c:1780 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x6e1/0x1f10 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] __ia32_sys_mount+0x295/0x320 fs/namespace.c:3875 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7255579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f5e47400 EFLAGS: 00000292 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 00000000f5e47460 RCX: 0000000020011a40 RDX: 0000000020011a00 RSI: 0000000000000604 RDI: 00000000f5e474a0 RBP: 00000000f5e47460 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:crypto_skcipher_alg include/crypto/skcipher.h:375 [inline] RIP: 0010:crypto_skcipher_encrypt+0x48/0x170 crypto/skcipher.c:637 Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 22 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 6b 40 48 8d 7d 18 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 f5 00 00 00 48 8d 7d 04 4c 8b 65 18 48 b8 00 00 RSP: 0018:ffffc90002c3e5f8 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffffc90002c3e668 RCX: ffffc9000340d000 RDX: 0000000000000004 RSI: ffffffff8447ccd0 RDI: 0000000000000020 RBP: 0000000000000008 R08: 0000000000000020 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000003 R12: 0000000000000008 R13: 0000000000000020 R14: ffff8880557f6100 R15: ffff8880557f6100 FS: 0000000000000000(0000) GS:ffff88802c100000(0063) knlGS:00000000f5e47b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000f5e75560 CR3: 00000000127b0000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 48 89 fa mov %rdi,%rdx 3: 48 c1 ea 03 shr $0x3,%rdx 7: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) b: 0f 85 22 01 00 00 jne 0x133 11: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 18: fc ff df 1b: 48 8b 6b 40 mov 0x40(%rbx),%rbp 1f: 48 8d 7d 18 lea 0x18(%rbp),%rdi 23: 48 89 fa mov %rdi,%rdx 26: 48 c1 ea 03 shr $0x3,%rdx * 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction 2e: 0f 85 f5 00 00 00 jne 0x129 34: 48 8d 7d 04 lea 0x4(%rbp),%rdi 38: 4c 8b 65 18 mov 0x18(%rbp),%r12 3c: 48 rex.W 3d: b8 .byte 0xb8