bisecting fixing commit since f6e27dbb1afabcba436e346d6aa88a592a1436bb building syzkaller on e38a6630eb6b89a4b3c344dc62ecb3b60f078028 testing commit f6e27dbb1afabcba436e346d6aa88a592a1436bb with gcc (GCC) 8.1.0 kernel signature: 3d9eb6c9da70e3ef2dc988d9b1765d0c4f6fc00f463503c516c4a9e7b0efd7aa run #0: crashed: KASAN: use-after-free Read in l2tp_session_create run #1: crashed: KASAN: use-after-free Read in pppol2tp_session_close run #2: crashed: KASAN: use-after-free Read in pppol2tp_session_close run #3: crashed: KASAN: use-after-free Read in pppol2tp_session_close run #4: crashed: KASAN: use-after-free Read in lock_sock_nested run #5: crashed: KASAN: use-after-free Read in pppol2tp_session_close run #6: crashed: KASAN: use-after-free Read in pppol2tp_session_close run #7: crashed: KASAN: use-after-free Read in pppol2tp_session_close run #8: crashed: KASAN: use-after-free Read in l2tp_session_create run #9: crashed: KASAN: use-after-free Read in pppol2tp_session_close testing current HEAD 4f68020fef1c6cf1b680ffb6481ac41379283ea3 testing commit 4f68020fef1c6cf1b680ffb6481ac41379283ea3 with gcc (GCC) 8.1.0 kernel signature: e9e3071254827b5ee3811593f40c8a193e8bb9a0ae262cd6ab13feb7debb8b42 all runs: crashed: general protection fault in pppol2tp_session_init revisions tested: 2, total time: 22m29.813012482s (build: 15m39.721847071s, test: 6m9.059824828s) the crash still happens on HEAD commit msg: Linux 4.14.182 crash: general protection fault in pppol2tp_session_init IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready 8021q: adding VLAN 0 to HW filter on device batadv0 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 Modules linked in: CPU: 0 PID: 8399 Comm: syz-executor.4 Not tainted 4.14.182-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8880961ce000 task.stack: ffff8880a9bb8000 RIP: 0010:__read_once_size include/linux/compiler.h:183 [inline] RIP: 0010:sk_dst_get include/net/sock.h:1766 [inline] RIP: 0010:pppol2tp_session_init+0x1c1/0x480 net/l2tp/l2tp_ppp.c:616 RSP: 0018:ffff8880a9bbfb88 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff88808debc000 RCX: 1ffffffff0edabac RDX: 0000000000000045 RSI: ffffffff86bce3a0 RDI: 0000000000000228 RBP: ffff8880a9bbfbb0 R08: ffff8880961ce8d0 R09: 0000000000000000 R10: 0000000000000028 R11: ffff8880961ce000 R12: 0000000000000000 R13: 00000000000020cf R14: ffff8880a9bbfd28 R15: ffff88809609f300 FS: 00007f7f41515700(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000758080 CR3: 00000000973a8000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: pppol2tp_connect+0xce4/0x1380 net/l2tp/l2tp_ppp.c:790 SYSC_connect+0x1e3/0x2a0 net/socket.c:1655 SyS_connect+0x9/0x10 net/socket.c:1636 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x459a29 RSP: 002b:00007f7f41514c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459a29 RDX: 0000000000000026 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7f415156d4 R13: 00000000004bff90 R14: 00000000004d1f00 R15: 00000000ffffffff Code: 5a 85 c0 74 0d 80 3d 9c ea 9c 02 00 0f 84 0c 02 00 00 49 8d bc 24 28 02 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 8d 02 00 00 4d 8b b4 24 28 02 00 00 e8 08 01 RIP: __read_once_size include/linux/compiler.h:183 [inline] RSP: ffff8880a9bbfb88 RIP: sk_dst_get include/net/sock.h:1766 [inline] RSP: ffff8880a9bbfb88 RIP: pppol2tp_session_init+0x1c1/0x480 net/l2tp/l2tp_ppp.c:616 RSP: ffff8880a9bbfb88 ---[ end trace 97726a150a64acad ]---