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: 0 UID: 0 PID: 5325 Comm: read_btree_node Not tainted 6.13.0-rc7-syzkaller-00043-g619f0b6fad52 #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:crypto_skcipher_alg include/crypto/skcipher.h:375 [inline] RIP: 0010:crypto_skcipher_encrypt+0x45/0x130 crypto/skcipher.c:637 Code: 19 fd 49 8d 5e 40 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 59 9b 7f fd 48 8b 1b 48 8d 7b 18 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 05 e8 3f 9b 7f fd 4c 8b 7b 18 48 83 c3 04 48 89 RSP: 0018:ffffc9000d557218 EFLAGS: 00010202 RAX: 0000000000000004 RBX: 0000000000000008 RCX: ffff88801aae0000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000020 RBP: ffffc9000d557b10 R08: ffffc9000d5577bf R09: 0000000000000000 R10: ffffc9000d5577b0 R11: fffff52001aaaef8 R12: dffffc0000000000 R13: 0000000000000070 R14: ffffc9000d557780 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000560c7e3d2950 CR3: 0000000012534000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: do_encrypt_sg fs/bcachefs/checksum.c:108 [inline] do_encrypt+0x992/0xd70 fs/bcachefs/checksum.c:124 try_read_btree_node fs/bcachefs/btree_node_scan.c:165 [inline] read_btree_nodes_worker+0xac9/0x2220 fs/bcachefs/btree_node_scan.c:242 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:crypto_skcipher_alg include/crypto/skcipher.h:375 [inline] RIP: 0010:crypto_skcipher_encrypt+0x45/0x130 crypto/skcipher.c:637 Code: 19 fd 49 8d 5e 40 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 59 9b 7f fd 48 8b 1b 48 8d 7b 18 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 05 e8 3f 9b 7f fd 4c 8b 7b 18 48 83 c3 04 48 89 RSP: 0018:ffffc9000d557218 EFLAGS: 00010202 RAX: 0000000000000004 RBX: 0000000000000008 RCX: ffff88801aae0000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000020 RBP: ffffc9000d557b10 R08: ffffc9000d5577bf R09: 0000000000000000 R10: ffffc9000d5577b0 R11: fffff52001aaaef8 R12: dffffc0000000000 R13: 0000000000000070 R14: ffffc9000d557780 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055cf456e90b8 CR3: 0000000011816000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 19 fd sbb %edi,%ebp 2: 49 8d 5e 40 lea 0x40(%r14),%rbx 6: 48 89 d8 mov %rbx,%rax 9: 48 c1 e8 03 shr $0x3,%rax d: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) 12: 74 08 je 0x1c 14: 48 89 df mov %rbx,%rdi 17: e8 59 9b 7f fd call 0xfd7f9b75 1c: 48 8b 1b mov (%rbx),%rbx 1f: 48 8d 7b 18 lea 0x18(%rbx),%rdi 23: 48 89 f8 mov %rdi,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) <-- trapping instruction 2f: 74 05 je 0x36 31: e8 3f 9b 7f fd call 0xfd7f9b75 36: 4c 8b 7b 18 mov 0x18(%rbx),%r15 3a: 48 83 c3 04 add $0x4,%rbx 3e: 48 rex.W 3f: 89 .byte 0x89