kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 21588 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:__read_once_size include/linux/compiler.h:263 [inline] RIP: 0010:net_generic include/net/netns/generic.h:45 [inline] RIP: 0010:xfrmi_decode_session+0x1b4/0x770 net/xfrm/xfrm_interface.c:94 Code: 9d 62 fa 85 db 58 0f 85 89 03 00 00 e8 f5 9b 62 fa 49 8d bc 24 48 1b 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 4f 05 00 00 4d 8b a4 24 48 1b 00 00 e8 45 b4 50 RSP: 0018:ffff88803cbb7408 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000001 RCX: ffffc90005f1d000 RDX: 0000000000000469 RSI: ffffffff86ffe97b RDI: 0000000000002348 RBP: 0000000000000039 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000800 R13: 0000000000000045 R14: ffff88803bc0a040 R15: 0000000000000000 FS: 00007fe1f86ff700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30a25000 CR3: 00000000a0c01000 CR4: 00000000003406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __xfrm_policy_check+0x1eb/0x2300 net/xfrm/xfrm_policy.c:2339 __xfrm_policy_check2 include/net/xfrm.h:1202 [inline] xfrm_policy_check include/net/xfrm.h:1207 [inline] xfrm4_policy_check include/net/xfrm.h:1212 [inline] vti_input+0x57c/0x800 net/ipv4/ip_vti.c:63 xfrm4_esp_rcv+0xc8/0x220 net/ipv4/xfrm4_protocol.c:100 ip_local_deliver_finish+0x495/0xc00 net/ipv4/ip_input.c:215 NF_HOOK include/linux/netfilter.h:289 [inline] ip_local_deliver+0x188/0x500 net/ipv4/ip_input.c:256 dst_input include/net/dst.h:461 [inline] ip_rcv_finish+0x1ca/0x2e0 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] ip_rcv+0xca/0x3c0 net/ipv4/ip_input.c:524 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:4954 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5066 netif_receive_skb_internal+0xf0/0x3f0 net/core/dev.c:5156 napi_frags_finish net/core/dev.c:5684 [inline] napi_gro_frags+0x67b/0x990 net/core/dev.c:5757 tun_get_user+0x3029/0x5100 drivers/net/tun.c:1957 tun_chr_write_iter+0xdb/0x1d0 drivers/net/tun.c:2007 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fe1fa18d0d9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe1f86ff168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fe1fa2acf80 RCX: 00007fe1fa18d0d9 RDX: 000000000000003a RSI: 0000000020000240 RDI: 0000000000000003 RBP: 00007fe1fa1e8ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe48cabf9f R14: 00007fe1f86ff300 R15: 0000000000022000 Modules linked in: ---[ end trace df732099cc68f3b6 ]--- RIP: 0010:__read_once_size include/linux/compiler.h:263 [inline] RIP: 0010:net_generic include/net/netns/generic.h:45 [inline] RIP: 0010:xfrmi_decode_session+0x1b4/0x770 net/xfrm/xfrm_interface.c:94 Code: 9d 62 fa 85 db 58 0f 85 89 03 00 00 e8 f5 9b 62 fa 49 8d bc 24 48 1b 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 4f 05 00 00 4d 8b a4 24 48 1b 00 00 e8 45 b4 50 RSP: 0018:ffff88803cbb7408 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000001 RCX: ffffc90005f1d000 RDX: 0000000000000469 RSI: ffffffff86ffe97b RDI: 0000000000002348 RBP: 0000000000000039 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000800 R13: 0000000000000045 R14: ffff88803bc0a040 R15: 0000000000000000 FS: 00007fe1f86ff700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30a25000 CR3: 00000000a0c01000 CR4: 00000000003406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: fa cli 1: 85 db test %ebx,%ebx 3: 58 pop %rax 4: 0f 85 89 03 00 00 jne 0x393 a: e8 f5 9b 62 fa callq 0xfa629c04 f: 49 8d bc 24 48 1b 00 lea 0x1b48(%r12),%rdi 16: 00 17: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 1e: fc ff df 21: 48 89 fa mov %rdi,%rdx 24: 48 c1 ea 03 shr $0x3,%rdx * 28: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction 2c: 0f 85 4f 05 00 00 jne 0x581 32: 4d 8b a4 24 48 1b 00 mov 0x1b48(%r12),%r12 39: 00 3a: e8 .byte 0xe8 3b: 45 b4 50 rex.RB mov $0x50,%r12b