[....] Starting enhanced syslogd: rsyslogd[ 12.491523] audit: type=1400 audit(1516288931.639:4): avc: denied { syslog } for pid=3178 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.19' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.643581] ================================================================== [ 19.650965] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.657604] Read of size 8 at addr ffff8801cc8834b8 by task syzkaller314003/3327 [ 19.665103] [ 19.666701] CPU: 1 PID: 3327 Comm: syzkaller314003 Not tainted 4.9.77-g033d019 #24 [ 19.674374] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.683696] ffff8801c895f870 ffffffff81d941c9 ffffea0007322080 ffff8801cc8834b8 [ 19.691662] 0000000000000000 ffff8801cc8834b8 ffff8801cc8834b8 ffff8801c895f8a8 [ 19.699628] ffffffff8153db93 ffff8801cc8834b8 0000000000000008 0000000000000000 [ 19.707595] Call Trace: [ 19.710151] [] dump_stack+0xc1/0x128 [ 19.715485] [] print_address_description+0x73/0x280 [ 19.722117] [] kasan_report+0x275/0x360 [ 19.727712] [] ? __lock_acquire+0x2eff/0x3640 [ 19.733824] [] __asan_report_load8_noabort+0x14/0x20 [ 19.740545] [] __lock_acquire+0x2eff/0x3640 [ 19.746485] [] ? __lock_acquire+0x629/0x3640 [ 19.752511] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.759493] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.766475] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.773454] [] ? mark_held_locks+0xaf/0x100 [ 19.779394] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.785592] [] lock_acquire+0x12e/0x410 [ 19.791181] [] ? remove_wait_queue+0x14/0x40 [ 19.797211] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.803495] [] ? remove_wait_queue+0x14/0x40 [ 19.809521] [] remove_wait_queue+0x14/0x40 [ 19.815373] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.822361] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.829607] [] ? ep_free+0x1b0/0x1b0 [ 19.834938] [] ep_free+0x96/0x1b0 [ 19.840007] [] ? ep_free+0x1b0/0x1b0 [ 19.845337] [] ep_eventpoll_release+0x44/0x60 [ 19.851453] [] __fput+0x28c/0x6e0 [ 19.856525] [] ____fput+0x15/0x20 [ 19.861600] [] task_work_run+0x115/0x190 [ 19.867282] [] do_exit+0x7e7/0x2a40 [ 19.872532] [] ? __pmd_alloc+0x410/0x410 [ 19.878210] [] ? release_task+0x1240/0x1240 [ 19.884148] [] ? __do_page_fault+0x5ec/0xd40 [ 19.890181] [] ? up_read+0x1a/0x40 [ 19.895337] [] ? __do_page_fault+0x3bd/0xd40 [ 19.901363] [] do_group_exit+0x108/0x320 [ 19.907043] [] ? do_group_exit+0x320/0x320 [ 19.912894] [] SyS_exit_group+0x1d/0x20 [ 19.918487] [] do_fast_syscall_32+0x2f7/0x890 [ 19.924600] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 19.931233] [] entry_SYSENTER_compat+0x74/0x83 [ 19.937432] [ 19.939030] Allocated by task 3327: [ 19.942629] save_stack_trace+0x16/0x20 [ 19.946579] save_stack+0x43/0xd0 [ 19.950000] kasan_kmalloc+0xad/0xe0 [ 19.953684] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.958233] binder_get_thread+0x15d/0x750 [ 19.962436] binder_poll+0x4a/0x210 [ 19.966031] SyS_epoll_ctl+0x11d7/0x2190 [ 19.970058] do_fast_syscall_32+0x2f7/0x890 [ 19.974356] entry_SYSENTER_compat+0x74/0x83 [ 19.978728] [ 19.980321] Freed by task 3327: [ 19.983572] save_stack_trace+0x16/0x20 [ 19.987513] save_stack+0x43/0xd0 [ 19.990934] kasan_slab_free+0x72/0xc0 [ 19.994785] kfree+0x103/0x300 [ 19.997945] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.002753] binder_thread_release+0x27d/0x540 [ 20.007304] binder_ioctl+0x9c0/0x11b0 [ 20.011159] compat_SyS_ioctl+0x15f/0x2050 [ 20.015361] do_fast_syscall_32+0x2f7/0x890 [ 20.019648] entry_SYSENTER_compat+0x74/0x83 [ 20.024018] [ 20.025615] The buggy address belongs to the object at ffff8801cc883400 [ 20.025615] which belongs to the cache kmalloc-512 of size 512 [ 20.038236] The buggy address is located 184 bytes inside of [ 20.038236] 512-byte region [ffff8801cc883400, ffff8801cc883600) [ 20.050076] The buggy address belongs to the page: [ 20.054976] page:ffffea0007322080 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.065138] flags: 0x8000000000004080(slab|head) [ 20.069856] page dumped because: kasan: bad access detected [ 20.075529] [ 20.077121] Memory state around the buggy address: [ 20.082016] ffff8801cc883380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.089340] ffff8801cc883400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.096664] >ffff8801cc883480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.103989] ^ [ 20.109150] ffff8801cc883500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.116477] ffff8801cc883580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.123809] ================================================================== [ 20.131141] Disabling lock debugging due to kernel taint [ 20.136558] Kernel panic - not syncing: panic_on_warn set ... [ 20.136558] [ 20.143891] CPU: 1 PID: 3327 Comm: syzkaller314003 Tainted: G B 4.9.77-g033d019 #24 [ 20.152787] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.162112] ffff8801c895f7c8 ffffffff81d941c9 ffffffff841970ff ffff8801c895f8a0 [ 20.170096] 0000000000000000 ffff8801cc8834b8 ffff8801cc8834b8 ffff8801c895f890 [ 20.178058] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 20.186030] Call Trace: [ 20.188589] [] dump_stack+0xc1/0x128 [ 20.193920] [] panic+0x1bc/0x3a8 [ 20.198902] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.207101] [] ? add_taint+0x40/0x50 [ 20.212434] [] kasan_end_report+0x50/0x50 [ 20.218200] [] kasan_report+0x167/0x360 [ 20.223799] [] ? __lock_acquire+0x2eff/0x3640 [ 20.229914] [] __asan_report_load8_noabort+0x14/0x20 [ 20.236634] [] __lock_acquire+0x2eff/0x3640 [ 20.242574] [] ? __lock_acquire+0x629/0x3640 [ 20.248609] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.255597] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.262577] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.269556] [] ? mark_held_locks+0xaf/0x100 [ 20.275494] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.281691] [] lock_acquire+0x12e/0x410 [ 20.287286] [] ? remove_wait_queue+0x14/0x40 [ 20.293309] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.299595] [] ? remove_wait_queue+0x14/0x40 [ 20.305620] [] remove_wait_queue+0x14/0x40 [ 20.311472] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.318453] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.325692] [] ? ep_free+0x1b0/0x1b0 [ 20.331032] [] ep_free+0x96/0x1b0 [ 20.336101] [] ? ep_free+0x1b0/0x1b0 [ 20.341432] [] ep_eventpoll_release+0x44/0x60 [ 20.347545] [] __fput+0x28c/0x6e0 [ 20.352615] [] ____fput+0x15/0x20 [ 20.357685] [] task_work_run+0x115/0x190 [ 20.363363] [] do_exit+0x7e7/0x2a40 [ 20.368606] [] ? __pmd_alloc+0x410/0x410 [ 20.374283] [] ? release_task+0x1240/0x1240 [ 20.380219] [] ? __do_page_fault+0x5ec/0xd40 [ 20.386245] [] ? up_read+0x1a/0x40 [ 20.391404] [] ? __do_page_fault+0x3bd/0xd40 [ 20.397430] [] do_group_exit+0x108/0x320 [ 20.403109] [] ? do_group_exit+0x320/0x320 [ 20.408959] [] SyS_exit_group+0x1d/0x20 [ 20.414550] [] do_fast_syscall_32+0x2f7/0x890 [ 20.420659] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.427292] [] entry_SYSENTER_compat+0x74/0x83 [ 20.434006] Dumping ftrace buffer: [ 20.437521] (ftrace buffer empty) [ 20.441205] Kernel Offset: disabled [ 20.444804] Rebooting in 86400 seconds..