[....] Starting enhanced syslogd: rsyslogd[ 10.668287] audit: type=1400 audit(1516984456.603: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.61' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.680182] ================================================================== [ 20.681284] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.682195] Read of size 8 at addr ffff8801c962afb8 by task syzkaller160238/3324 [ 20.683211] [ 20.683443] CPU: 0 PID: 3324 Comm: syzkaller160238 Not tainted 4.9.78-gf518fe4 #31 [ 20.684475] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.685735] ffff8801c90d7870 ffffffff81d943a9 ffffea0007258a80 ffff8801c962afb8 [ 20.686948] 0000000000000000 ffff8801c962afb8 ffff8801c962afb8 ffff8801c90d78a8 [ 20.688121] ffffffff8153dc23 ffff8801c962afb8 0000000000000008 0000000000000000 [ 20.689279] Call Trace: [ 20.689649] [] dump_stack+0xc1/0x128 [ 20.690414] [] print_address_description+0x73/0x280 [ 20.691484] [] kasan_report+0x275/0x360 [ 20.692250] [] ? __lock_acquire+0x2eff/0x3640 [ 20.693081] [] __asan_report_load8_noabort+0x14/0x20 [ 20.693995] [] __lock_acquire+0x2eff/0x3640 [ 20.694798] [] ? __lock_acquire+0x629/0x3640 [ 20.695623] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.696583] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.697537] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.698503] [] ? mark_held_locks+0xaf/0x100 [ 20.699328] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.700173] [] lock_acquire+0x12e/0x410 [ 20.700920] [] ? remove_wait_queue+0x14/0x40 [ 20.706948] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.713235] [] ? remove_wait_queue+0x14/0x40 [ 20.719262] [] remove_wait_queue+0x14/0x40 [ 20.725123] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.732107] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.739352] [] ? ep_free+0x1b0/0x1b0 [ 20.744683] [] ep_free+0x96/0x1b0 [ 20.749754] [] ? ep_free+0x1b0/0x1b0 [ 20.755088] [] ep_eventpoll_release+0x44/0x60 [ 20.761202] [] __fput+0x28c/0x6e0 [ 20.766274] [] ____fput+0x15/0x20 [ 20.771347] [] task_work_run+0x115/0x190 [ 20.777030] [] do_exit+0x7e7/0x2a40 [ 20.782281] [] ? __pmd_alloc+0x410/0x410 [ 20.787965] [] ? release_task+0x1240/0x1240 [ 20.793920] [] ? __do_page_fault+0x5ec/0xd40 [ 20.799953] [] ? up_read+0x1a/0x40 [ 20.805117] [] ? __do_page_fault+0x3bd/0xd40 [ 20.811154] [] do_group_exit+0x108/0x320 [ 20.816838] [] ? do_group_exit+0x320/0x320 [ 20.822692] [] SyS_exit_group+0x1d/0x20 [ 20.828294] [] do_fast_syscall_32+0x2f7/0x890 [ 20.834408] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.841051] [] entry_SYSENTER_compat+0x74/0x83 [ 20.847262] [ 20.848859] Allocated by task 3324: [ 20.852461] save_stack_trace+0x16/0x20 [ 20.856407] save_stack+0x43/0xd0 [ 20.859828] kasan_kmalloc+0xad/0xe0 [ 20.863510] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.868060] binder_get_thread+0x15d/0x750 [ 20.872273] binder_poll+0x4a/0x210 [ 20.875890] SyS_epoll_ctl+0x11d7/0x2190 [ 20.879934] do_fast_syscall_32+0x2f7/0x890 [ 20.884227] entry_SYSENTER_compat+0x74/0x83 [ 20.888632] [ 20.890227] Freed by task 3324: [ 20.893481] save_stack_trace+0x16/0x20 [ 20.897424] save_stack+0x43/0xd0 [ 20.900843] kasan_slab_free+0x72/0xc0 [ 20.904696] kfree+0x103/0x300 [ 20.907860] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.912678] binder_thread_release+0x27d/0x540 [ 20.917228] binder_ioctl+0x9c0/0x11b0 [ 20.921079] compat_SyS_ioctl+0x15f/0x2050 [ 20.925280] do_fast_syscall_32+0x2f7/0x890 [ 20.929572] entry_SYSENTER_compat+0x74/0x83 [ 20.933954] [ 20.935552] The buggy address belongs to the object at ffff8801c962af00 [ 20.935552] which belongs to the cache kmalloc-512 of size 512 [ 20.948176] The buggy address is located 184 bytes inside of [ 20.948176] 512-byte region [ffff8801c962af00, ffff8801c962b100) [ 20.960024] The buggy address belongs to the page: [ 20.964924] page:ffffea0007258a80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.975116] flags: 0x8000000000004080(slab|head) [ 20.979842] page dumped because: kasan: bad access detected [ 20.985516] [ 20.987109] Memory state around the buggy address: [ 20.992008] ffff8801c962ae80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.999340] ffff8801c962af00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.006675] >ffff8801c962af80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.014002] ^ [ 21.019167] ffff8801c962b000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.026494] ffff8801c962b080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.033819] ================================================================== [ 21.041150] Disabling lock debugging due to kernel taint [ 21.046568] Kernel panic - not syncing: panic_on_warn set ... [ 21.046568] [ 21.053905] CPU: 0 PID: 3324 Comm: syzkaller160238 Tainted: G B 4.9.78-gf518fe4 #31 [ 21.062795] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.072123] ffff8801c90d77c8 ffffffff81d943a9 ffffffff841971bf ffff8801c90d78a0 [ 21.080095] 0000000000000000 ffff8801c962afb8 ffff8801c962afb8 ffff8801c90d7890 [ 21.088069] ffffffff8142f451 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f295 [ 21.096050] Call Trace: [ 21.098612] [] dump_stack+0xc1/0x128 [ 21.103949] [] panic+0x1bc/0x3a8 [ 21.108936] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 21.117134] [] ? add_taint+0x40/0x50 [ 21.122470] [] kasan_end_report+0x50/0x50 [ 21.128240] [] kasan_report+0x167/0x360 [ 21.133833] [] ? __lock_acquire+0x2eff/0x3640 [ 21.139949] [] __asan_report_load8_noabort+0x14/0x20 [ 21.146678] [] __lock_acquire+0x2eff/0x3640 [ 21.152617] [] ? __lock_acquire+0x629/0x3640 [ 21.158654] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.165639] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.172626] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.179610] [] ? mark_held_locks+0xaf/0x100 [ 21.185554] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.191756] [] lock_acquire+0x12e/0x410 [ 21.197350] [] ? remove_wait_queue+0x14/0x40 [ 21.203377] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.209664] [] ? remove_wait_queue+0x14/0x40 [ 21.215691] [] remove_wait_queue+0x14/0x40 [ 21.221554] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.228537] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.235780] [] ? ep_free+0x1b0/0x1b0 [ 21.241111] [] ep_free+0x96/0x1b0 [ 21.246181] [] ? ep_free+0x1b0/0x1b0 [ 21.251526] [] ep_eventpoll_release+0x44/0x60 [ 21.257640] [] __fput+0x28c/0x6e0 [ 21.262712] [] ____fput+0x15/0x20 [ 21.267786] [] task_work_run+0x115/0x190 [ 21.273468] [] do_exit+0x7e7/0x2a40 [ 21.278713] [] ? __pmd_alloc+0x410/0x410 [ 21.284402] [] ? release_task+0x1240/0x1240 [ 21.290343] [] ? __do_page_fault+0x5ec/0xd40 [ 21.296371] [] ? up_read+0x1a/0x40 [ 21.301530] [] ? __do_page_fault+0x3bd/0xd40 [ 21.307557] [] do_group_exit+0x108/0x320 [ 21.313236] [] ? do_group_exit+0x320/0x320 [ 21.319088] [] SyS_exit_group+0x1d/0x20 [ 21.324679] [] do_fast_syscall_32+0x2f7/0x890 [ 21.330792] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 21.337437] [] entry_SYSENTER_compat+0x74/0x83 [ 21.344090] Dumping ftrace buffer: [ 21.347602] (ftrace buffer empty) [ 21.351299] Kernel Offset: disabled [ 21.354896] Rebooting in 86400 seconds..