[....] Starting enhanced syslogd: rsyslogd[ 9.734327] audit: type=1400 audit(1516292558.100:4): avc: denied { syslog } for pid=3162 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.8' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 34.835282] ================================================================== [ 34.836385] BUG: KASAN: use-after-free in pppol2tp_session_destruct+0xe9/0x110 [ 34.837373] Read of size 4 at addr ffff8801cc51d180 by task syzkaller513263/3339 [ 34.838377] [ 34.838615] CPU: 1 PID: 3339 Comm: syzkaller513263 Not tainted 4.9.77-g033d019 #14 [ 34.839624] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.840885] ffff8801c78efc60 ffffffff81d941c9 ffffea0007314700 ffff8801cc51d180 [ 34.842037] 0000000000000000 ffff8801cc51d180 ffffffff82ed49f0 ffff8801c78efc98 [ 34.843249] ffffffff8153db93 ffff8801cc51d180 0000000000000004 0000000000000000 [ 34.844398] Call Trace: [ 34.844759] [] dump_stack+0xc1/0x128 [ 34.845501] [] ? sock_release+0x1e0/0x1e0 [ 34.846290] [] print_address_description+0x73/0x280 [ 34.847171] [] ? sock_release+0x1e0/0x1e0 [ 34.847958] [] kasan_report+0x275/0x360 [ 34.848710] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 34.849610] [] __asan_report_load4_noabort+0x14/0x20 [ 34.850532] [] pppol2tp_session_destruct+0xe9/0x110 [ 34.851409] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 34.852246] [] __sk_destruct+0x53/0x570 [ 34.852994] [] ? sock_release+0x1e0/0x1e0 [ 34.853760] [] sk_destruct+0x47/0x80 [ 34.854470] [] __sk_free+0x57/0x230 [ 34.855171] [] sk_free+0x23/0x30 [ 34.858739] [] pppol2tp_release+0x23d/0x2e0 [ 34.864678] [] sock_release+0x8d/0x1e0 [ 34.870186] [] sock_close+0x16/0x20 [ 34.875435] [] __fput+0x28c/0x6e0 [ 34.880509] [] ____fput+0x15/0x20 [ 34.885579] [] task_work_run+0x115/0x190 [ 34.891258] [] exit_to_usermode_loop+0xfc/0x120 [ 34.897544] [] syscall_return_slowpath+0x1a0/0x1e0 [ 34.904090] [] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 34.910632] [ 34.912229] Allocated by task 3338: [ 34.915825] save_stack_trace+0x16/0x20 [ 34.919767] save_stack+0x43/0xd0 [ 34.923187] kasan_kmalloc+0xad/0xe0 [ 34.926867] __kmalloc+0x11d/0x310 [ 34.930373] l2tp_session_create+0x38/0x1770 [ 34.934746] pppol2tp_connect+0x10fe/0x18f0 [ 34.939037] SYSC_connect+0x1b6/0x310 [ 34.942802] SyS_connect+0x24/0x30 [ 34.946308] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 34.951028] [ 34.952622] Freed by task 3338: [ 34.955866] save_stack_trace+0x16/0x20 [ 34.959809] save_stack+0x43/0xd0 [ 34.963228] kasan_slab_free+0x72/0xc0 [ 34.967085] kfree+0x103/0x300 [ 34.970247] l2tp_session_free+0x166/0x200 [ 34.974446] l2tp_tunnel_closeall+0x26c/0x3a0 [ 34.978909] l2tp_udp_encap_destroy+0x87/0xe0 [ 34.983370] udpv6_destroy_sock+0xb1/0xd0 [ 34.987482] sk_common_release+0x6b/0x2f0 [ 34.991594] udp_lib_close+0x15/0x20 [ 34.995274] inet_release+0xfa/0x1d0 [ 34.998955] inet6_release+0x50/0x70 [ 35.002635] sock_release+0x8d/0x1e0 [ 35.006317] sock_close+0x16/0x20 [ 35.009738] __fput+0x28c/0x6e0 [ 35.012986] ____fput+0x15/0x20 [ 35.016233] task_work_run+0x115/0x190 [ 35.020085] exit_to_usermode_loop+0xfc/0x120 [ 35.024545] syscall_return_slowpath+0x1a0/0x1e0 [ 35.029265] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 35.033986] [ 35.035582] The buggy address belongs to the object at ffff8801cc51d180 [ 35.035582] which belongs to the cache kmalloc-512 of size 512 [ 35.048203] The buggy address is located 0 bytes inside of [ 35.048203] 512-byte region [ffff8801cc51d180, ffff8801cc51d380) [ 35.059869] The buggy address belongs to the page: [ 35.064767] page:ffffea0007314700 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 35.074933] flags: 0x8000000000004080(slab|head) [ 35.079654] page dumped because: kasan: bad access detected [ 35.085331] [ 35.086925] Memory state around the buggy address: [ 35.091821] ffff8801cc51d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.099148] ffff8801cc51d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 35.106474] >ffff8801cc51d180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.113816] ^ [ 35.117153] ffff8801cc51d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.124480] ffff8801cc51d280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.131807] ================================================================== [ 35.139133] Disabling lock debugging due to kernel taint [ 35.144976] Kernel panic - not syncing: panic_on_warn set ... [ 35.144976] [ 35.152314] CPU: 1 PID: 3339 Comm: syzkaller513263 Tainted: G B 4.9.77-g033d019 #14 [ 35.161202] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.170531] ffff8801c78efbb8 ffffffff81d941c9 ffffffff841970ff ffff8801c78efc90 [ 35.178495] 0000000000000000 ffff8801cc51d180 ffffffff82ed49f0 ffff8801c78efc80 [ 35.186455] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 35.194413] Call Trace: [ 35.196971] [] dump_stack+0xc1/0x128 [ 35.202305] [] ? sock_release+0x1e0/0x1e0 [ 35.208069] [] panic+0x1bc/0x3a8 [ 35.213055] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 35.221255] [] ? preempt_schedule+0x25/0x30 [ 35.227195] [] ? ___preempt_schedule+0x16/0x18 [ 35.233397] [] kasan_end_report+0x50/0x50 [ 35.239166] [] kasan_report+0x167/0x360 [ 35.244757] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 35.251563] [] __asan_report_load4_noabort+0x14/0x20 [ 35.258284] [] pppol2tp_session_destruct+0xe9/0x110 [ 35.264915] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 35.271205] [] __sk_destruct+0x53/0x570 [ 35.276795] [] ? sock_release+0x1e0/0x1e0 [ 35.282557] [] sk_destruct+0x47/0x80 [ 35.287887] [] __sk_free+0x57/0x230 [ 35.293147] [] sk_free+0x23/0x30 [ 35.298130] [] pppol2tp_release+0x23d/0x2e0 [ 35.304068] [] sock_release+0x8d/0x1e0 [ 35.309571] [] sock_close+0x16/0x20 [ 35.314812] [] __fput+0x28c/0x6e0 [ 35.319881] [] ____fput+0x15/0x20 [ 35.324950] [] task_work_run+0x115/0x190 [ 35.330628] [] exit_to_usermode_loop+0xfc/0x120 [ 35.336912] [] syscall_return_slowpath+0x1a0/0x1e0 [ 35.343470] [] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 35.350373] Dumping ftrace buffer: [ 35.353880] (ftrace buffer empty) [ 35.357559] Kernel Offset: disabled [ 35.361153] Rebooting in 86400 seconds..