[....] Starting enhanced syslogd: rsyslogd[ 13.088811] audit: type=1400 audit(1514247419.607:4): avc: denied { syslog } for pid=3180 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-5,10.128.15.196' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.357153] ================================================================== [ 24.364528] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 24.371159] Read of size 8 at addr ffff8801cb0fdc38 by task syzkaller299106/3339 [ 24.378661] [ 24.380258] CPU: 1 PID: 3339 Comm: syzkaller299106 Not tainted 4.9.71-g2506378 #113 [ 24.388051] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.397373] ffff8801c83b78e0 ffffffff81d922b9 ffffea00072c3f00 ffff8801cb0fdc38 [ 24.405317] 0000000000000000 ffff8801cb0fdc38 ffff8801cb0fdc38 ffff8801c83b7918 [ 24.413262] ffffffff8153bab3 ffff8801cb0fdc38 0000000000000008 0000000000000000 [ 24.421209] Call Trace: [ 24.424116] [] dump_stack+0xc1/0x128 [ 24.429445] [] print_address_description+0x73/0x280 [ 24.436076] [] kasan_report+0x275/0x360 [ 24.441927] [] ? __lock_acquire+0x2eff/0x3640 [ 24.448305] [] __asan_report_load8_noabort+0x14/0x20 [ 24.455021] [] __lock_acquire+0x2eff/0x3640 [ 24.460957] [] ? __lock_acquire+0x629/0x3640 [ 24.466980] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.473956] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.480945] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.487923] [] ? mark_held_locks+0xaf/0x100 [ 24.493860] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.500056] [] lock_acquire+0x12e/0x410 [ 24.505643] [] ? remove_wait_queue+0x14/0x40 [ 24.511665] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.517948] [] ? remove_wait_queue+0x14/0x40 [ 24.523968] [] remove_wait_queue+0x14/0x40 [ 24.529817] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.536794] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.544030] [] ? ep_free+0x1b0/0x1b0 [ 24.549357] [] ep_free+0x96/0x1b0 [ 24.555378] [] ? ep_free+0x1b0/0x1b0 [ 24.561229] [] ep_eventpoll_release+0x44/0x60 [ 24.567336] [] __fput+0x28c/0x6e0 [ 24.572403] [] ____fput+0x15/0x20 [ 24.577469] [] task_work_run+0x115/0x190 [ 24.583152] [] do_exit+0x7e7/0x2a40 [ 24.588396] [] ? selinux_file_ioctl+0x355/0x530 [ 24.594681] [] ? release_task+0x1240/0x1240 [ 24.600618] [] ? SyS_epoll_create+0x190/0x190 [ 24.606727] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 24.613358] [] do_group_exit+0x108/0x320 [ 24.619033] [] SyS_exit_group+0x1d/0x20 [ 24.625140] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 24.632374] [ 24.633967] Allocated by task 3339: [ 24.637557] save_stack_trace+0x16/0x20 [ 24.641503] save_stack+0x43/0xd0 [ 24.644918] kasan_kmalloc+0xad/0xe0 [ 24.648593] kmem_cache_alloc_trace+0xfb/0x2a0 [ 24.653141] binder_get_thread+0x15d/0x750 [ 24.657340] binder_poll+0x4a/0x210 [ 24.660936] SyS_epoll_ctl+0x11d7/0x2190 [ 24.664959] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 24.669685] [ 24.671274] Freed by task 3339: [ 24.674515] save_stack_trace+0x16/0x20 [ 24.678454] save_stack+0x43/0xd0 [ 24.681871] kasan_slab_free+0x72/0xc0 [ 24.685719] kfree+0x103/0x300 [ 24.688961] binder_thread_dec_tmpref+0x1cc/0x240 [ 24.693764] binder_thread_release+0x27d/0x540 [ 24.698305] binder_ioctl+0x9c0/0x11b0 [ 24.702155] do_vfs_ioctl+0x1aa/0x1140 [ 24.706003] SyS_ioctl+0x8f/0xc0 [ 24.709331] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 24.714044] [ 24.715635] The buggy address belongs to the object at ffff8801cb0fdb80 [ 24.715635] which belongs to the cache kmalloc-512 of size 512 [ 24.728252] The buggy address is located 184 bytes inside of [ 24.728252] 512-byte region [ffff8801cb0fdb80, ffff8801cb0fdd80) [ 24.740086] The buggy address belongs to the page: [ 24.746372] page:ffffea00072c3f00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.757309] flags: 0x8000000000004080(slab|head) [ 24.762026] page dumped because: kasan: bad access detected [ 24.767694] [ 24.769284] Memory state around the buggy address: [ 24.774173] ffff8801cb0fdb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.781494] ffff8801cb0fdb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.788815] >ffff8801cb0fdc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.797438] ^ [ 24.802935] ffff8801cb0fdc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.810256] ffff8801cb0fdd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.817576] ================================================================== [ 24.824896] Disabling lock debugging due to kernel taint [ 24.830306] Kernel panic - not syncing: panic_on_warn set ... [ 24.830306] [ 24.837631] CPU: 1 PID: 3339 Comm: syzkaller299106 Tainted: G B 4.9.71-g2506378 #113 [ 24.846599] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.855918] ffff8801c83b7838 ffffffff81d922b9 ffffffff84194b3f ffff8801c83b7910 [ 24.863859] 0000000000000000 ffff8801cb0fdc38 ffff8801cb0fdc38 ffff8801c83b7900 [ 24.871803] ffffffff8142d741 0000000041b58ab3 ffffffff84188580 ffffffff8142d585 [ 24.879745] Call Trace: [ 24.882296] [] dump_stack+0xc1/0x128 [ 24.887622] [] panic+0x1bc/0x3a8 [ 24.892600] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 24.900799] [] ? add_taint+0x40/0x50 [ 24.906127] [] kasan_end_report+0x50/0x50 [ 24.911887] [] kasan_report+0x167/0x360 [ 24.917477] [] ? __lock_acquire+0x2eff/0x3640 [ 24.923597] [] __asan_report_load8_noabort+0x14/0x20 [ 24.930313] [] __lock_acquire+0x2eff/0x3640 [ 24.936249] [] ? __lock_acquire+0x629/0x3640 [ 24.942270] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.949247] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.956225] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.963200] [] ? mark_held_locks+0xaf/0x100 [ 24.969133] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.975326] [] lock_acquire+0x12e/0x410 [ 24.980913] [] ? remove_wait_queue+0x14/0x40 [ 24.986936] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.993214] [] ? remove_wait_queue+0x14/0x40 [ 24.999236] [] remove_wait_queue+0x14/0x40 [ 25.005085] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.012066] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.019304] [] ? ep_free+0x1b0/0x1b0 [ 25.024631] [] ep_free+0x96/0x1b0 [ 25.029695] [] ? ep_free+0x1b0/0x1b0 [ 25.035022] [] ep_eventpoll_release+0x44/0x60 [ 25.041133] [] __fput+0x28c/0x6e0 [ 25.046202] [] ____fput+0x15/0x20 [ 25.051269] [] task_work_run+0x115/0x190 [ 25.056944] [] do_exit+0x7e7/0x2a40 [ 25.062186] [] ? selinux_file_ioctl+0x355/0x530 [ 25.068469] [] ? release_task+0x1240/0x1240 [ 25.074402] [] ? SyS_epoll_create+0x190/0x190 [ 25.080512] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 25.087148] [] do_group_exit+0x108/0x320 [ 25.092821] [] SyS_exit_group+0x1d/0x20 [ 25.098407] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 25.104992] Dumping ftrace buffer: [ 25.108499] (ftrace buffer empty) [ 25.112175] Kernel Offset: disabled [ 25.115766] Rebooting in 86400 seconds..