[....] Starting enhanced syslogd: rsyslogd[ 10.243593] audit: type=1400 audit(1516352850.091:4): avc: denied { syslog } for pid=3173 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.222' (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 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 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 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.072896] ================================================================== [ 37.073960] BUG: KASAN: use-after-free in pppol2tp_session_destruct+0xe9/0x110 [ 37.074946] Read of size 4 at addr ffff8801c5c20000 by task syzkaller524916/4242 [ 37.075946] [ 37.076185] CPU: 1 PID: 4242 Comm: syzkaller524916 Not tainted 4.9.77-g9c3804b #17 [ 37.077894] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.079163] ffff8801c5607c60 ffffffff81d941c9 ffffea0007170800 ffff8801c5c20000 [ 37.080332] 0000000000000000 ffff8801c5c20000 ffffffff82ed49f0 ffff8801c5607c98 [ 37.081498] ffffffff8153db93 ffff8801c5c20000 0000000000000004 0000000000000000 [ 37.082638] Call Trace: [ 37.083001] [] dump_stack+0xc1/0x128 [ 37.083716] [] ? sock_release+0x1e0/0x1e0 [ 37.084497] [] print_address_description+0x73/0x280 [ 37.085393] [] ? sock_release+0x1e0/0x1e0 [ 37.086166] [] kasan_report+0x275/0x360 [ 37.086947] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 37.087851] [] __asan_report_load4_noabort+0x14/0x20 [ 37.088754] [] pppol2tp_session_destruct+0xe9/0x110 [ 37.089637] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 37.090480] [] __sk_destruct+0x53/0x570 [ 37.091230] [] ? sock_release+0x1e0/0x1e0 [ 37.092000] [] sk_destruct+0x47/0x80 [ 37.092712] [] __sk_free+0x57/0x230 [ 37.096115] [] sk_free+0x23/0x30 [ 37.101107] [] pppol2tp_release+0x23d/0x2e0 [ 37.107048] [] sock_release+0x8d/0x1e0 [ 37.112556] [] sock_close+0x16/0x20 [ 37.117813] [] __fput+0x28c/0x6e0 [ 37.122888] [] ____fput+0x15/0x20 [ 37.127963] [] task_work_run+0x115/0x190 [ 37.133646] [] exit_to_usermode_loop+0xfc/0x120 [ 37.139945] [] syscall_return_slowpath+0x1a0/0x1e0 [ 37.146506] [] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 37.153051] [ 37.154648] Allocated by task 4241: [ 37.158245] save_stack_trace+0x16/0x20 [ 37.162188] save_stack+0x43/0xd0 [ 37.165609] kasan_kmalloc+0xad/0xe0 [ 37.169290] __kmalloc+0x11d/0x310 [ 37.172799] l2tp_session_create+0x38/0x1770 [ 37.177176] pppol2tp_connect+0x10fe/0x18f0 [ 37.181467] SYSC_connect+0x1b6/0x310 [ 37.185237] SyS_connect+0x24/0x30 [ 37.188743] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 37.193465] [ 37.195063] Freed by task 4241: [ 37.198311] save_stack_trace+0x16/0x20 [ 37.202251] save_stack+0x43/0xd0 [ 37.205671] kasan_slab_free+0x72/0xc0 [ 37.209526] kfree+0x103/0x300 [ 37.212687] l2tp_session_free+0x166/0x200 [ 37.216890] l2tp_tunnel_closeall+0x26c/0x3a0 [ 37.221356] l2tp_udp_encap_destroy+0x87/0xe0 [ 37.225819] udpv6_destroy_sock+0xb1/0xd0 [ 37.229934] sk_common_release+0x6b/0x2f0 [ 37.234048] udp_lib_close+0x15/0x20 [ 37.237729] inet_release+0xfa/0x1d0 [ 37.241412] inet6_release+0x50/0x70 [ 37.245093] sock_release+0x8d/0x1e0 [ 37.248776] sock_close+0x16/0x20 [ 37.252198] __fput+0x28c/0x6e0 [ 37.255444] ____fput+0x15/0x20 [ 37.258692] task_work_run+0x115/0x190 [ 37.262549] exit_to_usermode_loop+0xfc/0x120 [ 37.267012] syscall_return_slowpath+0x1a0/0x1e0 [ 37.271737] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 37.276459] [ 37.278055] The buggy address belongs to the object at ffff8801c5c20000 [ 37.278055] which belongs to the cache kmalloc-512 of size 512 [ 37.290679] The buggy address is located 0 bytes inside of [ 37.290679] 512-byte region [ffff8801c5c20000, ffff8801c5c20200) [ 37.302348] The buggy address belongs to the page: [ 37.307248] page:ffffea0007170800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 37.317424] flags: 0x8000000000004080(slab|head) [ 37.322154] page dumped because: kasan: bad access detected [ 37.327828] [ 37.329424] Memory state around the buggy address: [ 37.334321] ffff8801c5c1ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.341662] ffff8801c5c1ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.348990] >ffff8801c5c20000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.356315] ^ [ 37.359650] ffff8801c5c20080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.366991] ffff8801c5c20100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.374329] ================================================================== [ 37.381655] Disabling lock debugging due to kernel taint [ 37.387307] Kernel panic - not syncing: panic_on_warn set ... [ 37.387307] [ 37.394645] CPU: 1 PID: 4242 Comm: syzkaller524916 Tainted: G B 4.9.77-g9c3804b #17 [ 37.403536] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.412870] ffff8801c5607bb8 ffffffff81d941c9 ffffffff841970ff ffff8801c5607c90 [ 37.420845] 0000000000000000 ffff8801c5c20000 ffffffff82ed49f0 ffff8801c5607c80 [ 37.428834] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 37.436819] Call Trace: [ 37.439380] [] dump_stack+0xc1/0x128 [ 37.444720] [] ? sock_release+0x1e0/0x1e0 [ 37.450504] [] panic+0x1bc/0x3a8 [ 37.455498] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 37.463801] [] ? preempt_schedule+0x25/0x30 [ 37.469748] [] ? ___preempt_schedule+0x16/0x18 [ 37.475952] [] kasan_end_report+0x50/0x50 [ 37.481725] [] kasan_report+0x167/0x360 [ 37.488712] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 37.495523] [] __asan_report_load4_noabort+0x14/0x20 [ 37.502253] [] pppol2tp_session_destruct+0xe9/0x110 [ 37.508894] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 37.515205] [] __sk_destruct+0x53/0x570 [ 37.520806] [] ? sock_release+0x1e0/0x1e0 [ 37.526576] [] sk_destruct+0x47/0x80 [ 37.531910] [] __sk_free+0x57/0x230 [ 37.537159] [] sk_free+0x23/0x30 [ 37.542173] [] pppol2tp_release+0x23d/0x2e0 [ 37.548117] [] sock_release+0x8d/0x1e0 [ 37.553628] [] sock_close+0x16/0x20 [ 37.558878] [] __fput+0x28c/0x6e0 [ 37.563959] [] ____fput+0x15/0x20 [ 37.569036] [] task_work_run+0x115/0x190 [ 37.574720] [] exit_to_usermode_loop+0xfc/0x120 [ 37.581012] [] syscall_return_slowpath+0x1a0/0x1e0 [ 37.587564] [] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 37.594498] Dumping ftrace buffer: [ 37.598021] (ftrace buffer empty) [ 37.601708] Kernel Offset: disabled [ 37.605324] Rebooting in 86400 seconds..