[....] Starting enhanced syslogd: rsyslogd[ 12.739338] audit: type=1400 audit(1514142986.117:4): avc: denied { syslog } for pid=3176 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-9,10.128.15.192' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 23.791323] ================================================================== [ 23.798692] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 23.805323] Read of size 8 at addr ffff8801c8efe838 by task syzkaller721028/3332 [ 23.812816] [ 23.814409] CPU: 0 PID: 3332 Comm: syzkaller721028 Not tainted 4.9.71-g2506378 #113 [ 23.822163] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.831482] ffff8801c81d78e0 ffffffff81d922b9 ffffea000723bf80 ffff8801c8efe838 [ 23.839424] 0000000000000000 ffff8801c8efe838 ffff8801c8efe838 ffff8801c81d7918 [ 23.847372] ffffffff8153bab3 ffff8801c8efe838 0000000000000008 0000000000000000 [ 23.855317] Call Trace: [ 23.857874] [] dump_stack+0xc1/0x128 [ 23.863204] [] print_address_description+0x73/0x280 [ 23.869830] [] kasan_report+0x275/0x360 [ 23.875418] [] ? __lock_acquire+0x2eff/0x3640 [ 23.881527] [] __asan_report_load8_noabort+0x14/0x20 [ 23.888246] [] __lock_acquire+0x2eff/0x3640 [ 23.894185] [] ? __lock_acquire+0x629/0x3640 [ 23.900303] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.907278] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.914255] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.921230] [] ? mark_held_locks+0xaf/0x100 [ 23.927288] [] ? mutex_lock_nested+0x5e3/0x870 [ 23.933493] [] lock_acquire+0x12e/0x410 [ 23.939079] [] ? remove_wait_queue+0x14/0x40 [ 23.945103] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 23.951384] [] ? remove_wait_queue+0x14/0x40 [ 23.957419] [] remove_wait_queue+0x14/0x40 [ 23.963270] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 23.970247] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 23.977483] [] ? ep_free+0x1b0/0x1b0 [ 23.982807] [] ep_free+0x96/0x1b0 [ 23.987873] [] ? ep_free+0x1b0/0x1b0 [ 23.993200] [] ep_eventpoll_release+0x44/0x60 [ 23.999308] [] __fput+0x28c/0x6e0 [ 24.004388] [] ____fput+0x15/0x20 [ 24.009455] [] task_work_run+0x115/0x190 [ 24.015133] [] do_exit+0x7e7/0x2a40 [ 24.020377] [] ? selinux_file_ioctl+0x355/0x530 [ 24.026659] [] ? release_task+0x1240/0x1240 [ 24.032601] [] ? SyS_epoll_create+0x190/0x190 [ 24.038714] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 24.045344] [] do_group_exit+0x108/0x320 [ 24.051018] [] SyS_exit_group+0x1d/0x20 [ 24.056613] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 24.063153] [ 24.064745] Allocated by task 3332: [ 24.068385] save_stack_trace+0x16/0x20 [ 24.072324] save_stack+0x43/0xd0 [ 24.075740] kasan_kmalloc+0xad/0xe0 [ 24.079417] kmem_cache_alloc_trace+0xfb/0x2a0 [ 24.083963] binder_get_thread+0x15d/0x750 [ 24.088158] binder_poll+0x4a/0x210 [ 24.091748] SyS_epoll_ctl+0x11d7/0x2190 [ 24.095770] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 24.100487] [ 24.102083] Freed by task 3332: [ 24.105329] save_stack_trace+0x16/0x20 [ 24.109273] save_stack+0x43/0xd0 [ 24.112688] kasan_slab_free+0x72/0xc0 [ 24.116537] kfree+0x103/0x300 [ 24.119696] binder_thread_dec_tmpref+0x1cc/0x240 [ 24.124505] binder_thread_release+0x27d/0x540 [ 24.129055] binder_ioctl+0x9c0/0x11b0 [ 24.132914] do_vfs_ioctl+0x1aa/0x1140 [ 24.136762] SyS_ioctl+0x8f/0xc0 [ 24.140092] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 24.144806] [ 24.146401] The buggy address belongs to the object at ffff8801c8efe780 [ 24.146401] which belongs to the cache kmalloc-512 of size 512 [ 24.159024] The buggy address is located 184 bytes inside of [ 24.159024] 512-byte region [ffff8801c8efe780, ffff8801c8efe980) [ 24.170858] The buggy address belongs to the page: [ 24.175750] page:ffffea000723bf80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.185901] flags: 0x8000000000004080(slab|head) [ 24.190616] page dumped because: kasan: bad access detected [ 24.196286] [ 24.197878] Memory state around the buggy address: [ 24.202769] ffff8801c8efe700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.210094] ffff8801c8efe780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.217415] >ffff8801c8efe800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.224739] ^ [ 24.229891] ffff8801c8efe880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.237213] ffff8801c8efe900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.244535] ================================================================== [ 24.251856] Disabling lock debugging due to kernel taint [ 24.257267] Kernel panic - not syncing: panic_on_warn set ... [ 24.257267] [ 24.264592] CPU: 0 PID: 3332 Comm: syzkaller721028 Tainted: G B 4.9.71-g2506378 #113 [ 24.273564] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.282886] ffff8801c81d7838 ffffffff81d922b9 ffffffff84194b3f ffff8801c81d7910 [ 24.290838] 0000000000000000 ffff8801c8efe838 ffff8801c8efe838 ffff8801c81d7900 [ 24.298781] ffffffff8142d741 0000000041b58ab3 ffffffff84188580 ffffffff8142d585 [ 24.306731] Call Trace: [ 24.309378] [] dump_stack+0xc1/0x128 [ 24.314706] [] panic+0x1bc/0x3a8 [ 24.319687] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 24.327886] [] ? add_taint+0x40/0x50 [ 24.333216] [] kasan_end_report+0x50/0x50 [ 24.339064] [] kasan_report+0x167/0x360 [ 24.344651] [] ? __lock_acquire+0x2eff/0x3640 [ 24.350758] [] __asan_report_load8_noabort+0x14/0x20 [ 24.357473] [] __lock_acquire+0x2eff/0x3640 [ 24.363408] [] ? __lock_acquire+0x629/0x3640 [ 24.369431] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.376407] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.383383] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.390373] [] ? mark_held_locks+0xaf/0x100 [ 24.396310] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.402504] [] lock_acquire+0x12e/0x410 [ 24.408091] [] ? remove_wait_queue+0x14/0x40 [ 24.414111] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.420394] [] ? remove_wait_queue+0x14/0x40 [ 24.426415] [] remove_wait_queue+0x14/0x40 [ 24.432264] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.439244] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.446481] [] ? ep_free+0x1b0/0x1b0 [ 24.451809] [] ep_free+0x96/0x1b0 [ 24.457582] [] ? ep_free+0x1b0/0x1b0 [ 24.462918] [] ep_eventpoll_release+0x44/0x60 [ 24.469051] [] __fput+0x28c/0x6e0 [ 24.474123] [] ____fput+0x15/0x20 [ 24.479188] [] task_work_run+0x115/0x190 [ 24.484865] [] do_exit+0x7e7/0x2a40 [ 24.490109] [] ? selinux_file_ioctl+0x355/0x530 [ 24.496393] [] ? release_task+0x1240/0x1240 [ 24.502333] [] ? SyS_epoll_create+0x190/0x190 [ 24.508444] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 24.515073] [] do_group_exit+0x108/0x320 [ 24.520746] [] SyS_exit_group+0x1d/0x20 [ 24.526341] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 24.533314] Dumping ftrace buffer: [ 24.536817] (ftrace buffer empty) [ 24.540494] Kernel Offset: disabled [ 24.544083] Rebooting in 86400 seconds..