[....] Starting enhanced syslogd: rsyslogd[ 12.740609] audit: type=1400 audit(1514871428.887:4): avc: denied { syslog } for pid=3177 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.235' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.387457] ================================================================== [ 26.394865] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.401500] Read of size 8 at addr ffff8801ccb86838 by task syzkaller231816/3334 [ 26.408997] [ 26.410598] CPU: 0 PID: 3334 Comm: syzkaller231816 Not tainted 4.9.73-gf3f3457 #1 [ 26.418187] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.427509] ffff8801c7c5f8e0 ffffffff81d922b9 ffffea000732e180 ffff8801ccb86838 [ 26.435464] 0000000000000000 ffff8801ccb86838 ffff8801ccb86838 ffff8801c7c5f918 [ 26.443416] ffffffff8153bab3 ffff8801ccb86838 0000000000000008 0000000000000000 [ 26.451360] Call Trace: [ 26.453914] [] dump_stack+0xc1/0x128 [ 26.459244] [] print_address_description+0x73/0x280 [ 26.465875] [] kasan_report+0x275/0x360 [ 26.471467] [] ? __lock_acquire+0x2eff/0x3640 [ 26.477597] [] __asan_report_load8_noabort+0x14/0x20 [ 26.484330] [] __lock_acquire+0x2eff/0x3640 [ 26.490272] [] ? __lock_acquire+0x629/0x3640 [ 26.496300] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.503293] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.510273] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.517253] [] ? mark_held_locks+0xaf/0x100 [ 26.523194] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.529392] [] lock_acquire+0x12e/0x410 [ 26.534982] [] ? remove_wait_queue+0x14/0x40 [ 26.541002] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.547286] [] ? remove_wait_queue+0x14/0x40 [ 26.553315] [] remove_wait_queue+0x14/0x40 [ 26.559167] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.566148] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.573385] [] ? ep_free+0x1b0/0x1b0 [ 26.578713] [] ep_free+0x96/0x1b0 [ 26.583780] [] ? ep_free+0x1b0/0x1b0 [ 26.589108] [] ep_eventpoll_release+0x44/0x60 [ 26.595221] [] __fput+0x28c/0x6e0 [ 26.600288] [] ____fput+0x15/0x20 [ 26.605354] [] task_work_run+0x115/0x190 [ 26.611031] [] do_exit+0x7e7/0x2a40 [ 26.616280] [] ? selinux_file_ioctl+0x355/0x530 [ 26.622563] [] ? release_task+0x1240/0x1240 [ 26.628508] [] ? SyS_epoll_create+0x190/0x190 [ 26.634626] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 26.641256] [] do_group_exit+0x108/0x320 [ 26.646933] [] SyS_exit_group+0x1d/0x20 [ 26.652532] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 26.659073] [ 26.660666] Allocated by task 3334: [ 26.664259] save_stack_trace+0x16/0x20 [ 26.668201] save_stack+0x43/0xd0 [ 26.671616] kasan_kmalloc+0xad/0xe0 [ 26.675294] kmem_cache_alloc_trace+0xfb/0x2a0 [ 26.679847] binder_get_thread+0x15d/0x750 [ 26.684043] binder_poll+0x4a/0x210 [ 26.687636] SyS_epoll_ctl+0x11d7/0x2190 [ 26.691660] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 26.696379] [ 26.697972] Freed by task 3334: [ 26.701216] save_stack_trace+0x16/0x20 [ 26.705156] save_stack+0x43/0xd0 [ 26.708573] kasan_slab_free+0x72/0xc0 [ 26.712425] kfree+0x103/0x300 [ 26.715582] binder_thread_dec_tmpref+0x1cc/0x240 [ 26.720389] binder_thread_release+0x27d/0x540 [ 26.724936] binder_ioctl+0x9c0/0x11b0 [ 26.729743] do_vfs_ioctl+0x1aa/0x1140 [ 26.733595] SyS_ioctl+0x8f/0xc0 [ 26.736925] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 26.741639] [ 26.743233] The buggy address belongs to the object at ffff8801ccb86780 [ 26.743233] which belongs to the cache kmalloc-512 of size 512 [ 26.755862] The buggy address is located 184 bytes inside of [ 26.755862] 512-byte region [ffff8801ccb86780, ffff8801ccb86980) [ 26.767700] The buggy address belongs to the page: [ 26.772597] page:ffffea000732e180 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.782753] flags: 0x8000000000004080(slab|head) [ 26.787472] page dumped because: kasan: bad access detected [ 26.793143] [ 26.794735] Memory state around the buggy address: [ 26.799629] ffff8801ccb86700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.806950] ffff8801ccb86780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.814274] >ffff8801ccb86800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.821604] ^ [ 26.826759] ffff8801ccb86880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.834088] ffff8801ccb86900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.841410] ================================================================== [ 26.848734] Disabling lock debugging due to kernel taint [ 26.854151] Kernel panic - not syncing: panic_on_warn set ... [ 26.854151] [ 26.861479] CPU: 0 PID: 3334 Comm: syzkaller231816 Tainted: G B 4.9.73-gf3f3457 #1 [ 26.870283] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.879605] ffff8801c7c5f838 ffffffff81d922b9 ffffffff841955bf ffff8801c7c5f910 [ 26.887554] 0000000000000000 ffff8801ccb86838 ffff8801ccb86838 ffff8801c7c5f900 [ 26.895669] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 26.903615] Call Trace: [ 26.906169] [] dump_stack+0xc1/0x128 [ 26.911498] [] panic+0x1bc/0x3a8 [ 26.916482] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.924678] [] ? add_taint+0x40/0x50 [ 26.930006] [] kasan_end_report+0x50/0x50 [ 26.935771] [] kasan_report+0x167/0x360 [ 26.941364] [] ? __lock_acquire+0x2eff/0x3640 [ 26.947735] [] __asan_report_load8_noabort+0x14/0x20 [ 26.954464] [] __lock_acquire+0x2eff/0x3640 [ 26.960405] [] ? __lock_acquire+0x629/0x3640 [ 26.966429] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.973414] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.980392] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.987370] [] ? mark_held_locks+0xaf/0x100 [ 26.993314] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.999547] [] lock_acquire+0x12e/0x410 [ 27.005152] [] ? remove_wait_queue+0x14/0x40 [ 27.011186] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.017472] [] ? remove_wait_queue+0x14/0x40 [ 27.023501] [] remove_wait_queue+0x14/0x40 [ 27.029352] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.036334] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.043574] [] ? ep_free+0x1b0/0x1b0 [ 27.048934] [] ep_free+0x96/0x1b0 [ 27.054016] [] ? ep_free+0x1b0/0x1b0 [ 27.059345] [] ep_eventpoll_release+0x44/0x60 [ 27.065459] [] __fput+0x28c/0x6e0 [ 27.070528] [] ____fput+0x15/0x20 [ 27.075607] [] task_work_run+0x115/0x190 [ 27.081633] [] do_exit+0x7e7/0x2a40 [ 27.087224] [] ? selinux_file_ioctl+0x355/0x530 [ 27.093509] [] ? release_task+0x1240/0x1240 [ 27.099443] [] ? SyS_epoll_create+0x190/0x190 [ 27.105558] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 27.112189] [] do_group_exit+0x108/0x320 [ 27.117873] [] SyS_exit_group+0x1d/0x20 [ 27.123467] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 27.130760] Dumping ftrace buffer: [ 27.134266] (ftrace buffer empty) [ 27.137941] Kernel Offset: disabled [ 27.141537] Rebooting in 86400 seconds..