[....] Starting enhanced syslogd: rsyslogd[ 12.157207] audit: type=1400 audit(1516274998.461:4): avc: denied { syslog } for pid=3175 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.220' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.631471] ================================================================== [ 28.638851] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 28.645486] Read of size 8 at addr ffff8801c85f59b8 by task syzkaller629572/3332 [ 28.652992] [ 28.654594] CPU: 0 PID: 3332 Comm: syzkaller629572 Not tainted 4.9.77-g033d019 #24 [ 28.662268] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.671605] ffff8801c85bf870 ffffffff81d941c9 ffffea0007217d00 ffff8801c85f59b8 [ 28.679587] 0000000000000000 ffff8801c85f59b8 ffff8801c85f59b8 ffff8801c85bf8a8 [ 28.687560] ffffffff8153db93 ffff8801c85f59b8 0000000000000008 0000000000000000 [ 28.695528] Call Trace: [ 28.698086] [] dump_stack+0xc1/0x128 [ 28.703423] [] print_address_description+0x73/0x280 [ 28.710057] [] kasan_report+0x275/0x360 [ 28.715653] [] ? __lock_acquire+0x2eff/0x3640 [ 28.721768] [] __asan_report_load8_noabort+0x14/0x20 [ 28.728501] [] __lock_acquire+0x2eff/0x3640 [ 28.734444] [] ? __lock_acquire+0x629/0x3640 [ 28.740472] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.747457] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.754439] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.761422] [] ? mark_held_locks+0xaf/0x100 [ 28.767363] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.773565] [] lock_acquire+0x12e/0x410 [ 28.779765] [] ? remove_wait_queue+0x14/0x40 [ 28.785793] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.792087] [] ? remove_wait_queue+0x14/0x40 [ 28.798115] [] remove_wait_queue+0x14/0x40 [ 28.803972] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.810964] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.818801] [] ? ep_free+0x1b0/0x1b0 [ 28.824135] [] ep_free+0x96/0x1b0 [ 28.829206] [] ? ep_free+0x1b0/0x1b0 [ 28.834536] [] ep_eventpoll_release+0x44/0x60 [ 28.840650] [] __fput+0x28c/0x6e0 [ 28.845721] [] ____fput+0x15/0x20 [ 28.850793] [] task_work_run+0x115/0x190 [ 28.856472] [] do_exit+0x7e7/0x2a40 [ 28.861717] [] ? __pmd_alloc+0x410/0x410 [ 28.867398] [] ? release_task+0x1240/0x1240 [ 28.873340] [] ? __do_page_fault+0x5ec/0xd40 [ 28.879372] [] ? up_read+0x1a/0x40 [ 28.884533] [] ? __do_page_fault+0x3bd/0xd40 [ 28.890572] [] do_group_exit+0x108/0x320 [ 28.896255] [] ? do_group_exit+0x320/0x320 [ 28.902107] [] SyS_exit_group+0x1d/0x20 [ 28.907698] [] do_fast_syscall_32+0x2f7/0x890 [ 28.913813] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.920450] [] entry_SYSENTER_compat+0x74/0x83 [ 28.926648] [ 28.928245] Allocated by task 3332: [ 28.931841] save_stack_trace+0x16/0x20 [ 28.935785] save_stack+0x43/0xd0 [ 28.939204] kasan_kmalloc+0xad/0xe0 [ 28.942884] kmem_cache_alloc_trace+0xfb/0x2a0 [ 28.947434] binder_get_thread+0x15d/0x750 [ 28.951635] binder_poll+0x4a/0x210 [ 28.955229] SyS_epoll_ctl+0x11d7/0x2190 [ 28.959258] do_fast_syscall_32+0x2f7/0x890 [ 28.963547] entry_SYSENTER_compat+0x74/0x83 [ 28.967920] [ 28.969515] Freed by task 3332: [ 28.972761] save_stack_trace+0x16/0x20 [ 28.976702] save_stack+0x43/0xd0 [ 28.980122] kasan_slab_free+0x72/0xc0 [ 28.983978] kfree+0x103/0x300 [ 28.987138] binder_thread_dec_tmpref+0x1cc/0x240 [ 28.991948] binder_thread_release+0x27d/0x540 [ 28.996499] binder_ioctl+0x9c0/0x11b0 [ 29.000354] compat_SyS_ioctl+0x15f/0x2050 [ 29.004565] do_fast_syscall_32+0x2f7/0x890 [ 29.008854] entry_SYSENTER_compat+0x74/0x83 [ 29.013227] [ 29.014826] The buggy address belongs to the object at ffff8801c85f5900 [ 29.014826] which belongs to the cache kmalloc-512 of size 512 [ 29.027449] The buggy address is located 184 bytes inside of [ 29.027449] 512-byte region [ffff8801c85f5900, ffff8801c85f5b00) [ 29.039289] The buggy address belongs to the page: [ 29.044187] page:ffffea0007217d00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 29.054350] flags: 0x8000000000004080(slab|head) [ 29.059073] page dumped because: kasan: bad access detected [ 29.064748] [ 29.066345] Memory state around the buggy address: [ 29.071249] ffff8801c85f5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.078589] ffff8801c85f5900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.085920] >ffff8801c85f5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.093247] ^ [ 29.098407] ffff8801c85f5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.105734] ffff8801c85f5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.113060] ================================================================== [ 29.120386] Disabling lock debugging due to kernel taint [ 29.125803] Kernel panic - not syncing: panic_on_warn set ... [ 29.125803] [ 29.133137] CPU: 0 PID: 3332 Comm: syzkaller629572 Tainted: G B 4.9.77-g033d019 #24 [ 29.142029] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.151354] ffff8801c85bf7c8 ffffffff81d941c9 ffffffff841970ff ffff8801c85bf8a0 [ 29.159317] 0000000000000000 ffff8801c85f59b8 ffff8801c85f59b8 ffff8801c85bf890 [ 29.167280] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 29.175256] Call Trace: [ 29.177815] [] dump_stack+0xc1/0x128 [ 29.183148] [] panic+0x1bc/0x3a8 [ 29.188135] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 29.196333] [] ? add_taint+0x40/0x50 [ 29.201675] [] kasan_end_report+0x50/0x50 [ 29.207443] [] kasan_report+0x167/0x360 [ 29.213040] [] ? __lock_acquire+0x2eff/0x3640 [ 29.219164] [] __asan_report_load8_noabort+0x14/0x20 [ 29.225887] [] __lock_acquire+0x2eff/0x3640 [ 29.231828] [] ? __lock_acquire+0x629/0x3640 [ 29.237857] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.244839] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.251832] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.258824] [] ? mark_held_locks+0xaf/0x100 [ 29.264768] [] ? mutex_lock_nested+0x5e3/0x870 [ 29.270979] [] lock_acquire+0x12e/0x410 [ 29.276571] [] ? remove_wait_queue+0x14/0x40 [ 29.282600] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 29.288887] [] ? remove_wait_queue+0x14/0x40 [ 29.294912] [] remove_wait_queue+0x14/0x40 [ 29.300769] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 29.307750] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 29.314995] [] ? ep_free+0x1b0/0x1b0 [ 29.320336] [] ep_free+0x96/0x1b0 [ 29.325406] [] ? ep_free+0x1b0/0x1b0 [ 29.330739] [] ep_eventpoll_release+0x44/0x60 [ 29.336851] [] __fput+0x28c/0x6e0 [ 29.341923] [] ____fput+0x15/0x20 [ 29.346997] [] task_work_run+0x115/0x190 [ 29.352682] [] do_exit+0x7e7/0x2a40 [ 29.357932] [] ? __pmd_alloc+0x410/0x410 [ 29.363627] [] ? release_task+0x1240/0x1240 [ 29.369570] [] ? __do_page_fault+0x5ec/0xd40 [ 29.375598] [] ? up_read+0x1a/0x40 [ 29.380760] [] ? __do_page_fault+0x3bd/0xd40 [ 29.386788] [] do_group_exit+0x108/0x320 [ 29.392467] [] ? do_group_exit+0x320/0x320 [ 29.398320] [] SyS_exit_group+0x1d/0x20 [ 29.403918] [] do_fast_syscall_32+0x2f7/0x890 [ 29.410032] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 29.416669] [] entry_SYSENTER_compat+0x74/0x83 [ 29.423467] Dumping ftrace buffer: [ 29.426981] (ftrace buffer empty) [ 29.430661] Kernel Offset: disabled [ 29.434255] Rebooting in 86400 seconds..