bisecting fixing commit since 672481c2deffb371d8a7dfdc009e44c09864a869 building syzkaller on be5c2c81971442d623dd1b265dabf4644ceeb35b testing commit 672481c2deffb371d8a7dfdc009e44c09864a869 with gcc (GCC) 8.1.0 kernel signature: 8d2fc51eeef614fc2ed3f96835613f2c8d8fb442d337e6a21bf0f7297826fc42 run #0: crashed: general protection fault in xfrmi_decode_session run #1: crashed: general protection fault in xfrmi_decode_session run #2: crashed: general protection fault in xfrmi_decode_session run #3: crashed: general protection fault in xfrmi_decode_session run #4: crashed: general protection fault in xfrmi_decode_session run #5: crashed: general protection fault in xfrmi_decode_session run #6: crashed: general protection fault in xfrmi_decode_session run #7: crashed: general protection fault in xfrmi_decode_session run #8: crashed: general protection fault in xfrmi_decode_session run #9: crashed: BUG: unable to handle kernel paging request in xfrmi_decode_session testing current HEAD 93556fb211fa7f1e18f869bdce0c225c25594942 testing commit 93556fb211fa7f1e18f869bdce0c225c25594942 with gcc (GCC) 8.1.0 kernel signature: 4daa41a84d063b8976fa984b830e29e2fde3cc987ac195022ff6e66762e01dd3 all runs: crashed: general protection fault in xfrmi_decode_session revisions tested: 2, total time: 27m6.633069415s (build: 18m42.450900602s, test: 7m5.254471046s) the crash still happens on HEAD commit msg: Linux 4.19.111 crash: general protection fault in xfrmi_decode_session 8021q: adding VLAN 0 to HW filter on device batadv0 8021q: adding VLAN 0 to HW filter on device batadv0 IPv6: ADDRCONF(NETDEV_UP): vxcan0: link is not ready 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 kasan: CONFIG_KASAN_INLINE enabled CPU: 1 PID: 7310 Comm: syz-executor.3 Not tainted 4.19.111-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:xs_net include/net/xfrm.h:253 [inline] RIP: 0010:xfrmi_decode_session+0x124/0x5b0 net/xfrm/xfrm_interface.c:94 Code: 7c dc 10 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 45 04 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5c dc 10 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 18 04 00 00 48 8b 1b e8 ba 36 6e fb 31 d2 45 31 RSP: 0018:ffff8880894af0c8 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff88809b2e6788 RBP: ffff8880894af0f0 R08: ffffed1015d64733 R09: ffffed1015d64732 kasan: GPF could be caused by NULL-ptr deref or user memory access R10: ffffed1015d64732 R11: ffff8880aeb23993 R12: ffff88809b2e6780 R13: 0000000000000039 R14: 000000000000000b R15: ffff8880a03e6dc0 FS: 00007ff243f49700(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000960004 CR3: 00000000965cb000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __xfrm_policy_check+0x198/0x23f0 net/xfrm/xfrm_policy.c:2342 __xfrm_policy_check2 include/net/xfrm.h:1201 [inline] xfrm_policy_check include/net/xfrm.h:1206 [inline] xfrm4_policy_check include/net/xfrm.h:1211 [inline] vti_input+0x3cb/0x620 net/ipv4/ip_vti.c:63 vti_rcv+0xff/0x130 net/ipv4/ip_vti.c:109 xfrm4_esp_rcv+0x84/0x160 net/ipv4/xfrm4_protocol.c:100 ip_local_deliver_finish+0x235/0x9e0 net/ipv4/ip_input.c:215 NF_HOOK include/linux/netfilter.h:289 [inline] ip_local_deliver+0x2f7/0x440 net/ipv4/ip_input.c:256 dst_input include/net/dst.h:453 [inline] ip_rcv_finish+0x166/0x270 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] ip_rcv+0xcb/0x2e0 net/ipv4/ip_input.c:524 __netif_receive_skb_one_core+0xe9/0x170 net/core/dev.c:4947 __netif_receive_skb+0x1f/0x1b0 net/core/dev.c:5059 netif_receive_skb_internal+0xca/0x300 net/core/dev.c:5149 napi_frags_finish net/core/dev.c:5676 [inline] napi_gro_frags+0x4b3/0x8e0 net/core/dev.c:5749 tun_get_user+0x25ec/0x47d0 drivers/net/tun.c:1943 tun_chr_write_iter+0xaf/0x150 drivers/net/tun.c:1989 call_write_iter include/linux/fs.h:1820 [inline] do_iter_readv_writev+0x4ae/0x960 fs/read_write.c:681 do_iter_write+0x12a/0x510 fs/read_write.c:960 vfs_writev+0x16f/0x2d0 fs/read_write.c:1005 do_writev+0x110/0x330 fs/read_write.c:1040 __do_sys_writev fs/read_write.c:1113 [inline] __se_sys_writev fs/read_write.c:1110 [inline] __x64_sys_writev+0x70/0xb0 fs/read_write.c:1110 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a7d1 Code: 75 14 b8 14 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 e4 b7 fb ff c3 48 83 ec 08 e8 fa 2c 00 00 48 89 04 24 b8 14 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 43 2d 00 00 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ff243f48ba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 0000000000000036 RCX: 000000000045a7d1 RDX: 0000000000000001 RSI: 00007ff243f48c00 RDI: 00000000000000f0 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 00007ff243f499d0 R11: 0000000000000293 R12: 00007ff243f496d4 R13: 00000000004cab2a R14: 00000000004e4078 R15: 00000000ffffffff Modules linked in: general protection fault: 0000 [#2] PREEMPT SMP KASAN ---[ end trace 5eb24a60ef401248 ]--- CPU: 0 PID: 7313 Comm: syz-executor.0 Tainted: G D 4.19.111-syzkaller #0 RIP: 0010:xs_net include/net/xfrm.h:253 [inline] RIP: 0010:xfrmi_decode_session+0x124/0x5b0 net/xfrm/xfrm_interface.c:94 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:xs_net include/net/xfrm.h:253 [inline] RIP: 0010:xfrmi_decode_session+0x124/0x5b0 net/xfrm/xfrm_interface.c:94 Code: 7c dc 10 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 45 04 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5c dc 10 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 18 04 00 00 48 8b 1b e8 ba 36 6e fb 31 d2 45 31 RSP: 0018:ffff88809fde70c8 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0f0e0d0c00000000 RCX: ffffffff85de8886 RDX: 01e1c1a180000000 RSI: 0000000000000002 RDI: ffff88809b2e6f88 RBP: ffff88809fde70f0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88809b2e6f80 R13: 0000000000000039 R14: 000000000000000b R15: ffff8880a7ade040 FS: 00007fc43cc78700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 Code: 7c dc 10 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 45 04 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5c dc 10 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 18 04 00 00 48 8b 1b e8 ba 36 6e fb 31 d2 45 31 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000960004 CR3: 000000007a6f4000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __xfrm_policy_check+0x198/0x23f0 net/xfrm/xfrm_policy.c:2342 RSP: 0018:ffff8880894af0c8 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 __xfrm_policy_check2 include/net/xfrm.h:1201 [inline] xfrm_policy_check include/net/xfrm.h:1206 [inline] xfrm4_policy_check include/net/xfrm.h:1211 [inline] vti_input+0x3cb/0x620 net/ipv4/ip_vti.c:63 vti_rcv+0xff/0x130 net/ipv4/ip_vti.c:109 xfrm4_esp_rcv+0x84/0x160 net/ipv4/xfrm4_protocol.c:100 RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff88809b2e6788 ip_local_deliver_finish+0x235/0x9e0 net/ipv4/ip_input.c:215 RBP: ffff8880894af0f0 R08: ffffed1015d64733 R09: ffffed1015d64732 NF_HOOK include/linux/netfilter.h:289 [inline] ip_local_deliver+0x2f7/0x440 net/ipv4/ip_input.c:256 R10: ffffed1015d64732 R11: ffff8880aeb23993 R12: ffff88809b2e6780 dst_input include/net/dst.h:453 [inline] ip_rcv_finish+0x166/0x270 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] ip_rcv+0xcb/0x2e0 net/ipv4/ip_input.c:524 R13: 0000000000000039 R14: 000000000000000b R15: ffff8880a03e6dc0 __netif_receive_skb_one_core+0xe9/0x170 net/core/dev.c:4947 FS: 00007ff243f49700(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 __netif_receive_skb+0x1f/0x1b0 net/core/dev.c:5059 CR2: 0000000000960004 CR3: 00000000965cb000 CR4: 00000000001406e0 netif_receive_skb_internal+0xca/0x300 net/core/dev.c:5149 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 napi_frags_finish net/core/dev.c:5676 [inline] napi_gro_frags+0x4b3/0x8e0 net/core/dev.c:5749 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 tun_get_user+0x25ec/0x47d0 drivers/net/tun.c:1943