[....] Starting enhanced syslogd: rsyslogd[ 11.418295] audit: type=1400 audit(1516228119.636: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.0.34' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.086250] ================================================================== [ 27.093643] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.100276] Read of size 8 at addr ffff8801c835fc38 by task syzkaller061148/3332 [ 27.107774] [ 27.109372] CPU: 1 PID: 3332 Comm: syzkaller061148 Not tainted 4.9.77-g033d019 #24 [ 27.117044] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.126380] ffff8801c8297870 ffffffff81d941c9 ffffea000720d780 ffff8801c835fc38 [ 27.134329] 0000000000000000 ffff8801c835fc38 ffff8801c835fc38 ffff8801c82978a8 [ 27.142275] ffffffff8153db93 ffff8801c835fc38 0000000000000008 0000000000000000 [ 27.150227] Call Trace: [ 27.152783] [] dump_stack+0xc1/0x128 [ 27.158113] [] print_address_description+0x73/0x280 [ 27.164744] [] kasan_report+0x275/0x360 [ 27.170334] [] ? __lock_acquire+0x2eff/0x3640 [ 27.176443] [] __asan_report_load8_noabort+0x14/0x20 [ 27.183158] [] __lock_acquire+0x2eff/0x3640 [ 27.189093] [] ? __lock_acquire+0x629/0x3640 [ 27.195115] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.202094] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.209078] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.216063] [] ? mark_held_locks+0xaf/0x100 [ 27.221999] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.228200] [] lock_acquire+0x12e/0x410 [ 27.233791] [] ? remove_wait_queue+0x14/0x40 [ 27.239812] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.246096] [] ? remove_wait_queue+0x14/0x40 [ 27.252122] [] remove_wait_queue+0x14/0x40 [ 27.257974] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.264951] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.272193] [] ? ep_free+0x1b0/0x1b0 [ 27.277530] [] ep_free+0x96/0x1b0 [ 27.282597] [] ? ep_free+0x1b0/0x1b0 [ 27.287924] [] ep_eventpoll_release+0x44/0x60 [ 27.294037] [] __fput+0x28c/0x6e0 [ 27.299112] [] ____fput+0x15/0x20 [ 27.304180] [] task_work_run+0x115/0x190 [ 27.309866] [] do_exit+0x7e7/0x2a40 [ 27.315115] [] ? __pmd_alloc+0x410/0x410 [ 27.320802] [] ? release_task+0x1240/0x1240 [ 27.326751] [] ? __do_page_fault+0x5ec/0xd40 [ 27.332784] [] ? up_read+0x1a/0x40 [ 27.337940] [] ? __do_page_fault+0x3bd/0xd40 [ 27.343963] [] do_group_exit+0x108/0x320 [ 27.349640] [] ? do_group_exit+0x320/0x320 [ 27.355500] [] SyS_exit_group+0x1d/0x20 [ 27.361097] [] do_fast_syscall_32+0x2f7/0x890 [ 27.367206] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.373839] [] entry_SYSENTER_compat+0x74/0x83 [ 27.380034] [ 27.381630] Allocated by task 3332: [ 27.385225] save_stack_trace+0x16/0x20 [ 27.389167] save_stack+0x43/0xd0 [ 27.392586] kasan_kmalloc+0xad/0xe0 [ 27.396265] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.400814] binder_get_thread+0x15d/0x750 [ 27.405014] binder_poll+0x4a/0x210 [ 27.408608] SyS_epoll_ctl+0x11d7/0x2190 [ 27.412635] do_fast_syscall_32+0x2f7/0x890 [ 27.416923] entry_SYSENTER_compat+0x74/0x83 [ 27.421294] [ 27.422887] Freed by task 3332: [ 27.426131] save_stack_trace+0x16/0x20 [ 27.430086] save_stack+0x43/0xd0 [ 27.433505] kasan_slab_free+0x72/0xc0 [ 27.437359] kfree+0x103/0x300 [ 27.440520] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.445329] binder_thread_release+0x27d/0x540 [ 27.449886] binder_ioctl+0x9c0/0x11b0 [ 27.453742] compat_SyS_ioctl+0x15f/0x2050 [ 27.457944] do_fast_syscall_32+0x2f7/0x890 [ 27.462243] entry_SYSENTER_compat+0x74/0x83 [ 27.466613] [ 27.468207] The buggy address belongs to the object at ffff8801c835fb80 [ 27.468207] which belongs to the cache kmalloc-512 of size 512 [ 27.480844] The buggy address is located 184 bytes inside of [ 27.480844] 512-byte region [ffff8801c835fb80, ffff8801c835fd80) [ 27.492690] The buggy address belongs to the page: [ 27.497587] page:ffffea000720d780 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.507743] flags: 0x8000000000004080(slab|head) [ 27.512474] page dumped because: kasan: bad access detected [ 27.518146] [ 27.519738] Memory state around the buggy address: [ 27.524632] ffff8801c835fb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.531954] ffff8801c835fb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.539276] >ffff8801c835fc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.546600] ^ [ 27.551755] ffff8801c835fc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.559079] ffff8801c835fd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.566409] ================================================================== [ 27.573732] Disabling lock debugging due to kernel taint [ 27.579148] Kernel panic - not syncing: panic_on_warn set ... [ 27.579148] [ 27.586475] CPU: 1 PID: 3332 Comm: syzkaller061148 Tainted: G B 4.9.77-g033d019 #24 [ 27.595362] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.604684] ffff8801c82977c8 ffffffff81d941c9 ffffffff841970ff ffff8801c82978a0 [ 27.612635] 0000000000000000 ffff8801c835fc38 ffff8801c835fc38 ffff8801c8297890 [ 27.620585] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 27.628540] Call Trace: [ 27.631094] [] dump_stack+0xc1/0x128 [ 27.636424] [] panic+0x1bc/0x3a8 [ 27.641407] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.649602] [] ? add_taint+0x40/0x50 [ 27.654936] [] kasan_end_report+0x50/0x50 [ 27.660699] [] kasan_report+0x167/0x360 [ 27.666288] [] ? __lock_acquire+0x2eff/0x3640 [ 27.672399] [] __asan_report_load8_noabort+0x14/0x20 [ 27.679113] [] __lock_acquire+0x2eff/0x3640 [ 27.685049] [] ? __lock_acquire+0x629/0x3640 [ 27.691072] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.698050] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.705026] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.712002] [] ? mark_held_locks+0xaf/0x100 [ 27.717939] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.724135] [] lock_acquire+0x12e/0x410 [ 27.729722] [] ? remove_wait_queue+0x14/0x40 [ 27.735747] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.742032] [] ? remove_wait_queue+0x14/0x40 [ 27.748055] [] remove_wait_queue+0x14/0x40 [ 27.753907] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.760885] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.768131] [] ? ep_free+0x1b0/0x1b0 [ 27.773469] [] ep_free+0x96/0x1b0 [ 27.778537] [] ? ep_free+0x1b0/0x1b0 [ 27.783867] [] ep_eventpoll_release+0x44/0x60 [ 27.789978] [] __fput+0x28c/0x6e0 [ 27.795045] [] ____fput+0x15/0x20 [ 27.800113] [] task_work_run+0x115/0x190 [ 27.805787] [] do_exit+0x7e7/0x2a40 [ 27.811030] [] ? __pmd_alloc+0x410/0x410 [ 27.816709] [] ? release_task+0x1240/0x1240 [ 27.822652] [] ? __do_page_fault+0x5ec/0xd40 [ 27.828677] [] ? up_read+0x1a/0x40 [ 27.833832] [] ? __do_page_fault+0x3bd/0xd40 [ 27.839854] [] do_group_exit+0x108/0x320 [ 27.845530] [] ? do_group_exit+0x320/0x320 [ 27.851381] [] SyS_exit_group+0x1d/0x20 [ 27.856971] [] do_fast_syscall_32+0x2f7/0x890 [ 27.863089] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.869726] [] entry_SYSENTER_compat+0x74/0x83 [ 27.876312] Dumping ftrace buffer: [ 27.879825] (ftrace buffer empty) [ 27.883499] Kernel Offset: disabled [ 27.887089] Rebooting in 86400 seconds..