bcachefs (loop1): mounting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,nojournal_transaction_names
bcachefs (loop1): 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: 5441 Comm: syz-executor.1 Not tainted 6.9.0-syzkaller-09868-g6e51b4b5bbc0 #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:ffffc90003d6e5e0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffffc90003d6e650 RCX: ffffc90005b21000
RDX: 0000000000000004 RSI: ffffffff8448d500 RDI: 0000000000000020
RBP: 0000000000000008 R08: 0000000000000020 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000003 R12: 0000000000000008
R13: 0000000000000020 R14: ffff88802571f9c0 R15: ffff88802571f9c0
FS:  00007eff2978c6c0(0000) GS:ffff88806b300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000002d744000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 do_encrypt_sg+0xcc/0x160 fs/bcachefs/checksum.c:108
 do_encrypt+0x26d/0x450 fs/bcachefs/checksum.c:150
 gen_poly_key.isra.0+0x16b/0x330 fs/bcachefs/checksum.c:191
 bch2_checksum+0x1f1/0x2e0 fs/bcachefs/checksum.c:227
 bch2_btree_node_read_done+0x766/0x4fd0 fs/bcachefs/btree_io.c:1069
 btree_node_read_work+0x567/0x1060 fs/bcachefs/btree_io.c:1340
 bch2_btree_node_read+0x8b3/0xe40 fs/bcachefs/btree_io.c:1725
 __bch2_btree_root_read fs/bcachefs/btree_io.c:1764 [inline]
 bch2_btree_root_read+0x2ca/0x690 fs/bcachefs/btree_io.c:1788
 read_btree_roots fs/bcachefs/recovery.c:472 [inline]
 bch2_fs_recovery+0x1ba8/0x3b60 fs/bcachefs/recovery.c:800
 bch2_fs_start+0x2e9/0x600 fs/bcachefs/super.c:1031
 bch2_fs_open+0xfa0/0x1110 fs/bcachefs/super.c:2123
 bch2_mount+0xdcc/0x1130 fs/bcachefs/fs.c:1917
 legacy_get_tree+0x109/0x220 fs/fs_context.c:662
 vfs_get_tree+0x8f/0x380 fs/super.c:1779
 do_new_mount fs/namespace.c:3352 [inline]
 path_mount+0x14e6/0x1f20 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]
 __x64_sys_mount+0x297/0x320 fs/namespace.c:3875
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7eff28a7e5ea
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007eff2978bef8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007eff2978bf80 RCX: 00007eff28a7e5ea
RDX: 0000000020011a00 RSI: 0000000020000000 RDI: 00007eff2978bf40
RBP: 0000000020011a00 R08: 00007eff2978bf80 R09: 0000000003a04000
R10: 0000000003a04000 R11: 0000000000000202 R12: 0000000020000000
R13: 00007eff2978bf40 R14: 0000000000011a04 R15: 0000000020000600
 </TASK>
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:ffffc90003d6e5e0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffffc90003d6e650 RCX: ffffc90005b21000
RDX: 0000000000000004 RSI: ffffffff8448d500 RDI: 0000000000000020
RBP: 0000000000000008 R08: 0000000000000020 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000003 R12: 0000000000000008
R13: 0000000000000020 R14: ffff88802571f9c0 R15: ffff88802571f9c0
FS:  00007eff2978c6c0(0000) GS:ffff88806b200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd97cb5358 CR3: 000000002d744000 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