[....] Starting enhanced syslogd: rsyslogd[ 13.605571] audit: type=1400 audit(1521859329.144:4): avc: denied { syslog } for pid=3650 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.16' (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 syzkaller login: [ 26.553500] ================================================================== [ 26.560913] BUG: KASAN: use-after-free in pppol2tp_session_destruct+0xe9/0x110 [ 26.568269] Read of size 4 at addr ffff8801c5832a00 by task syzkaller879191/3810 [ 26.575793] [ 26.577432] CPU: 0 PID: 3810 Comm: syzkaller879191 Not tainted 4.9.89-gebc2789 #63 [ 26.585152] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.594493] ffff8801b156fc28 ffffffff81d96069 ffffea0007160c80 ffff8801c5832a00 executing program [ 26.602517] 0000000000000000 ffff8801c5832a00 ffffffff82ed79f0 ffff8801b156fc60 [ 26.610528] ffffffff8153e8f3 ffff8801c5832a00 0000000000000004 0000000000000000 [ 26.618541] Call Trace: [ 26.621107] [] dump_stack+0xc1/0x128 [ 26.626463] [] ? sock_release+0x1e0/0x1e0 [ 26.632260] [] print_address_description+0x73/0x280 [ 26.638919] [] ? sock_release+0x1e0/0x1e0 [ 26.644711] [] kasan_report+0x255/0x380 executing program executing program [ 26.650335] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 26.657172] [] __asan_report_load4_noabort+0x14/0x20 [ 26.663922] [] pppol2tp_session_destruct+0xe9/0x110 [ 26.670571] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 26.676895] [] __sk_destruct+0x53/0x570 [ 26.682532] [] ? sock_release+0x1e0/0x1e0 [ 26.688328] [] sk_destruct+0x47/0x80 [ 26.693683] [] __sk_free+0x57/0x230 [ 26.698956] [] sk_free+0x23/0x30 executing program executing program [ 26.703954] [] pppol2tp_release+0x23d/0x2e0 [ 26.709918] [] sock_release+0x8d/0x1e0 [ 26.715454] [] sock_close+0x16/0x20 [ 26.720714] [] __fput+0x28c/0x6e0 [ 26.725811] [] ____fput+0x15/0x20 [ 26.730908] [] task_work_run+0x115/0x190 [ 26.736606] [] exit_to_usermode_loop+0xfc/0x120 [ 26.742919] [] do_syscall_64+0x36f/0x490 executing program [ 26.748625] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 26.755532] [ 26.757146] Allocated by task 3810: [ 26.760773] save_stack_trace+0x16/0x20 [ 26.764738] save_stack+0x43/0xd0 [ 26.768168] kasan_kmalloc+0xad/0xe0 [ 26.771866] __kmalloc+0x11d/0x310 [ 26.775404] l2tp_session_create+0x38/0x1770 [ 26.779806] pppol2tp_connect+0x10fe/0x18f0 [ 26.784107] SYSC_connect+0x1b6/0x310 [ 26.787896] SyS_connect+0x24/0x30 [ 26.791431] do_syscall_64+0x1a4/0x490 [ 26.795306] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 26.800377] executing program executing program [ 26.801978] Freed by task 3812: [ 26.805248] save_stack_trace+0x16/0x20 [ 26.809257] save_stack+0x43/0xd0 [ 26.812700] kasan_slab_free+0x72/0xc0 [ 26.816561] kfree+0x103/0x300 [ 26.819749] l2tp_session_free+0x166/0x200 [ 26.823981] l2tp_tunnel_closeall+0x26c/0x3a0 [ 26.828469] l2tp_udp_encap_destroy+0x87/0xe0 [ 26.832947] udpv6_destroy_sock+0xb1/0xd0 [ 26.837092] sk_common_release+0x6b/0x2f0 [ 26.841241] udp_lib_close+0x15/0x20 [ 26.844947] inet_release+0xfa/0x1d0 [ 26.848634] inet6_release+0x50/0x70 [ 26.852332] sock_release+0x8d/0x1e0 [ 26.856037] sock_close+0x16/0x20 [ 26.859482] __fput+0x28c/0x6e0 [ 26.862733] ____fput+0x15/0x20 [ 26.865988] task_work_run+0x115/0x190 [ 26.869865] exit_to_usermode_loop+0xfc/0x120 [ 26.874358] do_syscall_64+0x36f/0x490 [ 26.878260] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 26.883336] [ 26.884951] The buggy address belongs to the object at ffff8801c5832a00 [ 26.884951] which belongs to the cache kmalloc-512 of size 512 [ 26.897605] The buggy address is located 0 bytes inside of [ 26.897605] 512-byte region [ffff8801c5832a00, ffff8801c5832c00) [ 26.909286] The buggy address belongs to the page: [ 26.914191] page:ffffea0007160c80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.924454] flags: 0x8000000000004080(slab|head) [ 26.929184] page dumped because: kasan: bad access detected [ 26.934874] [ 26.936485] Memory state around the buggy address: [ 26.941400] ffff8801c5832900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb executing program executing program executing program executing program [ 26.948735] ffff8801c5832980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.956082] >ffff8801c5832a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.965948] ^ [ 26.969334] ffff8801c5832a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.976682] ffff8801c5832b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.984013] ================================================================== [ 26.991353] Disabling lock debugging due to kernel taint [ 26.997804] Kernel panic - not syncing: panic_on_warn set ... [ 26.997804] executing program [ 27.005174] CPU: 0 PID: 3810 Comm: syzkaller879191 Tainted: G B 4.9.89-gebc2789 #63 [ 27.014082] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.023442] ffff8801b156fb80 ffffffff81d96069 ffffffff841982a7 ffff8801b156fc58 [ 27.031449] 0000000000000000 ffff8801c5832a00 ffffffff82ed79f0 ffff8801b156fc48 [ 27.039449] ffffffff8142fbd1 0000000041b58ab3 ffffffff8418bd08 ffffffff8142fa15 [ 27.047457] Call Trace: [ 27.050023] [] dump_stack+0xc1/0x128 executing program executing program [ 27.055375] [] ? sock_release+0x1e0/0x1e0 [ 27.061170] [] panic+0x1bc/0x3a8 [ 27.066164] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.074390] [] ? preempt_schedule+0x25/0x30 [ 27.080379] [] ? ___preempt_schedule+0x16/0x18 [ 27.086612] [] kasan_end_report+0x50/0x50 [ 27.092405] [] kasan_report+0x16b/0x380 [ 27.098004] [] ? pppol2tp_session_destruct+0xe9/0x110 executing program [ 27.104840] [] __asan_report_load4_noabort+0x14/0x20 [ 27.111588] [] pppol2tp_session_destruct+0xe9/0x110 [ 27.118249] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 27.124584] [] __sk_destruct+0x53/0x570 [ 27.130182] [] ? sock_release+0x1e0/0x1e0 [ 27.135975] [] sk_destruct+0x47/0x80 [ 27.141339] [] __sk_free+0x57/0x230 [ 27.146592] [] sk_free+0x23/0x30 executing program executing program [ 27.151608] [] pppol2tp_release+0x23d/0x2e0 [ 27.157576] [] sock_release+0x8d/0x1e0 [ 27.163089] [] sock_close+0x16/0x20 [ 27.168357] [] __fput+0x28c/0x6e0 [ 27.173459] [] ____fput+0x15/0x20 [ 27.178556] [] task_work_run+0x115/0x190 [ 27.184262] [] exit_to_usermode_loop+0xfc/0x120 [ 27.190585] [] do_syscall_64+0x36f/0x490 [ 27.196286] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 27.203735] Dumping ftrace buffer: [ 27.207250] (ftrace buffer empty) [ 27.210932] Kernel Offset: disabled [ 27.214531] Rebooting in 86400 seconds..