[....] Starting enhanced syslogd: rsyslogd[ 12.333523] audit: type=1400 audit(1516384606.413:4): avc: denied { syslog } for pid=3169 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.48' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 41.180461] ================================================================== [ 41.187848] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 41.194481] Read of size 8 at addr ffff8801c844b4b8 by task syzkaller895934/3341 [ 41.201980] [ 41.203590] CPU: 0 PID: 3341 Comm: syzkaller895934 Not tainted 4.9.77-g9c3804b #26 [ 41.211261] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.220584] ffff8801c7f37870 ffffffff81d941c9 ffffea0007211280 ffff8801c844b4b8 [ 41.228548] 0000000000000000 ffff8801c844b4b8 ffff8801c844b4b8 ffff8801c7f378a8 [ 41.236510] ffffffff8153db93 ffff8801c844b4b8 0000000000000008 0000000000000000 [ 41.244471] Call Trace: [ 41.247029] [] dump_stack+0xc1/0x128 [ 41.252362] [] print_address_description+0x73/0x280 [ 41.258994] [] kasan_report+0x275/0x360 [ 41.264585] [] ? __lock_acquire+0x2eff/0x3640 [ 41.270694] [] __asan_report_load8_noabort+0x14/0x20 [ 41.277413] [] __lock_acquire+0x2eff/0x3640 [ 41.283355] [] ? __lock_acquire+0x629/0x3640 [ 41.289380] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 41.296359] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 41.303339] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 41.310317] [] ? mark_held_locks+0xaf/0x100 [ 41.316256] [] ? mutex_lock_nested+0x5e3/0x870 [ 41.322452] [] lock_acquire+0x12e/0x410 [ 41.328045] [] ? remove_wait_queue+0x14/0x40 [ 41.334069] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 41.340351] [] ? remove_wait_queue+0x14/0x40 [ 41.346377] [] remove_wait_queue+0x14/0x40 [ 41.352229] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 41.359215] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 41.366463] [] ? ep_free+0x1b0/0x1b0 [ 41.371793] [] ep_free+0x96/0x1b0 [ 41.376861] [] ? ep_free+0x1b0/0x1b0 [ 41.382195] [] ep_eventpoll_release+0x44/0x60 [ 41.388307] [] __fput+0x28c/0x6e0 [ 41.393378] [] ____fput+0x15/0x20 [ 41.398450] [] task_work_run+0x115/0x190 [ 41.404131] [] do_exit+0x7e7/0x2a40 [ 41.409373] [] ? __pmd_alloc+0x410/0x410 [ 41.415053] [] ? release_task+0x1240/0x1240 [ 41.420993] [] ? __do_page_fault+0x5ec/0xd40 [ 41.427018] [] ? up_read+0x1a/0x40 [ 41.432177] [] ? __do_page_fault+0x3bd/0xd40 [ 41.438201] [] do_group_exit+0x108/0x320 [ 41.443880] [] ? do_group_exit+0x320/0x320 [ 41.449731] [] SyS_exit_group+0x1d/0x20 [ 41.455322] [] do_fast_syscall_32+0x2f7/0x890 [ 41.461432] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.468066] [] entry_SYSENTER_compat+0x74/0x83 [ 41.474264] [ 41.475859] Allocated by task 3341: [ 41.479456] save_stack_trace+0x16/0x20 [ 41.483398] save_stack+0x43/0xd0 [ 41.486822] kasan_kmalloc+0xad/0xe0 [ 41.490504] kmem_cache_alloc_trace+0xfb/0x2a0 [ 41.495053] binder_get_thread+0x15d/0x750 [ 41.499252] binder_poll+0x4a/0x210 [ 41.502847] SyS_epoll_ctl+0x11d7/0x2190 [ 41.506873] do_fast_syscall_32+0x2f7/0x890 [ 41.511161] entry_SYSENTER_compat+0x74/0x83 [ 41.515532] [ 41.517131] Freed by task 3341: [ 41.520376] save_stack_trace+0x16/0x20 [ 41.524320] save_stack+0x43/0xd0 [ 41.527740] kasan_slab_free+0x72/0xc0 [ 41.531593] kfree+0x103/0x300 [ 41.534752] binder_thread_dec_tmpref+0x1cc/0x240 [ 41.539558] binder_thread_release+0x27d/0x540 [ 41.544108] binder_ioctl+0x9c0/0x11b0 [ 41.547968] compat_SyS_ioctl+0x15f/0x2050 [ 41.552171] do_fast_syscall_32+0x2f7/0x890 [ 41.556460] entry_SYSENTER_compat+0x74/0x83 [ 41.560831] [ 41.562427] The buggy address belongs to the object at ffff8801c844b400 [ 41.562427] which belongs to the cache kmalloc-512 of size 512 [ 41.575051] The buggy address is located 184 bytes inside of [ 41.575051] 512-byte region [ffff8801c844b400, ffff8801c844b600) [ 41.586892] The buggy address belongs to the page: [ 41.591787] page:ffffea0007211280 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 41.601950] flags: 0x8000000000004080(slab|head) [ 41.606670] page dumped because: kasan: bad access detected [ 41.612344] [ 41.613939] Memory state around the buggy address: [ 41.618834] ffff8801c844b380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 41.626164] ffff8801c844b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.633488] >ffff8801c844b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.640812] ^ [ 41.645967] ffff8801c844b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.653293] ffff8801c844b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.660618] ================================================================== [ 41.667942] Disabling lock debugging due to kernel taint [ 41.673358] Kernel panic - not syncing: panic_on_warn set ... [ 41.673358] [ 41.680688] CPU: 0 PID: 3341 Comm: syzkaller895934 Tainted: G B 4.9.77-g9c3804b #26 [ 41.689576] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.698906] ffff8801c7f377c8 ffffffff81d941c9 ffffffff841970ff ffff8801c7f378a0 [ 41.706881] 0000000000000000 ffff8801c844b4b8 ffff8801c844b4b8 ffff8801c7f37890 [ 41.714843] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 41.722804] Call Trace: [ 41.725359] [] dump_stack+0xc1/0x128 [ 41.730690] [] panic+0x1bc/0x3a8 [ 41.735674] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 41.743872] [] ? add_taint+0x40/0x50 [ 41.749214] [] kasan_end_report+0x50/0x50 [ 41.754979] [] kasan_report+0x167/0x360 [ 41.760572] [] ? __lock_acquire+0x2eff/0x3640 [ 41.766691] [] __asan_report_load8_noabort+0x14/0x20 [ 41.773413] [] __lock_acquire+0x2eff/0x3640 [ 41.779362] [] ? __lock_acquire+0x629/0x3640 [ 41.785388] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 41.792368] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 41.799347] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 41.806330] [] ? mark_held_locks+0xaf/0x100 [ 41.812270] [] ? mutex_lock_nested+0x5e3/0x870 [ 41.818478] [] lock_acquire+0x12e/0x410 [ 41.824069] [] ? remove_wait_queue+0x14/0x40 [ 41.830093] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 41.836377] [] ? remove_wait_queue+0x14/0x40 [ 41.842401] [] remove_wait_queue+0x14/0x40 [ 41.848262] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 41.855243] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 41.862486] [] ? ep_free+0x1b0/0x1b0 [ 41.867818] [] ep_free+0x96/0x1b0 [ 41.872888] [] ? ep_free+0x1b0/0x1b0 [ 41.878218] [] ep_eventpoll_release+0x44/0x60 [ 41.884330] [] __fput+0x28c/0x6e0 [ 41.889402] [] ____fput+0x15/0x20 [ 41.894474] [] task_work_run+0x115/0x190 [ 41.900154] [] do_exit+0x7e7/0x2a40 [ 41.905397] [] ? __pmd_alloc+0x410/0x410 [ 41.911082] [] ? release_task+0x1240/0x1240 [ 41.917021] [] ? __do_page_fault+0x5ec/0xd40 [ 41.923047] [] ? up_read+0x1a/0x40 [ 41.928202] [] ? __do_page_fault+0x3bd/0xd40 [ 41.934230] [] do_group_exit+0x108/0x320 [ 41.939906] [] ? do_group_exit+0x320/0x320 [ 41.945760] [] SyS_exit_group+0x1d/0x20 [ 41.951355] [] do_fast_syscall_32+0x2f7/0x890 [ 41.957467] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.964101] [] entry_SYSENTER_compat+0x74/0x83 [ 41.970667] Dumping ftrace buffer: [ 41.974173] (ftrace buffer empty) [ 41.977852] Kernel Offset: disabled [ 41.981449] Rebooting in 86400 seconds..