[....] Starting enhanced syslogd: rsyslogd[ 11.550868] audit: type=1400 audit(1514403532.882:4): avc: denied { syslog } for pid=3203 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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.15.246' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.349580] ================================================================== [ 19.356973] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.363605] Read of size 8 at addr ffff8801caa674b8 by task syzkaller296557/3351 [ 19.371104] [ 19.372701] CPU: 0 PID: 3351 Comm: syzkaller296557 Not tainted 4.9.72-gcb7518e #114 [ 19.380456] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.389777] ffff8801c82878e0 ffffffff81d922b9 ffffea00072a9980 ffff8801caa674b8 [ 19.397733] 0000000000000000 ffff8801caa674b8 ffff8801caa674b8 ffff8801c8287918 [ 19.405692] ffffffff8153bab3 ffff8801caa674b8 0000000000000008 0000000000000000 [ 19.413654] Call Trace: [ 19.416210] [] dump_stack+0xc1/0x128 [ 19.421540] [] print_address_description+0x73/0x280 [ 19.428170] [] kasan_report+0x275/0x360 [ 19.433759] [] ? __lock_acquire+0x2eff/0x3640 [ 19.439866] [] __asan_report_load8_noabort+0x14/0x20 [ 19.446581] [] __lock_acquire+0x2eff/0x3640 [ 19.452518] [] ? __lock_acquire+0x629/0x3640 [ 19.458546] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.465524] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.472504] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.479487] [] ? mark_held_locks+0xaf/0x100 [ 19.485425] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.491621] [] lock_acquire+0x12e/0x410 [ 19.497211] [] ? remove_wait_queue+0x14/0x40 [ 19.503232] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.509521] [] ? remove_wait_queue+0x14/0x40 [ 19.515543] [] remove_wait_queue+0x14/0x40 [ 19.521395] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.528381] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.535618] [] ? ep_free+0x1b0/0x1b0 [ 19.540949] [] ep_free+0x96/0x1b0 [ 19.546015] [] ? ep_free+0x1b0/0x1b0 [ 19.551343] [] ep_eventpoll_release+0x44/0x60 [ 19.557452] [] __fput+0x28c/0x6e0 [ 19.562521] [] ____fput+0x15/0x20 [ 19.568196] [] task_work_run+0x115/0x190 [ 19.573878] [] do_exit+0x7e7/0x2a40 [ 19.579127] [] ? selinux_file_ioctl+0x355/0x530 [ 19.585430] [] ? release_task+0x1240/0x1240 [ 19.591371] [] ? SyS_epoll_create+0x190/0x190 [ 19.597481] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 19.604110] [] do_group_exit+0x108/0x320 [ 19.609787] [] SyS_exit_group+0x1d/0x20 [ 19.615377] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.621917] [ 19.623529] Allocated by task 3351: [ 19.627130] save_stack_trace+0x16/0x20 [ 19.631069] save_stack+0x43/0xd0 [ 19.634485] kasan_kmalloc+0xad/0xe0 [ 19.638160] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.642711] binder_get_thread+0x15d/0x750 [ 19.646911] binder_poll+0x4a/0x210 [ 19.650502] SyS_epoll_ctl+0x11d7/0x2190 [ 19.654533] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.659247] [ 19.660840] Freed by task 3351: [ 19.664083] save_stack_trace+0x16/0x20 [ 19.668020] save_stack+0x43/0xd0 [ 19.671442] kasan_slab_free+0x72/0xc0 [ 19.675300] kfree+0x103/0x300 [ 19.678471] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.683276] binder_thread_release+0x27d/0x540 [ 19.687825] binder_ioctl+0x9c0/0x11b0 [ 19.691675] do_vfs_ioctl+0x1aa/0x1140 [ 19.695526] SyS_ioctl+0x8f/0xc0 [ 19.698857] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.703573] [ 19.705164] The buggy address belongs to the object at ffff8801caa67400 [ 19.705164] which belongs to the cache kmalloc-512 of size 512 [ 19.717782] The buggy address is located 184 bytes inside of [ 19.717782] 512-byte region [ffff8801caa67400, ffff8801caa67600) [ 19.729623] The buggy address belongs to the page: [ 19.734516] page:ffffea00072a9980 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.744678] flags: 0x8000000000004080(slab|head) [ 19.749395] page dumped because: kasan: bad access detected [ 19.755066] [ 19.756657] Memory state around the buggy address: [ 19.761549] ffff8801caa67380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.768871] ffff8801caa67400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.776201] >ffff8801caa67480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.783528] ^ [ 19.788697] ffff8801caa67500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.796020] ffff8801caa67580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.803340] ================================================================== [ 19.810664] Disabling lock debugging due to kernel taint [ 19.816077] Kernel panic - not syncing: panic_on_warn set ... [ 19.816077] [ 19.823411] CPU: 0 PID: 3351 Comm: syzkaller296557 Tainted: G B 4.9.72-gcb7518e #114 [ 19.832385] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.841712] ffff8801c8287838 ffffffff81d922b9 ffffffff841955bf ffff8801c8287910 [ 19.849664] 0000000000000000 ffff8801caa674b8 ffff8801caa674b8 ffff8801c8287900 [ 19.857613] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 19.865553] Call Trace: [ 19.868111] [] dump_stack+0xc1/0x128 [ 19.873447] [] panic+0x1bc/0x3a8 [ 19.878434] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.886627] [] ? add_taint+0x40/0x50 [ 19.891957] [] kasan_end_report+0x50/0x50 [ 19.897719] [] kasan_report+0x167/0x360 [ 19.903396] [] ? __lock_acquire+0x2eff/0x3640 [ 19.909511] [] __asan_report_load8_noabort+0x14/0x20 [ 19.916228] [] __lock_acquire+0x2eff/0x3640 [ 19.922169] [] ? __lock_acquire+0x629/0x3640 [ 19.928215] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.935208] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.942186] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.949171] [] ? mark_held_locks+0xaf/0x100 [ 19.955110] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.961313] [] lock_acquire+0x12e/0x410 [ 19.966910] [] ? remove_wait_queue+0x14/0x40 [ 19.972932] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.979220] [] ? remove_wait_queue+0x14/0x40 [ 19.985243] [] remove_wait_queue+0x14/0x40 [ 19.991092] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.998072] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.005313] [] ? ep_free+0x1b0/0x1b0 [ 20.010644] [] ep_free+0x96/0x1b0 [ 20.015718] [] ? ep_free+0x1b0/0x1b0 [ 20.021043] [] ep_eventpoll_release+0x44/0x60 [ 20.027170] [] __fput+0x28c/0x6e0 [ 20.032252] [] ____fput+0x15/0x20 [ 20.037342] [] task_work_run+0x115/0x190 [ 20.043022] [] do_exit+0x7e7/0x2a40 [ 20.048265] [] ? selinux_file_ioctl+0x355/0x530 [ 20.054547] [] ? release_task+0x1240/0x1240 [ 20.060488] [] ? SyS_epoll_create+0x190/0x190 [ 20.066607] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.073238] [] do_group_exit+0x108/0x320 [ 20.078915] [] SyS_exit_group+0x1d/0x20 [ 20.084504] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.091528] Dumping ftrace buffer: [ 20.095039] (ftrace buffer empty) [ 20.098716] Kernel Offset: disabled [ 20.102313] Rebooting in 86400 seconds..