[....] Starting enhanced syslogd: rsyslogd[ 13.429408] audit: type=1400 audit(1521122577.192:4): avc: denied { syslog } for pid=3647 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.44' (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 syzkaller login: [ 26.578610] ================================================================== [ 26.586000] BUG: KASAN: use-after-free in pppol2tp_session_destruct+0xe9/0x110 [ 26.593334] Read of size 4 at addr ffff8801c3b68280 by task syzkaller532619/3805 [ 26.600833] [ 26.602434] CPU: 1 PID: 3805 Comm: syzkaller532619 Not tainted 4.9.87-g3a3a084 #56 [ 26.610108] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.619439] ffff8801d835fc28 ffffffff81d95a19 ffffea00070eda00 ffff8801c3b68280 [ 26.627416] 0000000000000000 ffff8801c3b68280 ffffffff82ed69f0 ffff8801d835fc60 [ 26.635394] ffffffff8153e333 ffff8801c3b68280 0000000000000004 0000000000000000 [ 26.643369] Call Trace: [ 26.645934] [] dump_stack+0xc1/0x128 [ 26.651270] [] ? sock_release+0x1e0/0x1e0 [ 26.657040] [] print_address_description+0x73/0x280 [ 26.663679] [] ? sock_release+0x1e0/0x1e0 [ 26.669448] [] kasan_report+0x275/0x360 [ 26.675047] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 26.681859] [] __asan_report_load4_noabort+0x14/0x20 [ 26.688593] [] pppol2tp_session_destruct+0xe9/0x110 [ 26.695232] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 26.701523] [] __sk_destruct+0x53/0x570 [ 26.707130] [] ? sock_release+0x1e0/0x1e0 [ 26.712901] [] sk_destruct+0x47/0x80 [ 26.718233] [] __sk_free+0x57/0x230 [ 26.723479] [] sk_free+0x23/0x30 [ 26.728477] [] pppol2tp_release+0x23d/0x2e0 [ 26.734447] [] sock_release+0x8d/0x1e0 [ 26.739980] [] sock_close+0x16/0x20 [ 26.745237] [] __fput+0x28c/0x6e0 [ 26.750310] [] ____fput+0x15/0x20 [ 26.755385] [] task_work_run+0x115/0x190 [ 26.761069] [] exit_to_usermode_loop+0xfc/0x120 [ 26.767360] [] do_syscall_64+0x36f/0x490 [ 26.773043] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 26.779936] [ 26.781545] Allocated by task 3804: [ 26.785145] save_stack_trace+0x16/0x20 [ 26.789092] save_stack+0x43/0xd0 [ 26.792512] kasan_kmalloc+0xad/0xe0 [ 26.796194] __kmalloc+0x11d/0x310 [ 26.799724] l2tp_session_create+0x38/0x1770 [ 26.804107] pppol2tp_connect+0x10fe/0x18f0 [ 26.808400] SYSC_connect+0x1b6/0x310 [ 26.812172] SyS_connect+0x24/0x30 [ 26.815695] do_syscall_64+0x1a4/0x490 [ 26.819568] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 26.824641] [ 26.826241] Freed by task 3804: [ 26.829493] save_stack_trace+0x16/0x20 [ 26.833437] save_stack+0x43/0xd0 [ 26.836860] kasan_slab_free+0x72/0xc0 [ 26.840718] kfree+0x103/0x300 [ 26.843887] l2tp_session_free+0x166/0x200 [ 26.848092] l2tp_tunnel_closeall+0x26c/0x3a0 [ 26.852579] l2tp_udp_encap_destroy+0x87/0xe0 [ 26.857067] udpv6_destroy_sock+0xb1/0xd0 [ 26.861196] sk_common_release+0x6b/0x2f0 [ 26.865321] udp_lib_close+0x15/0x20 [ 26.869007] inet_release+0xfa/0x1d0 [ 26.872691] inet6_release+0x50/0x70 [ 26.876374] sock_release+0x8d/0x1e0 [ 26.880055] sock_close+0x16/0x20 [ 26.883482] __fput+0x28c/0x6e0 [ 26.886735] ____fput+0x15/0x20 [ 26.889985] task_work_run+0x115/0x190 [ 26.893842] exit_to_usermode_loop+0xfc/0x120 [ 26.898313] do_syscall_64+0x36f/0x490 [ 26.902171] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 26.907240] [ 26.908842] The buggy address belongs to the object at ffff8801c3b68280 [ 26.908842] which belongs to the cache kmalloc-512 of size 512 [ 26.921478] The buggy address is located 0 bytes inside of [ 26.921478] 512-byte region [ffff8801c3b68280, ffff8801c3b68480) [ 26.933161] The buggy address belongs to the page: [ 26.938064] page:ffffea00070eda00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.948234] flags: 0x8000000000004080(slab|head) [ 26.952963] page dumped because: kasan: bad access detected [ 26.958637] [ 26.960231] Memory state around the buggy address: [ 26.965129] ffff8801c3b68180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.972457] ffff8801c3b68200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.979794] >ffff8801c3b68280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.987122] ^ [ 26.990456] ffff8801c3b68300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.997783] ffff8801c3b68380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.005109] ================================================================== [ 27.012444] Disabling lock debugging due to kernel taint [ 27.018541] Kernel panic - not syncing: panic_on_warn set ... [ 27.018541] [ 27.025901] CPU: 1 PID: 3805 Comm: syzkaller532619 Tainted: G B 4.9.87-g3a3a084 #56 [ 27.034800] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.044133] ffff8801d835fb80 ffffffff81d95a19 ffffffff84197bf7 ffff8801d835fc58 [ 27.052099] 0000000000000000 ffff8801c3b68280 ffffffff82ed69f0 ffff8801d835fc48 [ 27.060063] ffffffff8142f7e1 0000000041b58ab3 ffffffff8418b658 ffffffff8142f625 [ 27.068029] Call Trace: [ 27.070590] [] dump_stack+0xc1/0x128 [ 27.075928] [] ? sock_release+0x1e0/0x1e0 [ 27.081698] [] panic+0x1bc/0x3a8 [ 27.086686] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.094907] [] ? preempt_schedule+0x25/0x30 [ 27.100935] [] ? ___preempt_schedule+0x16/0x18 [ 27.107147] [] kasan_end_report+0x50/0x50 [ 27.112914] [] kasan_report+0x167/0x360 [ 27.118519] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 27.125329] [] __asan_report_load4_noabort+0x14/0x20 [ 27.132054] [] pppol2tp_session_destruct+0xe9/0x110 [ 27.138688] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 27.144978] [] __sk_destruct+0x53/0x570 [ 27.150572] [] ? sock_release+0x1e0/0x1e0 [ 27.156341] [] sk_destruct+0x47/0x80 [ 27.161671] [] __sk_free+0x57/0x230 [ 27.166917] [] sk_free+0x23/0x30 [ 27.171902] [] pppol2tp_release+0x23d/0x2e0 [ 27.177847] [] sock_release+0x8d/0x1e0 [ 27.183360] [] sock_close+0x16/0x20 [ 27.188626] [] __fput+0x28c/0x6e0 [ 27.193704] [] ____fput+0x15/0x20 [ 27.198781] [] task_work_run+0x115/0x190 [ 27.204476] [] exit_to_usermode_loop+0xfc/0x120 [ 27.210766] [] do_syscall_64+0x36f/0x490 [ 27.216452] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 27.223790] Dumping ftrace buffer: [ 27.227307] (ftrace buffer empty) [ 27.230988] Kernel Offset: disabled [ 27.234583] Rebooting in 86400 seconds..