[....] Starting enhanced syslogd: rsyslogd[ 10.287737] audit: type=1400 audit(1517190476.820:4): avc: denied { syslog } for pid=3171 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.15.228' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 21.308209] ================================================================== [ 21.309341] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 21.310270] Read of size 8 at addr ffff8801c88b19b8 by task syzkaller342019/3326 [ 21.311278] [ 21.311512] CPU: 1 PID: 3326 Comm: syzkaller342019 Not tainted 4.9.78-g68d447c #32 [ 21.312544] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.313837] ffff8801c854f870 ffffffff81d943a9 ffffea0007222c00 ffff8801c88b19b8 [ 21.315060] 0000000000000000 ffff8801c88b19b8 ffff8801c88b19b8 ffff8801c854f8a8 [ 21.316228] ffffffff8153dc23 ffff8801c88b19b8 0000000000000008 0000000000000000 [ 21.317382] Call Trace: [ 21.317745] [] dump_stack+0xc1/0x128 [ 21.318596] [] print_address_description+0x73/0x280 [ 21.319493] [] kasan_report+0x275/0x360 [ 21.320276] [] ? __lock_acquire+0x2eff/0x3640 [ 21.321109] [] __asan_report_load8_noabort+0x14/0x20 [ 21.322069] [] __lock_acquire+0x2eff/0x3640 [ 21.322936] [] ? __lock_acquire+0x629/0x3640 [ 21.323774] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.324741] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.325667] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.326593] [] ? mark_held_locks+0xaf/0x100 [ 21.327385] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.328206] [] lock_acquire+0x12e/0x410 [ 21.333223] [] ? remove_wait_queue+0x14/0x40 [ 21.339262] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.345551] [] ? remove_wait_queue+0x14/0x40 [ 21.351581] [] remove_wait_queue+0x14/0x40 [ 21.357441] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.364425] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.371672] [] ? ep_free+0x1b0/0x1b0 [ 21.377097] [] ep_free+0x96/0x1b0 [ 21.382169] [] ? ep_free+0x1b0/0x1b0 [ 21.387508] [] ep_eventpoll_release+0x44/0x60 [ 21.393624] [] __fput+0x28c/0x6e0 [ 21.398700] [] ____fput+0x15/0x20 [ 21.403775] [] task_work_run+0x115/0x190 [ 21.409457] [] do_exit+0x7e7/0x2a40 [ 21.414704] [] ? __pmd_alloc+0x410/0x410 [ 21.420385] [] ? release_task+0x1240/0x1240 [ 21.426327] [] ? __do_page_fault+0x5ec/0xd40 [ 21.432357] [] ? up_read+0x1a/0x40 [ 21.437517] [] ? __do_page_fault+0x3bd/0xd40 [ 21.443546] [] do_group_exit+0x108/0x320 [ 21.449232] [] ? do_group_exit+0x320/0x320 [ 21.455087] [] SyS_exit_group+0x1d/0x20 [ 21.460681] [] do_fast_syscall_32+0x2f7/0x890 [ 21.466798] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 21.473523] [] entry_SYSENTER_compat+0x74/0x83 [ 21.479724] [ 21.481337] Allocated by task 3326: [ 21.484935] save_stack_trace+0x16/0x20 [ 21.488888] save_stack+0x43/0xd0 [ 21.492320] kasan_kmalloc+0xad/0xe0 [ 21.496009] kmem_cache_alloc_trace+0xfb/0x2a0 [ 21.500561] binder_get_thread+0x15d/0x750 [ 21.504762] binder_poll+0x4a/0x210 [ 21.508370] SyS_epoll_ctl+0x11d7/0x2190 [ 21.512406] do_fast_syscall_32+0x2f7/0x890 [ 21.516697] entry_SYSENTER_compat+0x74/0x83 [ 21.521070] [ 21.522667] Freed by task 3326: [ 21.525925] save_stack_trace+0x16/0x20 [ 21.529868] save_stack+0x43/0xd0 [ 21.533291] kasan_slab_free+0x72/0xc0 [ 21.537150] kfree+0x103/0x300 [ 21.540311] binder_thread_dec_tmpref+0x1cc/0x240 [ 21.545121] binder_thread_release+0x27d/0x540 [ 21.549671] binder_ioctl+0x9c0/0x11b0 [ 21.553526] compat_SyS_ioctl+0x15f/0x2050 [ 21.557730] do_fast_syscall_32+0x2f7/0x890 [ 21.562022] entry_SYSENTER_compat+0x74/0x83 [ 21.566397] [ 21.567995] The buggy address belongs to the object at ffff8801c88b1900 [ 21.567995] which belongs to the cache kmalloc-512 of size 512 [ 21.580629] The buggy address is located 184 bytes inside of [ 21.580629] 512-byte region [ffff8801c88b1900, ffff8801c88b1b00) [ 21.592479] The buggy address belongs to the page: [ 21.597391] page:ffffea0007222c00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 21.607569] flags: 0x8000000000004080(slab|head) [ 21.612290] page dumped because: kasan: bad access detected [ 21.617977] [ 21.619571] Memory state around the buggy address: [ 21.624560] ffff8801c88b1880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.631889] ffff8801c88b1900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.639219] >ffff8801c88b1980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.646549] ^ [ 21.651707] ffff8801c88b1a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.659034] ffff8801c88b1a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.666363] ================================================================== [ 21.673692] Disabling lock debugging due to kernel taint [ 21.679111] Kernel panic - not syncing: panic_on_warn set ... [ 21.679111] [ 21.686442] CPU: 1 PID: 3326 Comm: syzkaller342019 Tainted: G B 4.9.78-g68d447c #32 [ 21.695331] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.704656] ffff8801c854f7c8 ffffffff81d943a9 ffffffff841971bf ffff8801c854f8a0 [ 21.712624] 0000000000000000 ffff8801c88b19b8 ffff8801c88b19b8 ffff8801c854f890 [ 21.720614] ffffffff8142f451 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f295 [ 21.728578] Call Trace: [ 21.731139] [] dump_stack+0xc1/0x128 [ 21.736472] [] panic+0x1bc/0x3a8 [ 21.741460] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 21.749659] [] ? add_taint+0x40/0x50 [ 21.754994] [] kasan_end_report+0x50/0x50 [ 21.760764] [] kasan_report+0x167/0x360 [ 21.766359] [] ? __lock_acquire+0x2eff/0x3640 [ 21.772471] [] __asan_report_load8_noabort+0x14/0x20 [ 21.779193] [] __lock_acquire+0x2eff/0x3640 [ 21.785136] [] ? __lock_acquire+0x629/0x3640 [ 21.791164] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.798148] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.805134] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.812119] [] ? mark_held_locks+0xaf/0x100 [ 21.818073] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.824274] [] lock_acquire+0x12e/0x410 [ 21.829877] [] ? remove_wait_queue+0x14/0x40 [ 21.835912] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.842201] [] ? remove_wait_queue+0x14/0x40 [ 21.848227] [] remove_wait_queue+0x14/0x40 [ 21.854092] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.861076] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.868321] [] ? ep_free+0x1b0/0x1b0 [ 21.873653] [] ep_free+0x96/0x1b0 [ 21.878726] [] ? ep_free+0x1b0/0x1b0 [ 21.884059] [] ep_eventpoll_release+0x44/0x60 [ 21.890173] [] __fput+0x28c/0x6e0 [ 21.895246] [] ____fput+0x15/0x20 [ 21.900322] [] task_work_run+0x115/0x190 [ 21.906014] [] do_exit+0x7e7/0x2a40 [ 21.911258] [] ? __pmd_alloc+0x410/0x410 [ 21.916938] [] ? release_task+0x1240/0x1240 [ 21.922879] [] ? __do_page_fault+0x5ec/0xd40 [ 21.928917] [] ? up_read+0x1a/0x40 [ 21.934484] [] ? __do_page_fault+0x3bd/0xd40 [ 21.940516] [] do_group_exit+0x108/0x320 [ 21.946201] [] ? do_group_exit+0x320/0x320 [ 21.952064] [] SyS_exit_group+0x1d/0x20 [ 21.957657] [] do_fast_syscall_32+0x2f7/0x890 [ 21.963770] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 21.970416] [] entry_SYSENTER_compat+0x74/0x83 [ 21.977064] Dumping ftrace buffer: [ 21.980573] (ftrace buffer empty) [ 21.984254] Kernel Offset: disabled [ 21.987853] Rebooting in 86400 seconds..