[....] Starting enhanced syslogd: rsyslogd[ 10.779917] audit: type=1400 audit(1516036279.138: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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.42' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.301719] ================================================================== [ 24.302888] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 24.303837] Read of size 8 at addr ffff8801c9604d38 by task syzkaller357917/3333 [ 24.304858] [ 24.305092] CPU: 0 PID: 3333 Comm: syzkaller357917 Not tainted 4.9.76-g8dec074 #23 [ 24.306101] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.307406] ffff8801cd157870 ffffffff81d93169 ffffea0007258100 ffff8801c9604d38 [ 24.308574] 0000000000000000 ffff8801c9604d38 ffff8801c9604d38 ffff8801cd1578a8 [ 24.309716] ffffffff8153cb43 ffff8801c9604d38 0000000000000008 0000000000000000 [ 24.310904] Call Trace: [ 24.311278] [] dump_stack+0xc1/0x128 [ 24.312021] [] print_address_description+0x73/0x280 [ 24.312923] [] kasan_report+0x275/0x360 [ 24.313668] [] ? __lock_acquire+0x2eff/0x3640 [ 24.314532] [] __asan_report_load8_noabort+0x14/0x20 [ 24.315430] [] __lock_acquire+0x2eff/0x3640 [ 24.316260] [] ? __lock_acquire+0x629/0x3640 [ 24.317060] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.317990] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.318941] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.319884] [] ? mark_held_locks+0xaf/0x100 [ 24.320682] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.321502] [] lock_acquire+0x12e/0x410 [ 24.324914] [] ? remove_wait_queue+0x14/0x40 [ 24.330942] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.337230] [] ? remove_wait_queue+0x14/0x40 [ 24.343278] [] remove_wait_queue+0x14/0x40 [ 24.349236] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.356214] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.363451] [] ? ep_free+0x1b0/0x1b0 [ 24.369833] [] ep_free+0x96/0x1b0 [ 24.374909] [] ? ep_free+0x1b0/0x1b0 [ 24.380236] [] ep_eventpoll_release+0x44/0x60 [ 24.386347] [] __fput+0x28c/0x6e0 [ 24.391421] [] ____fput+0x15/0x20 [ 24.396494] [] task_work_run+0x115/0x190 [ 24.402176] [] do_exit+0x7e7/0x2a40 [ 24.407419] [] ? __pmd_alloc+0x410/0x410 [ 24.413095] [] ? release_task+0x1240/0x1240 [ 24.419034] [] ? __do_page_fault+0x5ec/0xd40 [ 24.425059] [] ? up_read+0x1a/0x40 [ 24.430214] [] ? __do_page_fault+0x3bd/0xd40 [ 24.436238] [] do_group_exit+0x108/0x320 [ 24.441912] [] ? do_group_exit+0x320/0x320 [ 24.447761] [] SyS_exit_group+0x1d/0x20 [ 24.453350] [] do_fast_syscall_32+0x2f7/0x890 [ 24.459476] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 24.466114] [] entry_SYSENTER_compat+0x74/0x83 [ 24.472320] [ 24.473916] Allocated by task 3333: [ 24.477514] save_stack_trace+0x16/0x20 [ 24.481453] save_stack+0x43/0xd0 [ 24.484873] kasan_kmalloc+0xad/0xe0 [ 24.488551] kmem_cache_alloc_trace+0xfb/0x2a0 [ 24.493107] binder_get_thread+0x15d/0x750 [ 24.497323] binder_poll+0x4a/0x210 [ 24.500922] SyS_epoll_ctl+0x11d7/0x2190 [ 24.504947] do_fast_syscall_32+0x2f7/0x890 [ 24.509234] entry_SYSENTER_compat+0x74/0x83 [ 24.513604] [ 24.515199] Freed by task 3333: [ 24.518447] save_stack_trace+0x16/0x20 [ 24.522387] save_stack+0x43/0xd0 [ 24.525806] kasan_slab_free+0x72/0xc0 [ 24.529656] kfree+0x103/0x300 [ 24.532817] binder_thread_dec_tmpref+0x1cc/0x240 [ 24.537626] binder_thread_release+0x27d/0x540 [ 24.542171] binder_ioctl+0x9c0/0x11b0 [ 24.546024] compat_SyS_ioctl+0x15f/0x2050 [ 24.550234] do_fast_syscall_32+0x2f7/0x890 [ 24.554522] entry_SYSENTER_compat+0x74/0x83 [ 24.558890] [ 24.560500] The buggy address belongs to the object at ffff8801c9604c80 [ 24.560500] which belongs to the cache kmalloc-512 of size 512 [ 24.573121] The buggy address is located 184 bytes inside of [ 24.573121] 512-byte region [ffff8801c9604c80, ffff8801c9604e80) [ 24.584963] The buggy address belongs to the page: [ 24.589858] page:ffffea0007258100 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.600012] flags: 0x8000000000004080(slab|head) [ 24.604736] page dumped because: kasan: bad access detected [ 24.610408] [ 24.612007] Memory state around the buggy address: [ 24.616909] ffff8801c9604c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.624233] ffff8801c9604c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.631642] >ffff8801c9604d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.638964] ^ [ 24.644119] ffff8801c9604d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.651442] ffff8801c9604e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.658767] ================================================================== [ 24.666090] Disabling lock debugging due to kernel taint [ 24.671502] Kernel panic - not syncing: panic_on_warn set ... [ 24.671502] [ 24.678837] CPU: 0 PID: 3333 Comm: syzkaller357917 Tainted: G B 4.9.76-g8dec074 #23 [ 24.687729] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.697049] ffff8801cd1577c8 ffffffff81d93169 ffffffff84195c2f ffff8801cd1578a0 [ 24.704998] 0000000000000000 ffff8801c9604d38 ffff8801c9604d38 ffff8801cd157890 [ 24.712955] ffffffff8142e371 0000000041b58ab3 ffffffff84189690 ffffffff8142e1b5 [ 24.720909] Call Trace: [ 24.723467] [] dump_stack+0xc1/0x128 [ 24.728806] [] panic+0x1bc/0x3a8 [ 24.733789] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 24.741989] [] ? add_taint+0x40/0x50 [ 24.747328] [] kasan_end_report+0x50/0x50 [ 24.753090] [] kasan_report+0x167/0x360 [ 24.758682] [] ? __lock_acquire+0x2eff/0x3640 [ 24.764794] [] __asan_report_load8_noabort+0x14/0x20 [ 24.771512] [] __lock_acquire+0x2eff/0x3640 [ 24.777458] [] ? __lock_acquire+0x629/0x3640 [ 24.783480] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.790466] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.797450] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.804434] [] ? mark_held_locks+0xaf/0x100 [ 24.810379] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.816578] [] lock_acquire+0x12e/0x410 [ 24.822169] [] ? remove_wait_queue+0x14/0x40 [ 24.828193] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.834492] [] ? remove_wait_queue+0x14/0x40 [ 24.840518] [] remove_wait_queue+0x14/0x40 [ 24.846375] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.853355] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.860596] [] ? ep_free+0x1b0/0x1b0 [ 24.865929] [] ep_free+0x96/0x1b0 [ 24.871000] [] ? ep_free+0x1b0/0x1b0 [ 24.876327] [] ep_eventpoll_release+0x44/0x60 [ 24.882436] [] __fput+0x28c/0x6e0 [ 24.887510] [] ____fput+0x15/0x20 [ 24.892577] [] task_work_run+0x115/0x190 [ 24.898254] [] do_exit+0x7e7/0x2a40 [ 24.903493] [] ? __pmd_alloc+0x410/0x410 [ 24.909173] [] ? release_task+0x1240/0x1240 [ 24.915115] [] ? __do_page_fault+0x5ec/0xd40 [ 24.921140] [] ? up_read+0x1a/0x40 [ 24.926294] [] ? __do_page_fault+0x3bd/0xd40 [ 24.932315] [] do_group_exit+0x108/0x320 [ 24.937995] [] ? do_group_exit+0x320/0x320 [ 24.943844] [] SyS_exit_group+0x1d/0x20 [ 24.949434] [] do_fast_syscall_32+0x2f7/0x890 [ 24.955547] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 24.962182] [] entry_SYSENTER_compat+0x74/0x83 [ 24.968426] Dumping ftrace buffer: [ 24.971940] (ftrace buffer empty) [ 24.975631] Kernel Offset: disabled [ 24.979222] Rebooting in 86400 seconds..