[....] Starting enhanced syslogd: rsyslogd[ 15.909477] audit: type=1400 audit(1518876331.205:4): avc: denied { syslog } for pid=3645 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.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 executing program syzkaller login: [ 28.097963] l2tp_core: tunl 3: sockfd_lookup(fd=125) returned -88 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 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 [ 28.919891] ================================================================== [ 28.927261] BUG: KASAN: use-after-free in pppol2tp_session_destruct+0xe9/0x110 [ 28.934587] Read of size 4 at addr ffff8801c6ae1b80 by task syzkaller670880/3804 [ 28.942085] [ 28.943681] CPU: 1 PID: 3804 Comm: syzkaller670880 Not tainted 4.9.81-ga25ea24 #44 [ 28.951352] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.960676] ffff8801d7fefc18 ffffffff81d94de9 ffffea00071ab800 ffff8801c6ae1b80 [ 28.968649] 0000000000000000 ffff8801c6ae1b80 ffffffff82ed49f0 ffff8801d7fefc50 [ 28.976621] ffffffff8153e173 ffff8801c6ae1b80 0000000000000004 0000000000000000 [ 28.984587] Call Trace: [ 28.987146] [] dump_stack+0xc1/0x128 [ 28.992479] [] ? sock_release+0x1e0/0x1e0 [ 28.998247] [] print_address_description+0x73/0x280 [ 29.004884] [] ? sock_release+0x1e0/0x1e0 [ 29.010649] [] kasan_report+0x275/0x360 [ 29.016243] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 29.023146] [] __asan_report_load4_noabort+0x14/0x20 [ 29.029866] [] pppol2tp_session_destruct+0xe9/0x110 [ 29.036499] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 29.042789] [] __sk_destruct+0x53/0x570 [ 29.048384] [] ? sock_release+0x1e0/0x1e0 [ 29.054149] [] sk_destruct+0x47/0x80 [ 29.059483] [] __sk_free+0x57/0x230 [ 29.064729] [] sk_free+0x23/0x30 [ 29.069712] [] pppol2tp_release+0x23d/0x2e0 [ 29.075654] [] sock_release+0x8d/0x1e0 [ 29.081159] [] sock_close+0x16/0x20 [ 29.086406] [] __fput+0x28c/0x6e0 [ 29.091477] [] ____fput+0x15/0x20 [ 29.096550] [] task_work_run+0x115/0x190 [ 29.102229] [] exit_to_usermode_loop+0xfc/0x120 [ 29.108517] [] do_fast_syscall_32+0x5c3/0x870 [ 29.114635] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 29.121269] [] entry_SYSENTER_compat+0x74/0x83 [ 29.127468] [ 29.129065] Allocated by task 3803: [ 29.132663] save_stack_trace+0x16/0x20 [ 29.136609] save_stack+0x43/0xd0 [ 29.140032] kasan_kmalloc+0xad/0xe0 [ 29.143716] __kmalloc+0x11d/0x310 [ 29.147227] l2tp_session_create+0x38/0x1770 [ 29.151601] pppol2tp_connect+0x10fe/0x18f0 [ 29.155893] SYSC_connect+0x1b6/0x310 [ 29.159659] SyS_connect+0x24/0x30 [ 29.163165] do_fast_syscall_32+0x2f7/0x870 [ 29.167455] entry_SYSENTER_compat+0x74/0x83 [ 29.171827] [ 29.173422] Freed by task 3803: [ 29.176668] save_stack_trace+0x16/0x20 [ 29.180612] save_stack+0x43/0xd0 [ 29.184031] kasan_slab_free+0x72/0xc0 [ 29.187887] kfree+0x103/0x300 [ 29.191049] l2tp_session_free+0x166/0x200 [ 29.195255] l2tp_tunnel_closeall+0x26c/0x3a0 [ 29.199718] l2tp_udp_encap_destroy+0x87/0xe0 [ 29.204184] udpv6_destroy_sock+0xb1/0xd0 [ 29.208302] sk_common_release+0x6b/0x2f0 [ 29.212420] udp_lib_close+0x15/0x20 [ 29.216106] inet_release+0xfa/0x1d0 [ 29.219788] inet6_release+0x50/0x70 [ 29.224072] sock_release+0x8d/0x1e0 [ 29.227759] sock_close+0x16/0x20 [ 29.231180] __fput+0x28c/0x6e0 [ 29.234428] ____fput+0x15/0x20 [ 29.237677] task_work_run+0x115/0x190 [ 29.241533] exit_to_usermode_loop+0xfc/0x120 [ 29.245994] do_fast_syscall_32+0x5c3/0x870 [ 29.250285] entry_SYSENTER_compat+0x74/0x83 [ 29.254660] [ 29.256262] The buggy address belongs to the object at ffff8801c6ae1b80 [ 29.256262] which belongs to the cache kmalloc-512 of size 512 [ 29.268884] The buggy address is located 0 bytes inside of [ 29.268884] 512-byte region [ffff8801c6ae1b80, ffff8801c6ae1d80) [ 29.280637] The buggy address belongs to the page: [ 29.285535] page:ffffea00071ab800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 29.295700] flags: 0x8000000000004080(slab|head) [ 29.300422] page dumped because: kasan: bad access detected [ 29.306098] [ 29.307697] Memory state around the buggy address: [ 29.312593] ffff8801c6ae1a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.319918] ffff8801c6ae1b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.327245] >ffff8801c6ae1b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.334573] ^ [ 29.337908] ffff8801c6ae1c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.345234] ffff8801c6ae1c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.352562] ================================================================== [ 29.359886] Disabling lock debugging due to kernel taint [ 29.366072] Kernel panic - not syncing: panic_on_warn set ... [ 29.366072] [ 29.373431] CPU: 1 PID: 3804 Comm: syzkaller670880 Tainted: G B 4.9.81-ga25ea24 #44 [ 29.382320] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.391732] ffff8801d7fefb70 ffffffff81d94de9 ffffffff84197637 ffff8801d7fefc48 [ 29.399706] 0000000000000000 ffff8801c6ae1b80 ffffffff82ed49f0 ffff8801d7fefc38 [ 29.407674] ffffffff8142f621 0000000041b58ab3 ffffffff8418b0a8 ffffffff8142f465 [ 29.415653] Call Trace: [ 29.418214] [] dump_stack+0xc1/0x128 [ 29.423548] [] ? sock_release+0x1e0/0x1e0 [ 29.429316] [] panic+0x1bc/0x3a8 [ 29.434303] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 29.442502] [] ? preempt_schedule+0x25/0x30 [ 29.448442] [] ? ___preempt_schedule+0x16/0x18 [ 29.454643] [] kasan_end_report+0x50/0x50 [ 29.460409] [] kasan_report+0x167/0x360 [ 29.466001] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 29.472811] [] __asan_report_load4_noabort+0x14/0x20 [ 29.479532] [] pppol2tp_session_destruct+0xe9/0x110 [ 29.486166] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 29.492455] [] __sk_destruct+0x53/0x570 [ 29.498047] [] ? sock_release+0x1e0/0x1e0 [ 29.503816] [] sk_destruct+0x47/0x80 [ 29.509148] [] __sk_free+0x57/0x230 [ 29.514392] [] sk_free+0x23/0x30 [ 29.519378] [] pppol2tp_release+0x23d/0x2e0 [ 29.525319] [] sock_release+0x8d/0x1e0 [ 29.530826] [] sock_close+0x16/0x20 [ 29.536071] [] __fput+0x28c/0x6e0 [ 29.541142] [] ____fput+0x15/0x20 [ 29.546213] [] task_work_run+0x115/0x190 [ 29.551893] [] exit_to_usermode_loop+0xfc/0x120 [ 29.558180] [] do_fast_syscall_32+0x5c3/0x870 [ 29.564294] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 29.570929] [] entry_SYSENTER_compat+0x74/0x83 [ 29.577710] Dumping ftrace buffer: [ 29.581223] (ftrace buffer empty) [ 29.584903] Kernel Offset: disabled [ 29.588496] Rebooting in 86400 seconds..