[....] Starting enhanced syslogd: rsyslogd[ 10.817154] audit: type=1400 audit(1514888876.747:4): avc: denied { syslog } for pid=3170 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.201' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.813790] ================================================================== [ 18.814831] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 18.815704] Read of size 8 at addr ffff8801c8c40d38 by task syzkaller294581/3318 [ 18.816722] [ 18.816955] CPU: 1 PID: 3318 Comm: syzkaller294581 Not tainted 4.9.73-gf3f3457 #1 [ 18.817952] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.819171] ffff8801c907f8e0 ffffffff81d922b9 ffffea0007231000 ffff8801c8c40d38 [ 18.820312] 0000000000000000 ffff8801c8c40d38 ffff8801c8c40d38 ffff8801c907f918 [ 18.821443] ffffffff8153bab3 ffff8801c8c40d38 0000000000000008 0000000000000000 [ 18.822570] Call Trace: [ 18.822927] [] dump_stack+0xc1/0x128 [ 18.823637] [] print_address_description+0x73/0x280 [ 18.824511] [] kasan_report+0x275/0x360 [ 18.825254] [] ? __lock_acquire+0x2eff/0x3640 [ 18.826061] [] __asan_report_load8_noabort+0x14/0x20 [ 18.826961] [] __lock_acquire+0x2eff/0x3640 [ 18.827749] [] ? __lock_acquire+0x629/0x3640 [ 18.828558] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.829477] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.830394] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.831329] [] ? mark_held_locks+0xaf/0x100 [ 18.832115] [] ? mutex_lock_nested+0x5e3/0x870 [ 18.832950] [] lock_acquire+0x12e/0x410 [ 18.833776] [] ? remove_wait_queue+0x14/0x40 [ 18.838602] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 18.844884] [] ? remove_wait_queue+0x14/0x40 [ 18.850904] [] remove_wait_queue+0x14/0x40 [ 18.856762] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 18.863744] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 18.870984] [] ? ep_free+0x1b0/0x1b0 [ 18.876309] [] ep_free+0x96/0x1b0 [ 18.881378] [] ? ep_free+0x1b0/0x1b0 [ 18.886708] [] ep_eventpoll_release+0x44/0x60 [ 18.892821] [] __fput+0x28c/0x6e0 [ 18.897891] [] ____fput+0x15/0x20 [ 18.902959] [] task_work_run+0x115/0x190 [ 18.908640] [] do_exit+0x7e7/0x2a40 [ 18.913889] [] ? selinux_file_ioctl+0x355/0x530 [ 18.920177] [] ? release_task+0x1240/0x1240 [ 18.926119] [] ? SyS_epoll_create+0x190/0x190 [ 18.932230] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 18.938862] [] do_group_exit+0x108/0x320 [ 18.944536] [] SyS_exit_group+0x1d/0x20 [ 18.950126] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 18.956665] [ 18.958262] Allocated by task 3318: [ 18.961852] save_stack_trace+0x16/0x20 [ 18.965791] save_stack+0x43/0xd0 [ 18.969206] kasan_kmalloc+0xad/0xe0 [ 18.972886] kmem_cache_alloc_trace+0xfb/0x2a0 [ 18.977436] binder_get_thread+0x15d/0x750 [ 18.981637] binder_poll+0x4a/0x210 [ 18.985229] SyS_epoll_ctl+0x11d7/0x2190 [ 18.989256] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 18.993974] [ 18.995570] Freed by task 3318: [ 18.998816] save_stack_trace+0x16/0x20 [ 19.002754] save_stack+0x43/0xd0 [ 19.006168] kasan_slab_free+0x72/0xc0 [ 19.010023] kfree+0x103/0x300 [ 19.013179] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.017987] binder_thread_release+0x27d/0x540 [ 19.022536] binder_ioctl+0x9c0/0x11b0 [ 19.026387] do_vfs_ioctl+0x1aa/0x1140 [ 19.030242] SyS_ioctl+0x8f/0xc0 [ 19.033574] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.038293] [ 19.039885] The buggy address belongs to the object at ffff8801c8c40c80 [ 19.039885] which belongs to the cache kmalloc-512 of size 512 [ 19.052506] The buggy address is located 184 bytes inside of [ 19.052506] 512-byte region [ffff8801c8c40c80, ffff8801c8c40e80) [ 19.064429] The buggy address belongs to the page: [ 19.069326] page:ffffea0007231000 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.079480] flags: 0x8000000000004080(slab|head) [ 19.084196] page dumped because: kasan: bad access detected [ 19.089883] [ 19.091474] Memory state around the buggy address: [ 19.096370] ffff8801c8c40c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.103702] ffff8801c8c40c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.111024] >ffff8801c8c40d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.118343] ^ [ 19.123494] ffff8801c8c40d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.130817] ffff8801c8c40e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.138136] ================================================================== [ 19.145455] Disabling lock debugging due to kernel taint [ 19.150867] Kernel panic - not syncing: panic_on_warn set ... [ 19.150867] [ 19.158194] CPU: 1 PID: 3318 Comm: syzkaller294581 Tainted: G B 4.9.73-gf3f3457 #1 [ 19.166999] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.176324] ffff8801c907f838 ffffffff81d922b9 ffffffff841955bf ffff8801c907f910 [ 19.184359] 0000000000000000 ffff8801c8c40d38 ffff8801c8c40d38 ffff8801c907f900 [ 19.192302] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 19.200246] Call Trace: [ 19.202802] [] dump_stack+0xc1/0x128 [ 19.208130] [] panic+0x1bc/0x3a8 [ 19.213117] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.221311] [] ? add_taint+0x40/0x50 [ 19.226644] [] kasan_end_report+0x50/0x50 [ 19.232408] [] kasan_report+0x167/0x360 [ 19.238002] [] ? __lock_acquire+0x2eff/0x3640 [ 19.244115] [] __asan_report_load8_noabort+0x14/0x20 [ 19.250833] [] __lock_acquire+0x2eff/0x3640 [ 19.256768] [] ? __lock_acquire+0x629/0x3640 [ 19.262790] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.269768] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.276831] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.283814] [] ? mark_held_locks+0xaf/0x100 [ 19.289752] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.295951] [] lock_acquire+0x12e/0x410 [ 19.301539] [] ? remove_wait_queue+0x14/0x40 [ 19.307560] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.313842] [] ? remove_wait_queue+0x14/0x40 [ 19.319871] [] remove_wait_queue+0x14/0x40 [ 19.325727] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.332707] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.339957] [] ? ep_free+0x1b0/0x1b0 [ 19.345286] [] ep_free+0x96/0x1b0 [ 19.350353] [] ? ep_free+0x1b0/0x1b0 [ 19.355680] [] ep_eventpoll_release+0x44/0x60 [ 19.361797] [] __fput+0x28c/0x6e0 [ 19.366865] [] ____fput+0x15/0x20 [ 19.371932] [] task_work_run+0x115/0x190 [ 19.377610] [] do_exit+0x7e7/0x2a40 [ 19.382853] [] ? selinux_file_ioctl+0x355/0x530 [ 19.389138] [] ? release_task+0x1240/0x1240 [ 19.395083] [] ? SyS_epoll_create+0x190/0x190 [ 19.401197] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 19.407827] [] do_group_exit+0x108/0x320 [ 19.413502] [] SyS_exit_group+0x1d/0x20 [ 19.419089] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.426096] Dumping ftrace buffer: [ 19.429610] (ftrace buffer empty) [ 19.433287] Kernel Offset: disabled [ 19.436882] Rebooting in 86400 seconds..