[....] Starting enhanced syslogd: rsyslogd[ 10.133169] audit: type=1400 audit(1516177683.215:4): avc: denied { syslog } for pid=3168 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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.15.226' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 41.146144] ================================================================== [ 41.147389] BUG: KASAN: use-after-free in l2tp_session_queue_purge+0xe8/0x100 [ 41.148367] Read of size 4 at addr ffff8801c9b38780 by task syzkaller768728/3342 [ 41.149658] [ 41.149933] CPU: 0 PID: 3342 Comm: syzkaller768728 Not tainted 4.9.76-g8dec074 #13 [ 41.151098] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.152379] ffff8801c8147ce0 ffffffff81d93169 ffffea000726ce00 ffff8801c9b38780 [ 41.153750] 0000000000000000 ffff8801c9b38780 ffffffff82ed29f0 ffff8801c8147d18 [ 41.155109] ffffffff8153cb43 ffff8801c9b38780 0000000000000004 0000000000000000 [ 41.156380] Call Trace: [ 41.156820] [] dump_stack+0xc1/0x128 [ 41.157552] [] ? sock_release+0x1e0/0x1e0 [ 41.158325] [] print_address_description+0x73/0x280 [ 41.159218] [] ? sock_release+0x1e0/0x1e0 [ 41.159986] [] kasan_report+0x275/0x360 [ 41.160730] [] ? l2tp_session_queue_purge+0xe8/0x100 [ 41.161661] [] __asan_report_load4_noabort+0x14/0x20 [ 41.162553] [] l2tp_session_queue_purge+0xe8/0x100 [ 41.163423] [] ? sock_release+0x1e0/0x1e0 [ 41.164202] [] pppol2tp_release+0x1ff/0x2e0 [ 41.164994] [] sock_release+0x8d/0x1e0 [ 41.165745] [] sock_close+0x16/0x20 [ 41.167858] [] __fput+0x28c/0x6e0 [ 41.172928] [] ____fput+0x15/0x20 [ 41.178001] [] task_work_run+0x115/0x190 [ 41.183680] [] exit_to_usermode_loop+0xfc/0x120 [ 41.189966] [] syscall_return_slowpath+0x1a0/0x1e0 [ 41.196513] [] entry_SYSCALL_64_fastpath+0xe0/0xe2 [ 41.203058] [ 41.204661] Allocated by task 3341: [ 41.208261] save_stack_trace+0x16/0x20 [ 41.212204] save_stack+0x43/0xd0 [ 41.215627] kasan_kmalloc+0xad/0xe0 [ 41.219311] __kmalloc+0x11d/0x310 [ 41.222816] l2tp_session_create+0x38/0x1770 [ 41.227192] pppol2tp_connect+0x10fe/0x18f0 [ 41.231483] SYSC_connect+0x1b6/0x310 [ 41.235252] SyS_connect+0x24/0x30 [ 41.238761] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 41.243480] [ 41.245080] Freed by task 3341: [ 41.248326] save_stack_trace+0x16/0x20 [ 41.252266] save_stack+0x43/0xd0 [ 41.255686] kasan_slab_free+0x72/0xc0 [ 41.259542] kfree+0x103/0x300 [ 41.262702] l2tp_session_free+0x166/0x200 [ 41.266905] l2tp_tunnel_closeall+0x26c/0x3a0 [ 41.271364] l2tp_udp_encap_destroy+0x87/0xe0 [ 41.275828] udpv6_destroy_sock+0xb1/0xd0 [ 41.279945] sk_common_release+0x6b/0x2f0 [ 41.284058] udp_lib_close+0x15/0x20 [ 41.287739] inet_release+0xfa/0x1d0 [ 41.291421] inet6_release+0x50/0x70 [ 41.295103] sock_release+0x8d/0x1e0 [ 41.298784] sock_close+0x16/0x20 [ 41.302205] __fput+0x28c/0x6e0 [ 41.305450] ____fput+0x15/0x20 [ 41.308697] task_work_run+0x115/0x190 [ 41.312549] exit_to_usermode_loop+0xfc/0x120 [ 41.317011] syscall_return_slowpath+0x1a0/0x1e0 [ 41.321732] entry_SYSCALL_64_fastpath+0xe0/0xe2 [ 41.326453] [ 41.328048] The buggy address belongs to the object at ffff8801c9b38780 [ 41.328048] which belongs to the cache kmalloc-512 of size 512 [ 41.340668] The buggy address is located 0 bytes inside of [ 41.340668] 512-byte region [ffff8801c9b38780, ffff8801c9b38980) [ 41.352333] The buggy address belongs to the page: [ 41.357231] page:ffffea000726ce00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 41.367398] flags: 0x8000000000004080(slab|head) [ 41.372119] page dumped because: kasan: bad access detected [ 41.377794] [ 41.379389] Memory state around the buggy address: [ 41.384284] ffff8801c9b38680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.391611] ffff8801c9b38700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 41.398939] >ffff8801c9b38780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.406263] ^ [ 41.409595] ffff8801c9b38800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.416920] ffff8801c9b38880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.424246] ================================================================== [ 41.431572] Disabling lock debugging due to kernel taint [ 41.437123] Kernel panic - not syncing: panic_on_warn set ... [ 41.437123] [ 41.444479] CPU: 0 PID: 3342 Comm: syzkaller768728 Tainted: G B 4.9.76-g8dec074 #13 [ 41.453379] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.462706] ffff8801c8147c38 ffffffff81d93169 ffffffff84195c2f ffff8801c8147d10 [ 41.470678] 0000000000000000 ffff8801c9b38780 ffffffff82ed29f0 ffff8801c8147d00 [ 41.478642] ffffffff8142e371 0000000041b58ab3 ffffffff84189690 ffffffff8142e1b5 [ 41.486614] Call Trace: [ 41.489176] [] dump_stack+0xc1/0x128 [ 41.494513] [] ? sock_release+0x1e0/0x1e0 [ 41.500282] [] panic+0x1bc/0x3a8 [ 41.505267] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 41.513471] [] ? preempt_schedule+0x25/0x30 [ 41.519412] [] ? ___preempt_schedule+0x16/0x18 [ 41.525616] [] kasan_end_report+0x50/0x50 [ 41.531382] [] kasan_report+0x167/0x360 [ 41.536976] [] ? l2tp_session_queue_purge+0xe8/0x100 [ 41.543698] [] __asan_report_load4_noabort+0x14/0x20 [ 41.550416] [] l2tp_session_queue_purge+0xe8/0x100 [ 41.556965] [] ? sock_release+0x1e0/0x1e0 [ 41.562730] [] pppol2tp_release+0x1ff/0x2e0 [ 41.568668] [] sock_release+0x8d/0x1e0 [ 41.574171] [] sock_close+0x16/0x20 [ 41.579418] [] __fput+0x28c/0x6e0 [ 41.584487] [] ____fput+0x15/0x20 [ 41.589562] [] task_work_run+0x115/0x190 [ 41.595241] [] exit_to_usermode_loop+0xfc/0x120 [ 41.601530] [] syscall_return_slowpath+0x1a0/0x1e0 [ 41.608078] [] entry_SYSCALL_64_fastpath+0xe0/0xe2 [ 41.614982] Dumping ftrace buffer: [ 41.618489] (ftrace buffer empty) [ 41.622167] Kernel Offset: disabled [ 41.625762] Rebooting in 86400 seconds..