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: 5332 Comm: read_btree_node Not tainted 6.13.0-rc6-syzkaller-00290-gbe548645527a #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 29 9e 7f fd 48 8b 1b 48 8d 7b 18 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 05 e8 0f 9e 7f fd 4c 8b 7b 18 48 83 c3 04 48 89 RSP: 0018:ffffc9000d416358 EFLAGS: 00010202 RAX: 0000000000000004 RBX: 0000000000000008 RCX: ffff8880009ec880 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000020 RBP: ffffc9000d416c50 R08: ffffc9000d41649f R09: 0000000000000000 R10: ffffc9000d416490 R11: fffff52001a82c94 R12: dffffc0000000000 R13: 0000000000000008 R14: ffffc9000d416460 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005618e885e038 CR3: 0000000042c44000 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+0xb9f/0xd70 fs/bcachefs/checksum.c:158 gen_poly_key fs/bcachefs/checksum.c:200 [inline] bch2_checksum+0x1fc/0x770 fs/bcachefs/checksum.c:236 bch2_btree_node_read_done+0x134c/0x5e90 fs/bcachefs/btree_io.c:1097 btree_node_read_work+0x68b/0x1260 fs/bcachefs/btree_io.c:1323 bch2_btree_node_read+0x2433/0x29f0 bch2_btree_node_fill+0xc77/0x12f0 fs/bcachefs/btree_cache.c:991 bch2_btree_node_get_noiter+0x9d5/0xf70 fs/bcachefs/btree_cache.c:1260 found_btree_node_is_readable fs/bcachefs/btree_node_scan.c:85 [inline] try_read_btree_node fs/bcachefs/btree_node_scan.c:193 [inline] read_btree_nodes_worker+0x13c5/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 29 9e 7f fd 48 8b 1b 48 8d 7b 18 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 05 e8 0f 9e 7f fd 4c 8b 7b 18 48 83 c3 04 48 89 RSP: 0018:ffffc9000d416358 EFLAGS: 00010202 RAX: 0000000000000004 RBX: 0000000000000008 RCX: ffff8880009ec880 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000020 RBP: ffffc9000d416c50 R08: ffffc9000d41649f R09: 0000000000000000 R10: ffffc9000d416490 R11: fffff52001a82c94 R12: dffffc0000000000 R13: 0000000000000008 R14: ffffc9000d416460 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005618e885e038 CR3: 0000000011da2000 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 29 9e 7f fd call 0xfd7f9e45 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 0f 9e 7f fd call 0xfd7f9e45 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