================================================================== BUG: KASAN: use-after-free in l2tp_session_queue_purge+0xe8/0x100 net/l2tp/l2tp_core.c:917 Read of size 4 at addr ffff8801c6dbe500 by task syzkaller511047/4339 ------------[ cut here ]------------ kernel BUG at net/l2tp/l2tp_core.c:917! invalid opcode: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 4379 Comm: syzkaller511047 Not tainted 4.9.77-ge12a9c4 #27 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801c6108000 task.stack: ffff8801c6320000 RIP: 0010:[] [] l2tp_session_queue_purge+0xde/0x100 net/l2tp/l2tp_core.c:917 RSP: 0018:ffff8801c6327950 EFLAGS: 00010293 RAX: ffff8801c6108000 RBX: ffff8801c6ca5b80 RCX: ffffffff83580f6e RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff8801c6ca5b80 RBP: ffff8801c6327978 R08: 1ffff10038c2111a R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801c6ca5b80 R13: ffff8801c10f4ce0 R14: ffff8801c63613d8 R15: ffffffff82ed49f0 FS: 0000000000000000(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000080bbf1b CR3: 00000001d6f96000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff8801c6361100 ffff8801c6ca5b80 ffff8801c10f4ce0 ffff8801c63613d8 ffffffff82ed49f0 ffff8801c63279a8 ffffffff8358d33f ffff8801c10f4cc0 ffffffff83f5f480 ffff8801c10f4ce8 0000000000000000 ffff8801c63279d8 Call Trace: [] pppol2tp_release+0x1ff/0x2e0 net/l2tp/l2tp_ppp.c:492 [] sock_release+0x8d/0x1e0 net/socket.c:599 [] sock_close+0x16/0x20 net/socket.c:1046 [] __fput+0x28c/0x6e0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x115/0x190 kernel/task_work.c:116 [] exit_task_work include/linux/task_work.h:21 [inline] [] do_exit+0x7e7/0x2a40 kernel/exit.c:833 [] do_group_exit+0x108/0x320 kernel/exit.c:937 [] get_signal+0x4d4/0x14e0 kernel/signal.c:2317 [] do_signal+0x87/0x1a00 arch/x86/kernel/signal.c:807 [] exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:156 [] prepare_exit_to_usermode+0xc8/0xe0 arch/x86/entry/common.c:190 [] retint_user+0x8/0x3c Code: e8 c8 a1 de fd 31 c0 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 b6 a1 de fd 48 89 df 41 ff d4 eb cc e8 a9 a1 de fd 0f 0b e8 a2 a1 de fd <0f> 0b 48 89 df e8 68 d2 fb fd e9 57 ff ff ff 4c 89 ff e8 7b d2 RIP [] l2tp_session_queue_purge+0xde/0x100 net/l2tp/l2tp_core.c:917 RSP ---[ end trace 429f9f36d08cfc1e ]---