[....] Starting enhanced syslogd: rsyslogd[ 13.298331] audit: type=1400 audit(1516430358.030:4): avc: denied { syslog } for pid=3170 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 periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] 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.52' (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 syzkaller login: [ 25.135855] ================================================================== [ 25.144364] BUG: KASAN: use-after-free in pppol2tp_session_destruct+0xe9/0x110 [ 25.151694] Read of size 4 at addr ffff8801cd194c80 by task syzkaller000110/3327 [ 25.159192] [ 25.160794] CPU: 1 PID: 3327 Comm: syzkaller000110 Not tainted 4.9.77-ge12a9c4 #27 [ 25.168469] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.177799] ffff8801c8567c18 ffffffff81d941c9 ffffea0007346500 ffff8801cd194c80 [ 25.185771] 0000000000000000 ffff8801cd194c80 ffffffff82ed49f0 ffff8801c8567c50 [ 25.193758] ffffffff8153db93 ffff8801cd194c80 0000000000000004 0000000000000000 [ 25.201742] Call Trace: [ 25.204303] [] dump_stack+0xc1/0x128 [ 25.209641] [] ? sock_release+0x1e0/0x1e0 [ 25.215412] [] print_address_description+0x73/0x280 [ 25.222049] [] ? sock_release+0x1e0/0x1e0 [ 25.227818] [] kasan_report+0x275/0x360 [ 25.233424] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 25.240234] [] __asan_report_load4_noabort+0x14/0x20 [ 25.246971] [] pppol2tp_session_destruct+0xe9/0x110 [ 25.253608] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 25.259900] [] __sk_destruct+0x53/0x570 [ 25.265504] [] ? sock_release+0x1e0/0x1e0 [ 25.271272] [] sk_destruct+0x47/0x80 [ 25.276618] [] __sk_free+0x57/0x230 [ 25.281877] [] sk_free+0x23/0x30 [ 25.286864] [] pppol2tp_release+0x23d/0x2e0 [ 25.293768] [] sock_release+0x8d/0x1e0 [ 25.300925] [] sock_close+0x16/0x20 [ 25.308604] [] __fput+0x28c/0x6e0 [ 25.315851] [] ____fput+0x15/0x20 [ 25.321809] [] task_work_run+0x115/0x190 [ 25.327495] [] exit_to_usermode_loop+0xfc/0x120 [ 25.333787] [] do_fast_syscall_32+0x5de/0x890 [ 25.339902] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.346540] [] entry_SYSENTER_compat+0x74/0x83 [ 25.352743] [ 25.354351] Allocated by task 3326: [ 25.357949] save_stack_trace+0x16/0x20 [ 25.361906] save_stack+0x43/0xd0 [ 25.365331] kasan_kmalloc+0xad/0xe0 [ 25.369013] __kmalloc+0x11d/0x310 [ 25.372525] l2tp_session_create+0x38/0x1770 [ 25.376901] pppol2tp_connect+0x10fe/0x18f0 [ 25.381204] SYSC_connect+0x1b6/0x310 [ 25.384975] SyS_connect+0x24/0x30 [ 25.388486] do_fast_syscall_32+0x2f7/0x890 [ 25.392785] entry_SYSENTER_compat+0x74/0x83 [ 25.397159] [ 25.398757] Freed by task 3326: [ 25.402007] save_stack_trace+0x16/0x20 [ 25.405950] save_stack+0x43/0xd0 [ 25.409370] kasan_slab_free+0x72/0xc0 [ 25.413226] kfree+0x103/0x300 [ 25.416389] l2tp_session_free+0x166/0x200 [ 25.420591] l2tp_tunnel_closeall+0x26c/0x3a0 [ 25.425055] l2tp_udp_encap_destroy+0x87/0xe0 [ 25.429525] udpv6_destroy_sock+0xb1/0xd0 [ 25.433644] sk_common_release+0x6b/0x2f0 [ 25.437759] udp_lib_close+0x15/0x20 [ 25.441441] inet_release+0xfa/0x1d0 [ 25.445131] inet6_release+0x50/0x70 [ 25.448815] sock_release+0x8d/0x1e0 [ 25.453032] sock_close+0x16/0x20 [ 25.456464] __fput+0x28c/0x6e0 [ 25.459718] ____fput+0x15/0x20 [ 25.462971] task_work_run+0x115/0x190 [ 25.466824] exit_to_usermode_loop+0xfc/0x120 [ 25.471285] do_fast_syscall_32+0x5de/0x890 [ 25.475577] entry_SYSENTER_compat+0x74/0x83 [ 25.479949] [ 25.481547] The buggy address belongs to the object at ffff8801cd194c80 [ 25.481547] which belongs to the cache kmalloc-512 of size 512 [ 25.497837] The buggy address is located 0 bytes inside of [ 25.497837] 512-byte region [ffff8801cd194c80, ffff8801cd194e80) [ 25.509514] The buggy address belongs to the page: [ 25.514419] page:ffffea0007346500 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 25.524581] flags: 0x8000000000004080(slab|head) [ 25.529320] page dumped because: kasan: bad access detected [ 25.534998] [ 25.536595] Memory state around the buggy address: [ 25.541492] ffff8801cd194b80: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 25.548818] ffff8801cd194c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.556156] >ffff8801cd194c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.563481] ^ [ 25.566813] ffff8801cd194d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.574141] ffff8801cd194d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.581468] ================================================================== [ 25.588795] Disabling lock debugging due to kernel taint [ 25.594314] Kernel panic - not syncing: panic_on_warn set ... [ 25.594314] [ 25.601662] CPU: 1 PID: 3327 Comm: syzkaller000110 Tainted: G B 4.9.77-ge12a9c4 #27 [ 25.610563] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.622586] ffff8801c8567b70 ffffffff81d941c9 ffffffff841970ff ffff8801c8567c48 [ 25.630561] 0000000000000000 ffff8801cd194c80 ffffffff82ed49f0 ffff8801c8567c38 [ 25.638537] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 25.646511] Call Trace: [ 25.649074] [] dump_stack+0xc1/0x128 [ 25.654414] [] ? sock_release+0x1e0/0x1e0 [ 25.660184] [] panic+0x1bc/0x3a8 [ 25.665171] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 25.673371] [] ? preempt_schedule+0x25/0x30 [ 25.679315] [] ? ___preempt_schedule+0x16/0x18 [ 25.685517] [] kasan_end_report+0x50/0x50 [ 25.691284] [] kasan_report+0x167/0x360 [ 25.696879] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 25.703691] [] __asan_report_load4_noabort+0x14/0x20 [ 25.710414] [] pppol2tp_session_destruct+0xe9/0x110 [ 25.717051] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 25.723341] [] __sk_destruct+0x53/0x570 [ 25.728938] [] ? sock_release+0x1e0/0x1e0 [ 25.734733] [] sk_destruct+0x47/0x80 [ 25.740068] [] __sk_free+0x57/0x230 [ 25.745316] [] sk_free+0x23/0x30 [ 25.750302] [] pppol2tp_release+0x23d/0x2e0 [ 25.756245] [] sock_release+0x8d/0x1e0 [ 25.762362] [] sock_close+0x16/0x20 [ 25.767611] [] __fput+0x28c/0x6e0 [ 25.772685] [] ____fput+0x15/0x20 [ 25.777760] [] task_work_run+0x115/0x190 [ 25.783442] [] exit_to_usermode_loop+0xfc/0x120 [ 25.789733] [] do_fast_syscall_32+0x5de/0x890 [ 25.795851] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.802491] [] entry_SYSENTER_compat+0x74/0x83 [ 25.809446] Dumping ftrace buffer: [ 25.812958] (ftrace buffer empty) [ 25.816637] Kernel Offset: disabled [ 25.820232] Rebooting in 86400 seconds..