[....] Starting enhanced syslogd: rsyslogd[ 13.565661] audit: type=1400 audit(1516233238.934:4): avc: denied { syslog } for pid=3185 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 '10.128.0.30' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.116320] ================================================================== [ 27.123720] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.130360] Read of size 8 at addr ffff8801c8e77738 by task syzkaller699503/3342 [ 27.137863] [ 27.139463] CPU: 1 PID: 3342 Comm: syzkaller699503 Not tainted 4.9.77-g033d019 #14 [ 27.147134] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.156460] ffff8801c94378e0 ffffffff81d941c9 ffffea0007239d80 ffff8801c8e77738 [ 27.164428] 0000000000000000 ffff8801c8e77738 ffff8801c8e77738 ffff8801c9437918 [ 27.172395] ffffffff8153db93 ffff8801c8e77738 0000000000000008 0000000000000000 [ 27.180367] Call Trace: [ 27.182927] [] dump_stack+0xc1/0x128 [ 27.188273] [] print_address_description+0x73/0x280 [ 27.194910] [] kasan_report+0x275/0x360 [ 27.200517] [] ? __lock_acquire+0x2eff/0x3640 [ 27.206631] [] __asan_report_load8_noabort+0x14/0x20 [ 27.213359] [] __lock_acquire+0x2eff/0x3640 [ 27.219302] [] ? __lock_acquire+0x629/0x3640 [ 27.225335] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.232339] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.239336] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.246321] [] ? mark_held_locks+0xaf/0x100 [ 27.252261] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.258471] [] lock_acquire+0x12e/0x410 [ 27.264066] [] ? remove_wait_queue+0x14/0x40 [ 27.270093] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.276485] [] ? remove_wait_queue+0x14/0x40 [ 27.282516] [] remove_wait_queue+0x14/0x40 [ 27.288379] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.295371] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.302610] [] ? ep_free+0x1b0/0x1b0 [ 27.307939] [] ep_free+0x96/0x1b0 [ 27.313011] [] ? ep_free+0x1b0/0x1b0 [ 27.318348] [] ep_eventpoll_release+0x44/0x60 [ 27.324466] [] __fput+0x28c/0x6e0 [ 27.329544] [] ____fput+0x15/0x20 [ 27.334627] [] task_work_run+0x115/0x190 [ 27.340306] [] do_exit+0x7e7/0x2a40 [ 27.345550] [] ? selinux_file_ioctl+0x355/0x530 [ 27.351838] [] ? release_task+0x1240/0x1240 [ 27.357789] [] ? SyS_epoll_create+0x190/0x190 [ 27.363919] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 27.370561] [] do_group_exit+0x108/0x320 [ 27.376247] [] SyS_exit_group+0x1d/0x20 [ 27.381836] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.388380] [ 27.389981] Allocated by task 3342: [ 27.393590] save_stack_trace+0x16/0x20 [ 27.397533] save_stack+0x43/0xd0 [ 27.400956] kasan_kmalloc+0xad/0xe0 [ 27.404645] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.409210] binder_get_thread+0x15d/0x750 [ 27.413427] binder_poll+0x4a/0x210 [ 27.417034] SyS_epoll_ctl+0x11d7/0x2190 [ 27.421068] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.425793] [ 27.427397] Freed by task 3342: [ 27.430651] save_stack_trace+0x16/0x20 [ 27.434599] save_stack+0x43/0xd0 [ 27.438115] kasan_slab_free+0x72/0xc0 [ 27.441977] kfree+0x103/0x300 [ 27.445142] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.449965] binder_thread_release+0x27d/0x540 [ 27.454516] binder_ioctl+0x9c0/0x11b0 [ 27.458369] do_vfs_ioctl+0x1aa/0x1140 [ 27.462221] SyS_ioctl+0x8f/0xc0 [ 27.465562] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.470286] [ 27.471884] The buggy address belongs to the object at ffff8801c8e77680 [ 27.471884] which belongs to the cache kmalloc-512 of size 512 [ 27.484514] The buggy address is located 184 bytes inside of [ 27.484514] 512-byte region [ffff8801c8e77680, ffff8801c8e77880) [ 27.496357] The buggy address belongs to the page: [ 27.501266] page:ffffea0007239d80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.511447] flags: 0x8000000000004080(slab|head) [ 27.516167] page dumped because: kasan: bad access detected [ 27.521853] [ 27.523452] Memory state around the buggy address: [ 27.528356] ffff8801c8e77600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.535682] ffff8801c8e77680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.543007] >ffff8801c8e77700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.550330] ^ [ 27.555485] ffff8801c8e77780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.562897] ffff8801c8e77800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.570225] ================================================================== [ 27.577555] Disabling lock debugging due to kernel taint [ 27.582987] Kernel panic - not syncing: panic_on_warn set ... [ 27.582987] [ 27.590325] CPU: 1 PID: 3342 Comm: syzkaller699503 Tainted: G B 4.9.77-g033d019 #14 [ 27.599221] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.608560] ffff8801c9437838 ffffffff81d941c9 ffffffff841970ff ffff8801c9437910 [ 27.616514] 0000000000000000 ffff8801c8e77738 ffff8801c8e77738 ffff8801c9437900 [ 27.624485] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 27.632462] Call Trace: [ 27.635040] [] dump_stack+0xc1/0x128 [ 27.640379] [] panic+0x1bc/0x3a8 [ 27.645366] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.653574] [] ? add_taint+0x40/0x50 [ 27.658905] [] kasan_end_report+0x50/0x50 [ 27.664678] [] kasan_report+0x167/0x360 [ 27.670271] [] ? __lock_acquire+0x2eff/0x3640 [ 27.676467] [] __asan_report_load8_noabort+0x14/0x20 [ 27.683209] [] __lock_acquire+0x2eff/0x3640 [ 27.689149] [] ? __lock_acquire+0x629/0x3640 [ 27.695175] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.702162] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.709149] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.716128] [] ? mark_held_locks+0xaf/0x100 [ 27.722069] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.728279] [] lock_acquire+0x12e/0x410 [ 27.733882] [] ? remove_wait_queue+0x14/0x40 [ 27.739909] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.746192] [] ? remove_wait_queue+0x14/0x40 [ 27.752214] [] remove_wait_queue+0x14/0x40 [ 27.758070] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.765050] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.772296] [] ? ep_free+0x1b0/0x1b0 [ 27.777622] [] ep_free+0x96/0x1b0 [ 27.782700] [] ? ep_free+0x1b0/0x1b0 [ 27.788037] [] ep_eventpoll_release+0x44/0x60 [ 27.794157] [] __fput+0x28c/0x6e0 [ 27.799226] [] ____fput+0x15/0x20 [ 27.804315] [] task_work_run+0x115/0x190 [ 27.809994] [] do_exit+0x7e7/0x2a40 [ 27.815238] [] ? selinux_file_ioctl+0x355/0x530 [ 27.821530] [] ? release_task+0x1240/0x1240 [ 27.827477] [] ? SyS_epoll_create+0x190/0x190 [ 27.833593] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 27.840235] [] do_group_exit+0x108/0x320 [ 27.845937] [] SyS_exit_group+0x1d/0x20 [ 27.851536] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.858127] Dumping ftrace buffer: [ 27.861635] (ftrace buffer empty) [ 27.865320] Kernel Offset: disabled [ 27.868929] Rebooting in 86400 seconds..