[....] Starting enhanced syslogd: rsyslogd[ 13.590879] audit: type=1400 audit(1517642000.390:4): avc: denied { syslog } for pid=3894 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.0.56' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.091428] ================================================================== [ 26.098825] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.105463] Read of size 8 at addr ffff8801c6557c38 by task syzkaller558879/4050 [ 26.112965] [ 26.114565] CPU: 1 PID: 4050 Comm: syzkaller558879 Not tainted 4.9.79-g47af77b #35 [ 26.122240] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.131575] ffff8801d3e5f850 ffffffff81d94b09 ffffea0007195580 ffff8801c6557c38 [ 26.139537] 0000000000000000 ffff8801c6557c38 ffff8801c6557c38 ffff8801d3e5f888 [ 26.147502] ffffffff8153e083 ffff8801c6557c38 0000000000000008 0000000000000000 [ 26.155466] Call Trace: [ 26.158022] [] dump_stack+0xc1/0x128 [ 26.163357] [] print_address_description+0x73/0x280 [ 26.170002] [] kasan_report+0x275/0x360 [ 26.175594] [] ? __lock_acquire+0x2eff/0x3640 [ 26.181706] [] __asan_report_load8_noabort+0x14/0x20 [ 26.188425] [] __lock_acquire+0x2eff/0x3640 [ 26.194362] [] ? __lock_acquire+0x629/0x3640 [ 26.200399] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.207382] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.214364] [] ? __lock_is_held+0xa1/0xf0 [ 26.220133] [] lock_acquire+0x12e/0x410 [ 26.225726] [] ? remove_wait_queue+0x14/0x40 [ 26.231760] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.238047] [] ? remove_wait_queue+0x14/0x40 [ 26.244072] [] remove_wait_queue+0x14/0x40 [ 26.249924] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.256902] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.264142] [] ep_remove+0x41/0x290 [ 26.269384] [] eventpoll_release_file+0xc5/0x140 [ 26.275755] [] __fput+0x5a8/0x6e0 [ 26.280823] [] ____fput+0x15/0x20 [ 26.285900] [] task_work_run+0x115/0x190 [ 26.291583] [] do_exit+0x7e7/0x2a40 [ 26.296828] [] ? __pmd_alloc+0x410/0x410 [ 26.302506] [] ? release_task+0x1240/0x1240 [ 26.308450] [] ? __do_page_fault+0x5ec/0xd40 [ 26.314475] [] ? up_read+0x1a/0x40 [ 26.319635] [] ? __do_page_fault+0x3bd/0xd40 [ 26.325660] [] do_group_exit+0x108/0x320 [ 26.331340] [] ? do_group_exit+0x320/0x320 [ 26.337197] [] SyS_exit_group+0x1d/0x20 [ 26.342791] [] do_fast_syscall_32+0x2f7/0x890 [ 26.348902] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.355535] [] entry_SYSENTER_compat+0x74/0x83 [ 26.361734] [ 26.363334] Allocated by task 4050: [ 26.366928] save_stack_trace+0x16/0x20 [ 26.370869] save_stack+0x43/0xd0 [ 26.374290] kasan_kmalloc+0xad/0xe0 [ 26.377968] kmem_cache_alloc_trace+0xfb/0x2a0 [ 26.382517] binder_get_thread+0x15d/0x750 [ 26.386720] binder_poll+0x4a/0x210 [ 26.390314] SyS_epoll_ctl+0x11d7/0x2190 [ 26.394341] do_fast_syscall_32+0x2f7/0x890 [ 26.398629] entry_SYSENTER_compat+0x74/0x83 [ 26.403003] [ 26.404600] Freed by task 4050: [ 26.407846] save_stack_trace+0x16/0x20 [ 26.411789] save_stack+0x43/0xd0 [ 26.415210] kasan_slab_free+0x72/0xc0 [ 26.419064] kfree+0x103/0x300 [ 26.422223] binder_thread_dec_tmpref+0x1cc/0x240 [ 26.427031] binder_thread_release+0x27d/0x540 [ 26.431578] binder_ioctl+0x9c0/0x11b0 [ 26.435442] compat_SyS_ioctl+0x15f/0x2050 [ 26.439645] do_fast_syscall_32+0x2f7/0x890 [ 26.443935] entry_SYSENTER_compat+0x74/0x83 [ 26.448308] [ 26.449904] The buggy address belongs to the object at ffff8801c6557b80 [ 26.449904] which belongs to the cache kmalloc-512 of size 512 [ 26.462528] The buggy address is located 184 bytes inside of [ 26.462528] 512-byte region [ffff8801c6557b80, ffff8801c6557d80) [ 26.474372] The buggy address belongs to the page: [ 26.479274] page:ffffea0007195580 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.489443] flags: 0x8000000000004080(slab|head) [ 26.494166] page dumped because: kasan: bad access detected [ 26.499840] [ 26.501433] Memory state around the buggy address: [ 26.506327] ffff8801c6557b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.513653] ffff8801c6557b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.520987] >ffff8801c6557c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.528313] ^ [ 26.533468] ffff8801c6557c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.540794] ffff8801c6557d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.548117] ================================================================== [ 26.555439] Disabling lock debugging due to kernel taint [ 26.560856] Kernel panic - not syncing: panic_on_warn set ... [ 26.560856] [ 26.568191] CPU: 1 PID: 4050 Comm: syzkaller558879 Tainted: G B 4.9.79-g47af77b #35 [ 26.577080] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.586405] ffff8801d3e5f7a8 ffffffff81d94b09 ffffffff8419709f ffff8801d3e5f880 [ 26.594378] 0000000000000000 ffff8801c6557c38 ffff8801c6557c38 ffff8801d3e5f870 [ 26.602349] ffffffff8142f531 0000000041b58ab3 ffffffff8418ab10 ffffffff8142f375 [ 26.610309] Call Trace: [ 26.612869] [] dump_stack+0xc1/0x128 [ 26.618199] [] panic+0x1bc/0x3a8 [ 26.623191] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.631395] [] ? add_taint+0x40/0x50 [ 26.636726] [] kasan_end_report+0x50/0x50 [ 26.642490] [] kasan_report+0x167/0x360 [ 26.648081] [] ? __lock_acquire+0x2eff/0x3640 [ 26.654194] [] __asan_report_load8_noabort+0x14/0x20 [ 26.660917] [] __lock_acquire+0x2eff/0x3640 [ 26.666856] [] ? __lock_acquire+0x629/0x3640 [ 26.672880] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.679860] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.686838] [] ? __lock_is_held+0xa1/0xf0 [ 26.692601] [] lock_acquire+0x12e/0x410 [ 26.698197] [] ? remove_wait_queue+0x14/0x40 [ 26.704226] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.710513] [] ? remove_wait_queue+0x14/0x40 [ 26.716547] [] remove_wait_queue+0x14/0x40 [ 26.722401] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.729380] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.736620] [] ep_remove+0x41/0x290 [ 26.741865] [] eventpoll_release_file+0xc5/0x140 [ 26.748238] [] __fput+0x5a8/0x6e0 [ 26.753312] [] ____fput+0x15/0x20 [ 26.758393] [] task_work_run+0x115/0x190 [ 26.764073] [] do_exit+0x7e7/0x2a40 [ 26.769314] [] ? __pmd_alloc+0x410/0x410 [ 26.774991] [] ? release_task+0x1240/0x1240 [ 26.780929] [] ? __do_page_fault+0x5ec/0xd40 [ 26.786953] [] ? up_read+0x1a/0x40 [ 26.792107] [] ? __do_page_fault+0x3bd/0xd40 [ 26.798132] [] do_group_exit+0x108/0x320 [ 26.803808] [] ? do_group_exit+0x320/0x320 [ 26.809660] [] SyS_exit_group+0x1d/0x20 [ 26.815262] [] do_fast_syscall_32+0x2f7/0x890 [ 26.821373] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.828004] [] entry_SYSENTER_compat+0x74/0x83 [ 26.834590] Dumping ftrace buffer: [ 26.838095] (ftrace buffer empty) [ 26.841776] Kernel Offset: disabled [ 26.845370] Rebooting in 86400 seconds..