[....] Starting enhanced syslogd: rsyslogd[ 10.883570] audit: type=1400 audit(1516241762.971: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 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.0.38' (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 syzkaller login: [ 28.556175] ================================================================== [ 28.563579] BUG: KASAN: use-after-free in pppol2tp_session_destruct+0xe9/0x110 [ 28.570913] Read of size 4 at addr ffff8801cd56b680 by task syzkaller594068/3327 [ 28.578413] [ 28.580013] CPU: 0 PID: 3327 Comm: syzkaller594068 Not tainted 4.9.77-g033d019 #14 [ 28.587687] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.597026] ffff8801c8b67c60 ffffffff81d941c9 ffffea0007355a80 ffff8801cd56b680 [ 28.605017] 0000000000000000 ffff8801cd56b680 ffffffff82ed49f0 ffff8801c8b67c98 [ 28.612995] ffffffff8153db93 ffff8801cd56b680 0000000000000004 0000000000000000 [ 28.620963] Call Trace: [ 28.623522] [] dump_stack+0xc1/0x128 [ 28.628857] [] ? sock_release+0x1e0/0x1e0 [ 28.634626] [] print_address_description+0x73/0x280 [ 28.641261] [] ? sock_release+0x1e0/0x1e0 [ 28.647038] [] kasan_report+0x275/0x360 [ 28.652631] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 28.659441] [] __asan_report_load4_noabort+0x14/0x20 [ 28.666164] [] pppol2tp_session_destruct+0xe9/0x110 [ 28.672800] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 28.679090] [] __sk_destruct+0x53/0x570 [ 28.684684] [] ? sock_release+0x1e0/0x1e0 [ 28.690452] [] sk_destruct+0x47/0x80 [ 28.695792] [] __sk_free+0x57/0x230 [ 28.701048] [] sk_free+0x23/0x30 [ 28.706033] [] pppol2tp_release+0x23d/0x2e0 [ 28.711974] [] sock_release+0x8d/0x1e0 [ 28.717481] [] sock_close+0x16/0x20 [ 28.722727] [] __fput+0x28c/0x6e0 [ 28.727798] [] ____fput+0x15/0x20 [ 28.732872] [] task_work_run+0x115/0x190 [ 28.738552] [] exit_to_usermode_loop+0xfc/0x120 [ 28.744840] [] syscall_return_slowpath+0x1a0/0x1e0 [ 28.751391] [] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 28.757936] [ 28.759534] Allocated by task 3326: [ 28.763131] save_stack_trace+0x16/0x20 [ 28.767080] save_stack+0x43/0xd0 [ 28.770502] kasan_kmalloc+0xad/0xe0 [ 28.774184] __kmalloc+0x11d/0x310 [ 28.777697] l2tp_session_create+0x38/0x1770 [ 28.782085] pppol2tp_connect+0x10fe/0x18f0 [ 28.786377] SYSC_connect+0x1b6/0x310 [ 28.790156] SyS_connect+0x24/0x30 [ 28.793666] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 28.798388] [ 28.799986] Freed by task 3326: [ 28.803239] save_stack_trace+0x16/0x20 [ 28.807183] save_stack+0x43/0xd0 [ 28.810617] kasan_slab_free+0x72/0xc0 [ 28.814474] kfree+0x103/0x300 [ 28.817636] l2tp_session_free+0x166/0x200 [ 28.821837] l2tp_tunnel_closeall+0x26c/0x3a0 [ 28.826300] l2tp_udp_encap_destroy+0x87/0xe0 [ 28.830781] udpv6_destroy_sock+0xb1/0xd0 [ 28.834899] sk_common_release+0x6b/0x2f0 [ 28.839019] udp_lib_close+0x15/0x20 [ 28.842702] inet_release+0xfa/0x1d0 [ 28.846386] inet6_release+0x50/0x70 [ 28.850085] sock_release+0x8d/0x1e0 [ 28.853777] sock_close+0x16/0x20 [ 28.857200] __fput+0x28c/0x6e0 [ 28.860457] ____fput+0x15/0x20 [ 28.863707] task_work_run+0x115/0x190 [ 28.867565] exit_to_usermode_loop+0xfc/0x120 [ 28.872027] syscall_return_slowpath+0x1a0/0x1e0 [ 28.876769] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 28.881492] [ 28.883094] The buggy address belongs to the object at ffff8801cd56b680 [ 28.883094] which belongs to the cache kmalloc-512 of size 512 [ 28.895721] The buggy address is located 0 bytes inside of [ 28.895721] 512-byte region [ffff8801cd56b680, ffff8801cd56b880) [ 28.907389] The buggy address belongs to the page: [ 28.912288] page:ffffea0007355a80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 28.922459] flags: 0x8000000000004080(slab|head) [ 28.927179] page dumped because: kasan: bad access detected [ 28.932857] [ 28.934451] Memory state around the buggy address: [ 28.939348] ffff8801cd56b580: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc [ 28.946676] ffff8801cd56b600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.954004] >ffff8801cd56b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.961333] ^ [ 28.964668] ffff8801cd56b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.971996] ffff8801cd56b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.979325] ================================================================== [ 28.986653] Disabling lock debugging due to kernel taint [ 28.992185] Kernel panic - not syncing: panic_on_warn set ... [ 28.992185] [ 28.999528] CPU: 0 PID: 3327 Comm: syzkaller594068 Tainted: G B 4.9.77-g033d019 #14 [ 29.008417] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.017746] ffff8801c8b67bb8 ffffffff81d941c9 ffffffff841970ff ffff8801c8b67c90 [ 29.025724] 0000000000000000 ffff8801cd56b680 ffffffff82ed49f0 ffff8801c8b67c80 [ 29.033714] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 29.041688] Call Trace: [ 29.044248] [] dump_stack+0xc1/0x128 [ 29.049584] [] ? sock_release+0x1e0/0x1e0 [ 29.055352] [] panic+0x1bc/0x3a8 [ 29.060338] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 29.068537] [] ? preempt_schedule+0x25/0x30 [ 29.074479] [] ? ___preempt_schedule+0x16/0x18 [ 29.080693] [] kasan_end_report+0x50/0x50 [ 29.086471] [] kasan_report+0x167/0x360 [ 29.092066] [] ? pppol2tp_session_destruct+0xe9/0x110 [ 29.098877] [] __asan_report_load4_noabort+0x14/0x20 [ 29.105601] [] pppol2tp_session_destruct+0xe9/0x110 [ 29.112257] [] ? pppol2tp_seq_start+0x4e0/0x4e0 [ 29.118546] [] __sk_destruct+0x53/0x570 [ 29.124141] [] ? sock_release+0x1e0/0x1e0 [ 29.129910] [] sk_destruct+0x47/0x80 [ 29.135245] [] __sk_free+0x57/0x230 [ 29.140491] [] sk_free+0x23/0x30 [ 29.145478] [] pppol2tp_release+0x23d/0x2e0 [ 29.151420] [] sock_release+0x8d/0x1e0 [ 29.156928] [] sock_close+0x16/0x20 [ 29.162176] [] __fput+0x28c/0x6e0 [ 29.167259] [] ____fput+0x15/0x20 [ 29.172331] [] task_work_run+0x115/0x190 [ 29.178021] [] exit_to_usermode_loop+0xfc/0x120 [ 29.184309] [] syscall_return_slowpath+0x1a0/0x1e0 [ 29.190859] [] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 29.197839] Dumping ftrace buffer: [ 29.201358] (ftrace buffer empty) [ 29.205052] Kernel Offset: disabled [ 29.208652] Rebooting in 86400 seconds..