[....] Starting enhanced syslogd: rsyslogd[ 10.371658] audit: type=1400 audit(1514154661.035:4): avc: denied { syslog } for pid=3177 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 'ci-android-49-kasan-gce-6,10.128.15.220' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.596414] ================================================================== [ 18.597474] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 18.598398] Read of size 8 at addr ffff8801cccf14b8 by task syzkaller097511/3325 [ 18.599396] [ 18.599625] CPU: 1 PID: 3325 Comm: syzkaller097511 Not tainted 4.9.71-g2506378 #113 [ 18.600642] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.601872] ffff8801c8bb78e0 ffffffff81d922b9 ffffea0007333c00 ffff8801cccf14b8 [ 18.603026] 0000000000000000 ffff8801cccf14b8 ffff8801cccf14b8 ffff8801c8bb7918 [ 18.604150] ffffffff8153bab3 ffff8801cccf14b8 0000000000000008 0000000000000000 [ 18.605284] Call Trace: [ 18.605638] [] dump_stack+0xc1/0x128 [ 18.606350] [] print_address_description+0x73/0x280 [ 18.607227] [] kasan_report+0x275/0x360 [ 18.607967] [] ? __lock_acquire+0x2eff/0x3640 [ 18.608774] [] __asan_report_load8_noabort+0x14/0x20 [ 18.609673] [] __lock_acquire+0x2eff/0x3640 [ 18.610462] [] ? __lock_acquire+0x629/0x3640 [ 18.611260] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.612178] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.613096] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.614013] [] ? mark_held_locks+0xaf/0x100 [ 18.614799] [] ? mutex_lock_nested+0x5e3/0x870 [ 18.615640] [] lock_acquire+0x12e/0x410 [ 18.616381] [] ? remove_wait_queue+0x14/0x40 [ 18.621658] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 18.627936] [] ? remove_wait_queue+0x14/0x40 [ 18.633957] [] remove_wait_queue+0x14/0x40 [ 18.639812] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 18.646789] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 18.654026] [] ? ep_free+0x1b0/0x1b0 [ 18.659352] [] ep_free+0x96/0x1b0 [ 18.664417] [] ? ep_free+0x1b0/0x1b0 [ 18.669743] [] ep_eventpoll_release+0x44/0x60 [ 18.675855] [] __fput+0x28c/0x6e0 [ 18.680919] [] ____fput+0x15/0x20 [ 18.685986] [] task_work_run+0x115/0x190 [ 18.691668] [] do_exit+0x7e7/0x2a40 [ 18.696913] [] ? selinux_file_ioctl+0x355/0x530 [ 18.703197] [] ? release_task+0x1240/0x1240 [ 18.709132] [] ? SyS_epoll_create+0x190/0x190 [ 18.715241] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 18.721870] [] do_group_exit+0x108/0x320 [ 18.727542] [] SyS_exit_group+0x1d/0x20 [ 18.733130] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 18.739671] [ 18.741276] Allocated by task 3325: [ 18.744866] save_stack_trace+0x16/0x20 [ 18.748806] save_stack+0x43/0xd0 [ 18.752223] kasan_kmalloc+0xad/0xe0 [ 18.755899] kmem_cache_alloc_trace+0xfb/0x2a0 [ 18.760447] binder_get_thread+0x15d/0x750 [ 18.764644] binder_poll+0x4a/0x210 [ 18.768235] SyS_epoll_ctl+0x11d7/0x2190 [ 18.772260] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 18.776974] [ 18.778572] Freed by task 3325: [ 18.781814] save_stack_trace+0x16/0x20 [ 18.785750] save_stack+0x43/0xd0 [ 18.789165] kasan_slab_free+0x72/0xc0 [ 18.793013] kfree+0x103/0x300 [ 18.796175] binder_thread_dec_tmpref+0x1cc/0x240 [ 18.800979] binder_thread_release+0x27d/0x540 [ 18.805521] binder_ioctl+0x9c0/0x11b0 [ 18.809371] do_vfs_ioctl+0x1aa/0x1140 [ 18.813220] SyS_ioctl+0x8f/0xc0 [ 18.816548] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 18.821264] [ 18.822856] The buggy address belongs to the object at ffff8801cccf1400 [ 18.822856] which belongs to the cache kmalloc-512 of size 512 [ 18.835474] The buggy address is located 184 bytes inside of [ 18.835474] 512-byte region [ffff8801cccf1400, ffff8801cccf1600) [ 18.847309] The buggy address belongs to the page: [ 18.852201] page:ffffea0007333c00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 18.862354] flags: 0x8000000000004080(slab|head) [ 18.867068] page dumped because: kasan: bad access detected [ 18.872736] [ 18.874324] Memory state around the buggy address: [ 18.879213] ffff8801cccf1380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.886534] ffff8801cccf1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.893855] >ffff8801cccf1480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.901172] ^ [ 18.906324] ffff8801cccf1500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.913645] ffff8801cccf1580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.920971] ================================================================== [ 18.928552] Disabling lock debugging due to kernel taint [ 18.933962] Kernel panic - not syncing: panic_on_warn set ... [ 18.933962] [ 18.941288] CPU: 1 PID: 3325 Comm: syzkaller097511 Tainted: G B 4.9.71-g2506378 #113 [ 18.950257] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.959573] ffff8801c8bb7838 ffffffff81d922b9 ffffffff84194b3f ffff8801c8bb7910 [ 18.967518] 0000000000000000 ffff8801cccf14b8 ffff8801cccf14b8 ffff8801c8bb7900 [ 18.975460] ffffffff8142d741 0000000041b58ab3 ffffffff84188580 ffffffff8142d585 [ 18.983403] Call Trace: [ 18.985954] [] dump_stack+0xc1/0x128 [ 18.991282] [] panic+0x1bc/0x3a8 [ 18.996261] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.004458] [] ? add_taint+0x40/0x50 [ 19.009788] [] kasan_end_report+0x50/0x50 [ 19.015547] [] kasan_report+0x167/0x360 [ 19.021142] [] ? __lock_acquire+0x2eff/0x3640 [ 19.027250] [] __asan_report_load8_noabort+0x14/0x20 [ 19.033967] [] __lock_acquire+0x2eff/0x3640 [ 19.039900] [] ? __lock_acquire+0x629/0x3640 [ 19.045923] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.052898] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.059876] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.066851] [] ? mark_held_locks+0xaf/0x100 [ 19.072790] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.078985] [] lock_acquire+0x12e/0x410 [ 19.084572] [] ? remove_wait_queue+0x14/0x40 [ 19.090591] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.096871] [] ? remove_wait_queue+0x14/0x40 [ 19.102890] [] remove_wait_queue+0x14/0x40 [ 19.108738] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.115713] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.122951] [] ? ep_free+0x1b0/0x1b0 [ 19.128288] [] ep_free+0x96/0x1b0 [ 19.133358] [] ? ep_free+0x1b0/0x1b0 [ 19.138688] [] ep_eventpoll_release+0x44/0x60 [ 19.144797] [] __fput+0x28c/0x6e0 [ 19.149870] [] ____fput+0x15/0x20 [ 19.154936] [] task_work_run+0x115/0x190 [ 19.160612] [] do_exit+0x7e7/0x2a40 [ 19.165853] [] ? selinux_file_ioctl+0x355/0x530 [ 19.172137] [] ? release_task+0x1240/0x1240 [ 19.178076] [] ? SyS_epoll_create+0x190/0x190 [ 19.184187] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 19.190816] [] do_group_exit+0x108/0x320 [ 19.196491] [] SyS_exit_group+0x1d/0x20 [ 19.202080] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.209019] Dumping ftrace buffer: [ 19.212531] (ftrace buffer empty) [ 19.216207] Kernel Offset: disabled [ 19.219804] Rebooting in 86400 seconds..