[....] Starting enhanced syslogd: rsyslogd[ 11.122737] audit: type=1400 audit(1516376351.868:4): avc: denied { syslog } for pid=3187 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 executing program executing program executing program executing program executing program executing program 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.097793] ================================================================== [ 28.099259] BUG: KASAN: use-after-free in inet_shutdown+0x2d4/0x350 [ 28.100492] Read of size 4 at addr ffff8801c50a1980 by task syzkaller564537/3517 [ 28.102267] [ 28.102506] CPU: 1 PID: 3517 Comm: syzkaller564537 Not tainted 4.9.77-g9c3804b #17 [ 28.104412] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.106518] ffff8801c66afbc0 ffffffff81d941c9 ffffea0007142800 ffff8801c50a1980 [ 28.108330] 0000000000000000 ffff8801c50a1980 ffff8801cb34ea58 ffff8801c66afbf8 [ 28.110210] ffffffff8153db93 ffff8801c50a1980 0000000000000004 0000000000000000 [ 28.112172] Call Trace: [ 28.112972] [] dump_stack+0xc1/0x128 [ 28.114146] [] print_address_description+0x73/0x280 [ 28.115932] [] kasan_report+0x275/0x360 [ 28.117063] [] ? inet_shutdown+0x2d4/0x350 [ 28.120411] [] ? pppol2tp_recvmsg+0x2b0/0x2b0 [ 28.129406] [] __asan_report_load4_noabort+0x14/0x20 [ 28.139262] [] inet_shutdown+0x2d4/0x350 [ 28.145486] [] ? pppol2tp_recvmsg+0x2b0/0x2b0 [ 28.151616] [] pppol2tp_session_close+0xa0/0xe0 [ 28.157927] [] l2tp_tunnel_closeall+0x21f/0x3a0 [ 28.164235] [] ? udp_v6_flush_pending_frames+0xe0/0xe0 [ 28.171150] [] ? sock_release+0x1e0/0x1e0 [ 28.176943] [] l2tp_udp_encap_destroy+0x87/0xe0 [ 28.183252] [] ? l2tp_tunnel_destruct+0x5a0/0x5a0 [ 28.189733] [] udpv6_destroy_sock+0xb1/0xd0 [ 28.195690] [] sk_common_release+0x6b/0x2f0 [ 28.201650] [] udp_lib_close+0x15/0x20 [ 28.207170] [] inet_release+0xfa/0x1d0 [ 28.212695] [] inet6_release+0x50/0x70 [ 28.218222] [] sock_release+0x8d/0x1e0 [ 28.223751] [] sock_close+0x16/0x20 [ 28.229022] [] __fput+0x28c/0x6e0 [ 28.234109] [] ____fput+0x15/0x20 [ 28.239201] [] task_work_run+0x115/0x190 [ 28.244900] [] exit_to_usermode_loop+0xfc/0x120 [ 28.251206] [] syscall_return_slowpath+0x1a0/0x1e0 [ 28.257773] [] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 28.264337] [ 28.265954] Allocated by task 3518: [ 28.269573] save_stack_trace+0x16/0x20 [ 28.273535] save_stack+0x43/0xd0 [ 28.276976] kasan_kmalloc+0xad/0xe0 [ 28.280687] kasan_slab_alloc+0x12/0x20 [ 28.284644] kmem_cache_alloc+0xba/0x290 [ 28.288690] sock_alloc_inode+0x1d/0x250 [ 28.292734] alloc_inode+0x65/0x180 [ 28.296339] new_inode_pseudo+0x17/0xe0 [ 28.300292] sock_alloc+0x41/0x270 [ 28.303813] __sock_create+0xa5/0x640 [ 28.307593] SyS_socket+0xf0/0x1b0 [ 28.311117] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 28.315845] [ 28.317448] Freed by task 3518: [ 28.320707] save_stack_trace+0x16/0x20 [ 28.324668] save_stack+0x43/0xd0 [ 28.328100] kasan_slab_free+0x72/0xc0 [ 28.331962] kmem_cache_free+0xc7/0x300 [ 28.335918] sock_destroy_inode+0x56/0x70 [ 28.340052] destroy_inode+0xc3/0x120 [ 28.343833] evict+0x329/0x4f0 [ 28.347011] iput+0x47b/0x900 [ 28.350102] dentry_unlink_inode+0x470/0x570 [ 28.354485] __dentry_kill+0x25b/0x480 [ 28.358351] dput.part.23+0x680/0x7b0 [ 28.362128] dput+0x1f/0x30 [ 28.365041] __fput+0x46a/0x6e0 [ 28.368303] ____fput+0x15/0x20 [ 28.371567] task_work_run+0x115/0x190 [ 28.375431] exit_to_usermode_loop+0xfc/0x120 [ 28.379908] syscall_return_slowpath+0x1a0/0x1e0 [ 28.384648] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 28.389376] [ 28.390990] The buggy address belongs to the object at ffff8801c50a1980 [ 28.390990] which belongs to the cache sock_inode_cache of size 944 [ 28.404064] The buggy address is located 0 bytes inside of [ 28.404064] 944-byte region [ffff8801c50a1980, ffff8801c50a1d30) [ 28.415742] The buggy address belongs to the page: [ 28.420659] page:ffffea0007142800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 28.430858] flags: 0x8000000000004080(slab|head) [ 28.435592] page dumped because: kasan: bad access detected [ 28.441283] [ 28.442892] Memory state around the buggy address: [ 28.447804] ffff8801c50a1880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc [ 28.455152] ffff8801c50a1900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.462500] >ffff8801c50a1980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.469842] ^ [ 28.473199] ffff8801c50a1a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.480545] ffff8801c50a1a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.487886] ================================================================== [ 28.495230] Disabling lock debugging due to kernel taint [ 28.501290] Kernel panic - not syncing: panic_on_warn set ... [ 28.501290] [ 28.508657] CPU: 1 PID: 3517 Comm: syzkaller564537 Tainted: G B 4.9.77-g9c3804b #17 [ 28.517561] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.526904] ffff8801c66afb18 ffffffff81d941c9 ffffffff841970ff ffff8801c66afbf0 [ 28.534920] 0000000000000000 ffff8801c50a1980 ffff8801cb34ea58 ffff8801c66afbe0 [ 28.542930] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 28.550939] Call Trace: [ 28.553513] [] dump_stack+0xc1/0x128 [ 28.558866] [] panic+0x1bc/0x3a8 [ 28.563873] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 28.572088] [] ? preempt_schedule+0x25/0x30 [ 28.578045] [] ? ___preempt_schedule+0x16/0x18 [ 28.584257] [] kasan_end_report+0x50/0x50 [ 28.590044] [] kasan_report+0x167/0x360 [ 28.595656] [] ? inet_shutdown+0x2d4/0x350 [ 28.601532] [] ? pppol2tp_recvmsg+0x2b0/0x2b0 [ 28.607666] [] __asan_report_load4_noabort+0x14/0x20 [ 28.614406] [] inet_shutdown+0x2d4/0x350 [ 28.620097] [] ? pppol2tp_recvmsg+0x2b0/0x2b0 [ 28.626222] [] pppol2tp_session_close+0xa0/0xe0 [ 28.632528] [] l2tp_tunnel_closeall+0x21f/0x3a0 [ 28.638840] [] ? udp_v6_flush_pending_frames+0xe0/0xe0 [ 28.645758] [] ? sock_release+0x1e0/0x1e0 [ 28.651544] [] l2tp_udp_encap_destroy+0x87/0xe0 [ 28.657859] [] ? l2tp_tunnel_destruct+0x5a0/0x5a0 [ 28.664345] [] udpv6_destroy_sock+0xb1/0xd0 [ 28.670788] [] sk_common_release+0x6b/0x2f0 [ 28.676748] [] udp_lib_close+0x15/0x20 [ 28.682276] [] inet_release+0xfa/0x1d0 [ 28.687799] [] inet6_release+0x50/0x70 [ 28.693324] [] sock_release+0x8d/0x1e0 [ 28.698855] [] sock_close+0x16/0x20 [ 28.704115] [] __fput+0x28c/0x6e0 [ 28.709203] [] ____fput+0x15/0x20 [ 28.714289] [] task_work_run+0x115/0x190 [ 28.719981] [] exit_to_usermode_loop+0xfc/0x120 [ 28.726277] [] syscall_return_slowpath+0x1a0/0x1e0 [ 28.732842] [] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 28.740145] Dumping ftrace buffer: [ 28.743667] (ftrace buffer empty) [ 28.747354] Kernel Offset: disabled [ 28.750960] Rebooting in 86400 seconds..