[....] Starting enhanced syslogd: rsyslogd[ 11.482284] audit: type=1400 audit(1516665060.089: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.231' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 36.551507] ================================================================== [ 36.558919] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 36.565561] Read of size 8 at addr ffff8801c8238fb8 by task syzkaller356799/3343 [ 36.573064] [ 36.574670] CPU: 0 PID: 3343 Comm: syzkaller356799 Not tainted 4.9.77-ge12a9c4 #27 [ 36.582347] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.591767] ffff8801c92a7870 ffffffff81d941c9 ffffea0007208e00 ffff8801c8238fb8 [ 36.599780] 0000000000000000 ffff8801c8238fb8 ffff8801c8238fb8 ffff8801c92a78a8 [ 36.607824] ffffffff8153db93 ffff8801c8238fb8 0000000000000008 0000000000000000 [ 36.615850] Call Trace: [ 36.618421] [] dump_stack+0xc1/0x128 [ 36.623766] [] print_address_description+0x73/0x280 [ 36.630521] [] kasan_report+0x275/0x360 [ 36.636303] [] ? __lock_acquire+0x2eff/0x3640 [ 36.642448] [] __asan_report_load8_noabort+0x14/0x20 [ 36.649195] [] __lock_acquire+0x2eff/0x3640 [ 36.655140] [] ? __lock_acquire+0x629/0x3640 [ 36.661538] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 36.668526] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 36.675524] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 36.682506] [] ? mark_held_locks+0xaf/0x100 [ 36.688463] [] ? mutex_lock_nested+0x5e3/0x870 [ 36.694675] [] lock_acquire+0x12e/0x410 [ 36.700276] [] ? remove_wait_queue+0x14/0x40 [ 36.706316] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 36.712613] [] ? remove_wait_queue+0x14/0x40 [ 36.718644] [] remove_wait_queue+0x14/0x40 [ 36.724511] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 36.731501] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 36.738750] [] ? ep_free+0x1b0/0x1b0 [ 36.744086] [] ep_free+0x96/0x1b0 [ 36.749160] [] ? ep_free+0x1b0/0x1b0 [ 36.754499] [] ep_eventpoll_release+0x44/0x60 [ 36.760617] [] __fput+0x28c/0x6e0 [ 36.765693] [] ____fput+0x15/0x20 [ 36.770778] [] task_work_run+0x115/0x190 [ 36.776473] [] do_exit+0x7e7/0x2a40 [ 36.781729] [] ? __pmd_alloc+0x410/0x410 [ 36.787416] [] ? release_task+0x1240/0x1240 [ 36.793363] [] ? __do_page_fault+0x5ec/0xd40 [ 36.799398] [] ? up_read+0x1a/0x40 [ 36.804560] [] ? __do_page_fault+0x3bd/0xd40 [ 36.810593] [] do_group_exit+0x108/0x320 [ 36.816278] [] ? do_group_exit+0x320/0x320 [ 36.822143] [] SyS_exit_group+0x1d/0x20 [ 36.827743] [] do_fast_syscall_32+0x2f7/0x890 [ 36.833860] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 36.840503] [] entry_SYSENTER_compat+0x74/0x83 [ 36.846707] [ 36.848308] Allocated by task 3343: [ 36.851913] save_stack_trace+0x16/0x20 [ 36.855860] save_stack+0x43/0xd0 [ 36.859284] kasan_kmalloc+0xad/0xe0 [ 36.862967] kmem_cache_alloc_trace+0xfb/0x2a0 [ 36.867523] binder_get_thread+0x15d/0x750 [ 36.871823] binder_poll+0x4a/0x210 [ 36.875425] SyS_epoll_ctl+0x11d7/0x2190 [ 36.879459] do_fast_syscall_32+0x2f7/0x890 [ 36.883753] entry_SYSENTER_compat+0x74/0x83 [ 36.888135] [ 36.889730] Freed by task 3343: [ 36.892982] save_stack_trace+0x16/0x20 [ 36.897024] save_stack+0x43/0xd0 [ 36.900449] kasan_slab_free+0x72/0xc0 [ 36.904311] kfree+0x103/0x300 [ 36.907477] binder_thread_dec_tmpref+0x1cc/0x240 [ 36.912301] binder_thread_release+0x27d/0x540 [ 36.916866] binder_ioctl+0x9c0/0x11b0 [ 36.920726] compat_SyS_ioctl+0x15f/0x2050 [ 36.924936] do_fast_syscall_32+0x2f7/0x890 [ 36.929232] entry_SYSENTER_compat+0x74/0x83 [ 36.933610] [ 36.935213] The buggy address belongs to the object at ffff8801c8238f00 [ 36.935213] which belongs to the cache kmalloc-512 of size 512 [ 36.947843] The buggy address is located 184 bytes inside of [ 36.947843] 512-byte region [ffff8801c8238f00, ffff8801c8239100) [ 36.959690] The buggy address belongs to the page: [ 36.964603] page:ffffea0007208e00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 36.974952] flags: 0x8000000000004080(slab|head) [ 36.979677] page dumped because: kasan: bad access detected [ 36.985358] [ 36.986972] Memory state around the buggy address: [ 36.991872] ffff8801c8238e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 36.999205] ffff8801c8238f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.006551] >ffff8801c8238f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.013885] ^ [ 37.019052] ffff8801c8239000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.026389] ffff8801c8239080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.033723] ================================================================== [ 37.041053] Disabling lock debugging due to kernel taint [ 37.046509] Kernel panic - not syncing: panic_on_warn set ... [ 37.046509] [ 37.053866] CPU: 0 PID: 3343 Comm: syzkaller356799 Tainted: G B 4.9.77-ge12a9c4 #27 [ 37.063287] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.072617] ffff8801c92a77c8 ffffffff81d941c9 ffffffff841970ff ffff8801c92a78a0 [ 37.080599] 0000000000000000 ffff8801c8238fb8 ffff8801c8238fb8 ffff8801c92a7890 [ 37.088617] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 37.096639] Call Trace: [ 37.099209] [] dump_stack+0xc1/0x128 [ 37.104554] [] panic+0x1bc/0x3a8 [ 37.109560] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 37.117772] [] ? add_taint+0x40/0x50 [ 37.123113] [] kasan_end_report+0x50/0x50 [ 37.128883] [] kasan_report+0x167/0x360 [ 37.134485] [] ? __lock_acquire+0x2eff/0x3640 [ 37.140622] [] __asan_report_load8_noabort+0x14/0x20 [ 37.147378] [] __lock_acquire+0x2eff/0x3640 [ 37.153341] [] ? __lock_acquire+0x629/0x3640 [ 37.159375] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.166371] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.173362] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.180365] [] ? mark_held_locks+0xaf/0x100 [ 37.186313] [] ? mutex_lock_nested+0x5e3/0x870 [ 37.192515] [] lock_acquire+0x12e/0x410 [ 37.198123] [] ? remove_wait_queue+0x14/0x40 [ 37.204160] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 37.210450] [] ? remove_wait_queue+0x14/0x40 [ 37.216489] [] remove_wait_queue+0x14/0x40 [ 37.222350] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 37.229343] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 37.236608] [] ? ep_free+0x1b0/0x1b0 [ 37.242033] [] ep_free+0x96/0x1b0 [ 37.247110] [] ? ep_free+0x1b0/0x1b0 [ 37.252534] [] ep_eventpoll_release+0x44/0x60 [ 37.258668] [] __fput+0x28c/0x6e0 [ 37.263766] [] ____fput+0x15/0x20 [ 37.268863] [] task_work_run+0x115/0x190 [ 37.274581] [] do_exit+0x7e7/0x2a40 [ 37.279852] [] ? __pmd_alloc+0x410/0x410 [ 37.285553] [] ? release_task+0x1240/0x1240 [ 37.291507] [] ? __do_page_fault+0x5ec/0xd40 [ 37.297547] [] ? up_read+0x1a/0x40 [ 37.302712] [] ? __do_page_fault+0x3bd/0xd40 [ 37.309351] [] do_group_exit+0x108/0x320 [ 37.315036] [] ? do_group_exit+0x320/0x320 [ 37.320894] [] SyS_exit_group+0x1d/0x20 [ 37.326496] [] do_fast_syscall_32+0x2f7/0x890 [ 37.332612] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.339254] [] entry_SYSENTER_compat+0x74/0x83 [ 37.345901] Dumping ftrace buffer: [ 37.349417] (ftrace buffer empty) [ 37.353097] Kernel Offset: disabled [ 37.356695] Rebooting in 86400 seconds..