[....] Starting enhanced syslogd: rsyslogd[ 10.890947] audit: type=1400 audit(1514315558.483:4): avc: denied { syslog } for pid=3175 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-8,10.128.0.35' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 22.014884] ================================================================== [ 22.015923] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 22.016822] Read of size 8 at addr ffff8801cc879c38 by task syzkaller781015/3330 [ 22.017820] [ 22.018065] CPU: 0 PID: 3330 Comm: syzkaller781015 Not tainted 4.9.71-g2506378 #113 [ 22.019085] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.020302] ffff8801bf5978e0 ffffffff81d922b9 ffffea0007321e00 ffff8801cc879c38 [ 22.021426] 0000000000000000 ffff8801cc879c38 ffff8801cc879c38 ffff8801bf597918 [ 22.022565] ffffffff8153bab3 ffff8801cc879c38 0000000000000008 0000000000000000 [ 22.023685] Call Trace: [ 22.024040] [] dump_stack+0xc1/0x128 [ 22.024751] [] print_address_description+0x73/0x280 [ 22.025649] [] kasan_report+0x275/0x360 [ 22.026392] [] ? __lock_acquire+0x2eff/0x3640 [ 22.027243] [] __asan_report_load8_noabort+0x14/0x20 [ 22.028128] [] __lock_acquire+0x2eff/0x3640 [ 22.028912] [] ? __lock_acquire+0x629/0x3640 [ 22.029709] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.030648] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.031566] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.032509] [] ? mark_held_locks+0xaf/0x100 [ 22.033314] [] ? mutex_lock_nested+0x5e3/0x870 [ 22.034133] [] lock_acquire+0x12e/0x410 [ 22.034889] [] ? remove_wait_queue+0x14/0x40 [ 22.040398] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 22.046678] [] ? remove_wait_queue+0x14/0x40 [ 22.052701] [] remove_wait_queue+0x14/0x40 [ 22.058552] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 22.065529] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 22.072762] [] ? ep_free+0x1b0/0x1b0 [ 22.078092] [] ep_free+0x96/0x1b0 [ 22.083157] [] ? ep_free+0x1b0/0x1b0 [ 22.088482] [] ep_eventpoll_release+0x44/0x60 [ 22.094591] [] __fput+0x28c/0x6e0 [ 22.099657] [] ____fput+0x15/0x20 [ 22.104722] [] task_work_run+0x115/0x190 [ 22.110396] [] do_exit+0x7e7/0x2a40 [ 22.115639] [] ? selinux_file_ioctl+0x355/0x530 [ 22.121921] [] ? release_task+0x1240/0x1240 [ 22.127858] [] ? SyS_epoll_create+0x190/0x190 [ 22.133967] [] ? fd_install+0x4d/0x60 [ 22.139379] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 22.146012] [] do_group_exit+0x108/0x320 [ 22.151686] [] SyS_exit_group+0x1d/0x20 [ 22.157273] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 22.163815] [ 22.165409] Allocated by task 3330: [ 22.169000] save_stack_trace+0x16/0x20 [ 22.172938] save_stack+0x43/0xd0 [ 22.176352] kasan_kmalloc+0xad/0xe0 [ 22.180028] kmem_cache_alloc_trace+0xfb/0x2a0 [ 22.184573] binder_get_thread+0x15d/0x750 [ 22.188771] binder_poll+0x4a/0x210 [ 22.192362] SyS_epoll_ctl+0x11d7/0x2190 [ 22.196386] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 22.201100] [ 22.202692] Freed by task 3330: [ 22.205936] save_stack_trace+0x16/0x20 [ 22.209871] save_stack+0x43/0xd0 [ 22.213287] kasan_slab_free+0x72/0xc0 [ 22.217135] kfree+0x103/0x300 [ 22.220290] binder_thread_dec_tmpref+0x1cc/0x240 [ 22.225095] binder_thread_release+0x27d/0x540 [ 22.229638] binder_ioctl+0x9c0/0x11b0 [ 22.233489] do_vfs_ioctl+0x1aa/0x1140 [ 22.237339] SyS_ioctl+0x8f/0xc0 [ 22.240667] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 22.245383] [ 22.246976] The buggy address belongs to the object at ffff8801cc879b80 [ 22.246976] which belongs to the cache kmalloc-512 of size 512 [ 22.259593] The buggy address is located 184 bytes inside of [ 22.259593] 512-byte region [ffff8801cc879b80, ffff8801cc879d80) [ 22.271427] The buggy address belongs to the page: [ 22.276320] page:ffffea0007321e00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 22.286472] flags: 0x8000000000004080(slab|head) [ 22.291186] page dumped because: kasan: bad access detected [ 22.296856] [ 22.298447] Memory state around the buggy address: [ 22.303337] ffff8801cc879b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.310657] ffff8801cc879b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.317976] >ffff8801cc879c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.325294] ^ [ 22.330445] ffff8801cc879c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.337765] ffff8801cc879d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.345082] ================================================================== [ 22.352401] Disabling lock debugging due to kernel taint [ 22.357813] Kernel panic - not syncing: panic_on_warn set ... [ 22.357813] [ 22.365136] CPU: 0 PID: 3330 Comm: syzkaller781015 Tainted: G B 4.9.71-g2506378 #113 [ 22.374107] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.383425] ffff8801bf597838 ffffffff81d922b9 ffffffff84194b3f ffff8801bf597910 [ 22.391367] 0000000000000000 ffff8801cc879c38 ffff8801cc879c38 ffff8801bf597900 [ 22.399305] ffffffff8142d741 0000000041b58ab3 ffffffff84188580 ffffffff8142d585 [ 22.407255] Call Trace: [ 22.409807] [] dump_stack+0xc1/0x128 [ 22.415137] [] panic+0x1bc/0x3a8 [ 22.420140] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 22.428332] [] ? add_taint+0x40/0x50 [ 22.433661] [] kasan_end_report+0x50/0x50 [ 22.439421] [] kasan_report+0x167/0x360 [ 22.445007] [] ? __lock_acquire+0x2eff/0x3640 [ 22.451114] [] __asan_report_load8_noabort+0x14/0x20 [ 22.457830] [] __lock_acquire+0x2eff/0x3640 [ 22.463765] [] ? __lock_acquire+0x629/0x3640 [ 22.469786] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.476762] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.483739] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.490715] [] ? mark_held_locks+0xaf/0x100 [ 22.496654] [] ? mutex_lock_nested+0x5e3/0x870 [ 22.502855] [] lock_acquire+0x12e/0x410 [ 22.508445] [] ? remove_wait_queue+0x14/0x40 [ 22.514465] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 22.520744] [] ? remove_wait_queue+0x14/0x40 [ 22.526764] [] remove_wait_queue+0x14/0x40 [ 22.532611] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 22.539587] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 22.546824] [] ? ep_free+0x1b0/0x1b0 [ 22.552148] [] ep_free+0x96/0x1b0 [ 22.557214] [] ? ep_free+0x1b0/0x1b0 [ 22.562541] [] ep_eventpoll_release+0x44/0x60 [ 22.568650] [] __fput+0x28c/0x6e0 [ 22.573717] [] ____fput+0x15/0x20 [ 22.578783] [] task_work_run+0x115/0x190 [ 22.584458] [] do_exit+0x7e7/0x2a40 [ 22.589700] [] ? selinux_file_ioctl+0x355/0x530 [ 22.595983] [] ? release_task+0x1240/0x1240 [ 22.601916] [] ? SyS_epoll_create+0x190/0x190 [ 22.608022] [] ? fd_install+0x4d/0x60 [ 22.613439] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 22.620068] [] do_group_exit+0x108/0x320 [ 22.625740] [] SyS_exit_group+0x1d/0x20 [ 22.631339] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 22.638288] Dumping ftrace buffer: [ 22.641795] (ftrace buffer empty) [ 22.645471] Kernel Offset: disabled [ 22.649061] Rebooting in 86400 seconds..