[....] Starting enhanced syslogd: rsyslogd[ 12.933909] audit: type=1400 audit(1515420484.350:4): avc: denied { syslog } for pid=3170 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.23' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.797673] ================================================================== [ 24.805047] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 24.811682] Read of size 8 at addr ffff8801c8c03238 by task syzkaller626185/3330 [ 24.819176] [ 24.820773] CPU: 0 PID: 3330 Comm: syzkaller626185 Not tainted 4.9.75-g5f5e5d4 #17 [ 24.828442] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.837762] ffff8801c8a6f870 ffffffff81d93049 ffffea0007230080 ffff8801c8c03238 [ 24.845710] 0000000000000000 ffff8801c8c03238 ffff8801c8c03238 ffff8801c8a6f8a8 [ 24.853653] ffffffff8153ca53 ffff8801c8c03238 0000000000000008 0000000000000000 [ 24.861595] Call Trace: [ 24.864150] [] dump_stack+0xc1/0x128 [ 24.869480] [] print_address_description+0x73/0x280 [ 24.876108] [] kasan_report+0x275/0x360 [ 24.881705] [] ? __lock_acquire+0x2eff/0x3640 [ 24.887814] [] __asan_report_load8_noabort+0x14/0x20 [ 24.894531] [] __lock_acquire+0x2eff/0x3640 [ 24.900482] [] ? __lock_acquire+0x629/0x3640 [ 24.906516] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.913493] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.920469] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.927446] [] ? mark_held_locks+0xaf/0x100 [ 24.933381] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.939575] [] lock_acquire+0x12e/0x410 [ 24.945162] [] ? remove_wait_queue+0x14/0x40 [ 24.951184] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.957466] [] ? remove_wait_queue+0x14/0x40 [ 24.963486] [] remove_wait_queue+0x14/0x40 [ 24.969341] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.976323] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.983564] [] ? ep_free+0x1b0/0x1b0 [ 24.988890] [] ep_free+0x96/0x1b0 [ 24.993958] [] ? ep_free+0x1b0/0x1b0 [ 24.999286] [] ep_eventpoll_release+0x44/0x60 [ 25.005397] [] __fput+0x28c/0x6e0 [ 25.010463] [] ____fput+0x15/0x20 [ 25.015531] [] task_work_run+0x115/0x190 [ 25.021205] [] do_exit+0x7e7/0x2a40 [ 25.026445] [] ? __pmd_alloc+0x410/0x410 [ 25.032120] [] ? release_task+0x1240/0x1240 [ 25.038055] [] ? __do_page_fault+0x5ec/0xd40 [ 25.044083] [] ? up_read+0x1a/0x40 [ 25.049237] [] ? __do_page_fault+0x3bd/0xd40 [ 25.055258] [] do_group_exit+0x108/0x320 [ 25.060931] [] ? do_group_exit+0x320/0x320 [ 25.066780] [] SyS_exit_group+0x1d/0x20 [ 25.072367] [] do_fast_syscall_32+0x2f7/0x890 [ 25.078475] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.085107] [] entry_SYSENTER_compat+0x74/0x83 [ 25.091301] [ 25.092892] Allocated by task 3330: [ 25.096484] save_stack_trace+0x16/0x20 [ 25.100422] save_stack+0x43/0xd0 [ 25.103839] kasan_kmalloc+0xad/0xe0 [ 25.107514] kmem_cache_alloc_trace+0xfb/0x2a0 [ 25.112064] binder_get_thread+0x15d/0x750 [ 25.116262] binder_poll+0x4a/0x210 [ 25.119852] SyS_epoll_ctl+0x11d7/0x2190 [ 25.123882] do_fast_syscall_32+0x2f7/0x890 [ 25.128166] entry_SYSENTER_compat+0x74/0x83 [ 25.132535] [ 25.134133] Freed by task 3330: [ 25.137374] save_stack_trace+0x16/0x20 [ 25.141314] save_stack+0x43/0xd0 [ 25.144729] kasan_slab_free+0x72/0xc0 [ 25.148577] kfree+0x103/0x300 [ 25.151735] binder_thread_dec_tmpref+0x1cc/0x240 [ 25.156551] binder_thread_release+0x27d/0x540 [ 25.161094] binder_ioctl+0x9c0/0x11b0 [ 25.164946] compat_SyS_ioctl+0x15f/0x2050 [ 25.169147] do_fast_syscall_32+0x2f7/0x890 [ 25.173431] entry_SYSENTER_compat+0x74/0x83 [ 25.177798] [ 25.179390] The buggy address belongs to the object at ffff8801c8c03180 [ 25.179390] which belongs to the cache kmalloc-512 of size 512 [ 25.192007] The buggy address is located 184 bytes inside of [ 25.192007] 512-byte region [ffff8801c8c03180, ffff8801c8c03380) [ 25.203844] The buggy address belongs to the page: [ 25.208737] page:ffffea0007230080 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 25.218888] flags: 0x8000000000004080(slab|head) [ 25.223605] page dumped because: kasan: bad access detected [ 25.229277] [ 25.230869] Memory state around the buggy address: [ 25.235760] ffff8801c8c03100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.243085] ffff8801c8c03180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.250410] >ffff8801c8c03200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.257733] ^ [ 25.262886] ffff8801c8c03280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.270206] ffff8801c8c03300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.277527] ================================================================== [ 25.284847] Disabling lock debugging due to kernel taint [ 25.290262] Kernel panic - not syncing: panic_on_warn set ... [ 25.290262] [ 25.297589] CPU: 0 PID: 3330 Comm: syzkaller626185 Tainted: G B 4.9.75-g5f5e5d4 #17 [ 25.306473] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.315795] ffff8801c8a6f7c8 ffffffff81d93049 ffffffff84195be7 ffff8801c8a6f8a0 [ 25.323753] 0000000000000000 ffff8801c8c03238 ffff8801c8c03238 ffff8801c8a6f890 [ 25.331695] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 25.339645] Call Trace: [ 25.342201] [] dump_stack+0xc1/0x128 [ 25.347529] [] panic+0x1bc/0x3a8 [ 25.352509] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 25.360702] [] ? add_taint+0x40/0x50 [ 25.366029] [] kasan_end_report+0x50/0x50 [ 25.371792] [] kasan_report+0x167/0x360 [ 25.377382] [] ? __lock_acquire+0x2eff/0x3640 [ 25.383490] [] __asan_report_load8_noabort+0x14/0x20 [ 25.390209] [] __lock_acquire+0x2eff/0x3640 [ 25.396144] [] ? __lock_acquire+0x629/0x3640 [ 25.402166] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.409142] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.416119] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.423095] [] ? mark_held_locks+0xaf/0x100 [ 25.429032] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.435233] [] lock_acquire+0x12e/0x410 [ 25.440820] [] ? remove_wait_queue+0x14/0x40 [ 25.446844] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.453132] [] ? remove_wait_queue+0x14/0x40 [ 25.459151] [] remove_wait_queue+0x14/0x40 [ 25.465000] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.471977] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.479212] [] ? ep_free+0x1b0/0x1b0 [ 25.484539] [] ep_free+0x96/0x1b0 [ 25.489605] [] ? ep_free+0x1b0/0x1b0 [ 25.494933] [] ep_eventpoll_release+0x44/0x60 [ 25.501043] [] __fput+0x28c/0x6e0 [ 25.506111] [] ____fput+0x15/0x20 [ 25.511179] [] task_work_run+0x115/0x190 [ 25.516866] [] do_exit+0x7e7/0x2a40 [ 25.522119] [] ? __pmd_alloc+0x410/0x410 [ 25.527793] [] ? release_task+0x1240/0x1240 [ 25.533729] [] ? __do_page_fault+0x5ec/0xd40 [ 25.539750] [] ? up_read+0x1a/0x40 [ 25.544903] [] ? __do_page_fault+0x3bd/0xd40 [ 25.550924] [] do_group_exit+0x108/0x320 [ 25.556602] [] ? do_group_exit+0x320/0x320 [ 25.562452] [] SyS_exit_group+0x1d/0x20 [ 25.568041] [] do_fast_syscall_32+0x2f7/0x890 [ 25.574149] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.580780] [] entry_SYSENTER_compat+0x74/0x83 [ 25.587405] Dumping ftrace buffer: [ 25.590917] (ftrace buffer empty) [ 25.594592] Kernel Offset: disabled [ 25.598182] Rebooting in 86400 seconds..