[....] Starting enhanced syslogd: rsyslogd[ 16.204112] audit: type=1400 audit(1517314083.849:4): avc: denied { syslog } for pid=3915 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.15.215' (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 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 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: [ 37.178801] ================================================================== [ 37.186193] BUG: KASAN: use-after-free in pppol2tp_session_destruct+0xe9/0x110 [ 37.193523] Read of size 4 at addr ffff8801cb31a280 by task syzkaller147025/4335 [ 37.201023] [ 37.202622] CPU: 1 PID: 4335 Comm: syzkaller147025 Not tainted 4.9.78-g7be1985 #33 [ 37.210295] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.219621] ffff8801d074fc18 ffffffff81d94409 ffffea00072cc680 ffff8801cb31a280 [ 37.228246] 0000000000000000 ffff8801cb31a280 ffffffff82ed49f0 ffff8801d074fc50 [ 37.236211] ffffffff8153dc73 ffff8801cb31a280 0000000000000004 0000000000000000 [ 37.244175] Call Trace: [ 37.246735] [] dump_stack+0xc1/0x128 [ 37.252066] [] ? sock_release+0x1e0/0x1e0 [ 37.257840] [] print_address_description+0x73/0x280 [ 37.264474] [] ? sock_release+0x1e0/0x1e0 [ 37.270236] [] kasan_report+0x275/0x360 [ 37.275831] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 37.282645] [] __asan_report_load4_noabort+0x14/0x20 [ 37.289363] [] pppol2tp_session_destruct+0xe9/0x110 [ 37.295995] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 37.302279] [] __sk_destruct+0x53/0x570 [ 37.307870] [] ? sock_release+0x1e0/0x1e0 [ 37.313634] [] sk_destruct+0x47/0x80 [ 37.318964] [] __sk_free+0x57/0x230 [ 37.324207] [] sk_free+0x23/0x30 [ 37.329192] [] pppol2tp_release+0x23d/0x2e0 [ 37.335131] [] sock_release+0x8d/0x1e0 [ 37.340638] [] sock_close+0x16/0x20 [ 37.345883] [] __fput+0x28c/0x6e0 [ 37.350952] [] ____fput+0x15/0x20 [ 37.356020] [] task_work_run+0x115/0x190 [ 37.361700] [] exit_to_usermode_loop+0xfc/0x120 [ 37.367983] [] do_fast_syscall_32+0x5de/0x890 [ 37.374093] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.380741] [] entry_SYSENTER_compat+0x74/0x83 [ 37.386939] [ 37.388537] Allocated by task 4335: [ 37.392132] save_stack_trace+0x16/0x20 [ 37.396071] save_stack+0x43/0xd0 [ 37.399493] kasan_kmalloc+0xad/0xe0 [ 37.403170] __kmalloc+0x11d/0x310 [ 37.406676] l2tp_session_create+0x38/0x1770 [ 37.411049] pppol2tp_connect+0x10fe/0x18f0 [ 37.415337] SYSC_connect+0x1b6/0x310 [ 37.419102] SyS_connect+0x24/0x30 [ 37.422606] do_fast_syscall_32+0x2f7/0x890 [ 37.426893] entry_SYSENTER_compat+0x74/0x83 [ 37.431265] [ 37.432859] Freed by task 4336: [ 37.436108] save_stack_trace+0x16/0x20 [ 37.440056] save_stack+0x43/0xd0 [ 37.443476] kasan_slab_free+0x72/0xc0 [ 37.447329] kfree+0x103/0x300 [ 37.450488] l2tp_session_free+0x166/0x200 [ 37.454689] l2tp_tunnel_closeall+0x26c/0x3a0 [ 37.459149] l2tp_udp_encap_destroy+0x87/0xe0 [ 37.463615] udpv6_destroy_sock+0xb1/0xd0 [ 37.467746] sk_common_release+0x6b/0x2f0 [ 37.471861] udp_lib_close+0x15/0x20 [ 37.475540] inet_release+0xfa/0x1d0 [ 37.479223] inet6_release+0x50/0x70 [ 37.482902] sock_release+0x8d/0x1e0 [ 37.486582] sock_close+0x16/0x20 [ 37.490002] __fput+0x28c/0x6e0 [ 37.493248] ____fput+0x15/0x20 [ 37.496495] task_work_run+0x115/0x190 [ 37.500358] exit_to_usermode_loop+0xfc/0x120 [ 37.504821] do_fast_syscall_32+0x5de/0x890 [ 37.509113] entry_SYSENTER_compat+0x74/0x83 [ 37.513604] [ 37.515204] The buggy address belongs to the object at ffff8801cb31a280 [ 37.515204] which belongs to the cache kmalloc-512 of size 512 [ 37.527830] The buggy address is located 0 bytes inside of [ 37.527830] 512-byte region [ffff8801cb31a280, ffff8801cb31a480) [ 37.539496] The buggy address belongs to the page: [ 37.544400] page:ffffea00072cc680 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 37.554565] flags: 0x8000000000004080(slab|head) [ 37.559283] page dumped because: kasan: bad access detected [ 37.564955] [ 37.566548] Memory state around the buggy address: [ 37.571443] ffff8801cb31a180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.578766] ffff8801cb31a200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.586093] >ffff8801cb31a280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.593418] ^ [ 37.596751] ffff8801cb31a300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.604079] ffff8801cb31a380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.611402] ================================================================== [ 37.618733] Disabling lock debugging due to kernel taint [ 37.624364] Kernel panic - not syncing: panic_on_warn set ... [ 37.624364] [ 37.631705] CPU: 1 PID: 4335 Comm: syzkaller147025 Tainted: G B 4.9.78-g7be1985 #33 [ 37.640595] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.650007] ffff8801d074fb70 ffffffff81d94409 ffffffff841971bf ffff8801d074fc48 [ 37.657972] 0000000000000000 ffff8801cb31a280 ffffffff82ed49f0 ffff8801d074fc38 [ 37.665933] ffffffff8142f4a1 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f2e5 [ 37.673897] Call Trace: [ 37.676452] [] dump_stack+0xc1/0x128 [ 37.681785] [] ? sock_release+0x1e0/0x1e0 [ 37.687550] [] panic+0x1bc/0x3a8 [ 37.692533] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 37.700729] [] ? preempt_schedule+0x25/0x30 [ 37.706667] [] ? ___preempt_schedule+0x16/0x18 [ 37.712867] [] kasan_end_report+0x50/0x50 [ 37.718632] [] kasan_report+0x167/0x360 [ 37.724222] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 37.731029] [] __asan_report_load4_noabort+0x14/0x20 [ 37.737758] [] pppol2tp_session_destruct+0xe9/0x110 [ 37.744390] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 37.750675] [] __sk_destruct+0x53/0x570 [ 37.756266] [] ? sock_release+0x1e0/0x1e0 [ 37.762031] [] sk_destruct+0x47/0x80 [ 37.767360] [] __sk_free+0x57/0x230 [ 37.772602] [] sk_free+0x23/0x30 [ 37.777582] [] pppol2tp_release+0x23d/0x2e0 [ 37.783520] [] sock_release+0x8d/0x1e0 [ 37.789025] [] sock_close+0x16/0x20 [ 37.794275] [] __fput+0x28c/0x6e0 [ 37.799342] [] ____fput+0x15/0x20 [ 37.804585] [] task_work_run+0x115/0x190 [ 37.810261] [] exit_to_usermode_loop+0xfc/0x120 [ 37.816545] [] do_fast_syscall_32+0x5de/0x890 [ 37.822656] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.829300] [] entry_SYSENTER_compat+0x74/0x83 [ 37.835903] Dumping ftrace buffer: [ 37.839411] (ftrace buffer empty) [ 37.843087] Kernel Offset: disabled [ 37.846680] Rebooting in 86400 seconds..