[....] Starting enhanced syslogd: rsyslogd[ 10.533323] audit: type=1400 audit(1514077570.021: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 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 'ci-android-49-kasan-gce-6,10.128.15.208' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 21.685235] ================================================================== [ 21.686356] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 21.687311] Read of size 8 at addr ffff8801c8104338 by task syzkaller624382/3335 [ 21.688294] [ 21.688525] CPU: 1 PID: 3335 Comm: syzkaller624382 Not tainted 4.9.71-g2506378 #113 [ 21.689544] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.690773] ffff8801c886f8e0 ffffffff81d922b9 ffffea0007204100 ffff8801c8104338 [ 21.691922] 0000000000000000 ffff8801c8104338 ffff8801c8104338 ffff8801c886f918 [ 21.693085] ffffffff8153bab3 ffff8801c8104338 0000000000000008 0000000000000000 [ 21.694231] Call Trace: [ 21.694610] [] dump_stack+0xc1/0x128 [ 21.695332] [] print_address_description+0x73/0x280 [ 21.696253] [] kasan_report+0x275/0x360 [ 21.696993] [] ? __lock_acquire+0x2eff/0x3640 [ 21.697814] [] __asan_report_load8_noabort+0x14/0x20 [ 21.698750] [] __lock_acquire+0x2eff/0x3640 [ 21.699551] [] ? __lock_acquire+0x629/0x3640 [ 21.700388] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.701334] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.702275] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.703205] [] ? mark_held_locks+0xaf/0x100 [ 21.703992] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.704812] [] lock_acquire+0x12e/0x410 [ 21.705564] [] ? remove_wait_queue+0x14/0x40 [ 21.711594] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.717885] [] ? remove_wait_queue+0x14/0x40 [ 21.723908] [] remove_wait_queue+0x14/0x40 [ 21.729762] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.736748] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.743995] [] ? ep_free+0x1b0/0x1b0 [ 21.749322] [] ep_free+0x96/0x1b0 [ 21.754395] [] ? ep_free+0x1b0/0x1b0 [ 21.759730] [] ep_eventpoll_release+0x44/0x60 [ 21.765846] [] __fput+0x28c/0x6e0 [ 21.770921] [] ____fput+0x15/0x20 [ 21.775994] [] task_work_run+0x115/0x190 [ 21.781671] [] do_exit+0x7e7/0x2a40 [ 21.786913] [] ? selinux_file_ioctl+0x355/0x530 [ 21.793850] [] ? release_task+0x1240/0x1240 [ 21.799800] [] ? SyS_epoll_create+0x190/0x190 [ 21.805920] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 21.812560] [] do_group_exit+0x108/0x320 [ 21.818243] [] SyS_exit_group+0x1d/0x20 [ 21.823832] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 21.830372] [ 21.831965] Allocated by task 3335: [ 21.835558] save_stack_trace+0x16/0x20 [ 21.839514] save_stack+0x43/0xd0 [ 21.842952] kasan_kmalloc+0xad/0xe0 [ 21.846631] kmem_cache_alloc_trace+0xfb/0x2a0 [ 21.851188] binder_get_thread+0x15d/0x750 [ 21.855391] binder_poll+0x4a/0x210 [ 21.858992] SyS_epoll_ctl+0x11d7/0x2190 [ 21.863023] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 21.867739] [ 21.869331] Freed by task 3335: [ 21.872582] save_stack_trace+0x16/0x20 [ 21.876521] save_stack+0x43/0xd0 [ 21.879938] kasan_slab_free+0x72/0xc0 [ 21.883788] kfree+0x103/0x300 [ 21.886945] binder_thread_dec_tmpref+0x1cc/0x240 [ 21.891754] binder_thread_release+0x27d/0x540 [ 21.896298] binder_ioctl+0x9c0/0x11b0 [ 21.900151] do_vfs_ioctl+0x1aa/0x1140 [ 21.904009] SyS_ioctl+0x8f/0xc0 [ 21.907339] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 21.912056] [ 21.913654] The buggy address belongs to the object at ffff8801c8104280 [ 21.913654] which belongs to the cache kmalloc-512 of size 512 [ 21.926277] The buggy address is located 184 bytes inside of [ 21.926277] 512-byte region [ffff8801c8104280, ffff8801c8104480) [ 21.938113] The buggy address belongs to the page: [ 21.943009] page:ffffea0007204100 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 21.953180] flags: 0x8000000000004080(slab|head) [ 21.957907] page dumped because: kasan: bad access detected [ 21.963578] [ 21.965170] Memory state around the buggy address: [ 21.970064] ffff8801c8104200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.977397] ffff8801c8104280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.984721] >ffff8801c8104300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.992043] ^ [ 21.997196] ffff8801c8104380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.004524] ffff8801c8104400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.011857] ================================================================== [ 22.019186] Disabling lock debugging due to kernel taint [ 22.024605] Kernel panic - not syncing: panic_on_warn set ... [ 22.024605] [ 22.031934] CPU: 1 PID: 3335 Comm: syzkaller624382 Tainted: G B 4.9.71-g2506378 #113 [ 22.040910] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.050232] ffff8801c886f838 ffffffff81d922b9 ffffffff84194b3f ffff8801c886f910 [ 22.058205] 0000000000000000 ffff8801c8104338 ffff8801c8104338 ffff8801c886f900 [ 22.066159] ffffffff8142d741 0000000041b58ab3 ffffffff84188580 ffffffff8142d585 [ 22.074106] Call Trace: [ 22.076664] [] dump_stack+0xc1/0x128 [ 22.082005] [] panic+0x1bc/0x3a8 [ 22.086991] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 22.095185] [] ? add_taint+0x40/0x50 [ 22.100521] [] kasan_end_report+0x50/0x50 [ 22.106293] [] kasan_report+0x167/0x360 [ 22.111905] [] ? __lock_acquire+0x2eff/0x3640 [ 22.118022] [] __asan_report_load8_noabort+0x14/0x20 [ 22.124740] [] __lock_acquire+0x2eff/0x3640 [ 22.130676] [] ? __lock_acquire+0x629/0x3640 [ 22.136701] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.143686] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.150673] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.157658] [] ? mark_held_locks+0xaf/0x100 [ 22.163595] [] ? mutex_lock_nested+0x5e3/0x870 [ 22.169794] [] lock_acquire+0x12e/0x410 [ 22.175395] [] ? remove_wait_queue+0x14/0x40 [ 22.181422] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 22.187704] [] ? remove_wait_queue+0x14/0x40 [ 22.193727] [] remove_wait_queue+0x14/0x40 [ 22.199586] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 22.206573] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 22.213817] [] ? ep_free+0x1b0/0x1b0 [ 22.219153] [] ep_free+0x96/0x1b0 [ 22.224228] [] ? ep_free+0x1b0/0x1b0 [ 22.229558] [] ep_eventpoll_release+0x44/0x60 [ 22.235669] [] __fput+0x28c/0x6e0 [ 22.240744] [] ____fput+0x15/0x20 [ 22.245811] [] task_work_run+0x115/0x190 [ 22.251488] [] do_exit+0x7e7/0x2a40 [ 22.256735] [] ? selinux_file_ioctl+0x355/0x530 [ 22.263026] [] ? release_task+0x1240/0x1240 [ 22.268968] [] ? SyS_epoll_create+0x190/0x190 [ 22.275085] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 22.281718] [] do_group_exit+0x108/0x320 [ 22.287394] [] SyS_exit_group+0x1d/0x20 [ 22.292983] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 22.300025] Dumping ftrace buffer: [ 22.303539] (ftrace buffer empty) [ 22.307215] Kernel Offset: disabled [ 22.310806] Rebooting in 86400 seconds..