[....] Starting enhanced syslogd: rsyslogd[ 13.273497] audit: type=1400 audit(1517263244.102:4): avc: denied { syslog } for pid=3720 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.56' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 25.662453] ================================================================== [ 25.669845] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 25.676499] Read of size 8 at addr ffff8801c86fe838 by task syzkaller691556/3876 [ 25.684004] [ 25.685609] CPU: 1 PID: 3876 Comm: syzkaller691556 Not tainted 4.9.78-g7be1985 #24 [ 25.693295] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.702634] ffff8801d699f8e0 ffffffff81d94409 ffffea000721bf80 ffff8801c86fe838 [ 25.710631] 0000000000000000 ffff8801c86fe838 ffff8801c86fe838 ffff8801d699f918 [ 25.718596] ffffffff8153dc73 ffff8801c86fe838 0000000000000008 0000000000000000 [ 25.726563] Call Trace: [ 25.729126] [] dump_stack+0xc1/0x128 [ 25.734464] [] print_address_description+0x73/0x280 [ 25.741099] [] kasan_report+0x275/0x360 [ 25.746700] [] ? __lock_acquire+0x2eff/0x3640 [ 25.752825] [] __asan_report_load8_noabort+0x14/0x20 [ 25.759563] [] __lock_acquire+0x2eff/0x3640 [ 25.765522] [] ? __lock_acquire+0x629/0x3640 [ 25.771571] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.778570] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.785577] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.792570] [] ? mark_held_locks+0xaf/0x100 [ 25.798520] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.804722] [] lock_acquire+0x12e/0x410 [ 25.810327] [] ? remove_wait_queue+0x14/0x40 [ 25.816363] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.822659] [] ? remove_wait_queue+0x14/0x40 [ 25.828694] [] remove_wait_queue+0x14/0x40 [ 25.834555] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.841554] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.848802] [] ? ep_free+0x1b0/0x1b0 [ 25.854138] [] ep_free+0x96/0x1b0 [ 25.859215] [] ? ep_free+0x1b0/0x1b0 [ 25.864550] [] ep_eventpoll_release+0x44/0x60 [ 25.870674] [] __fput+0x28c/0x6e0 [ 25.875761] [] ____fput+0x15/0x20 [ 25.880847] [] task_work_run+0x115/0x190 [ 25.886544] [] do_exit+0x7e7/0x2a40 [ 25.891805] [] ? selinux_file_ioctl+0x355/0x530 [ 25.898100] [] ? release_task+0x1240/0x1240 [ 25.904047] [] ? SyS_epoll_create+0x190/0x190 [ 25.910167] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 25.916807] [] do_group_exit+0x108/0x320 [ 25.922490] [] SyS_exit_group+0x1d/0x20 [ 25.928090] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 25.934639] [ 25.936237] Allocated by task 3876: [ 25.939836] save_stack_trace+0x16/0x20 [ 25.943781] save_stack+0x43/0xd0 [ 25.947208] kasan_kmalloc+0xad/0xe0 [ 25.950891] kmem_cache_alloc_trace+0xfb/0x2a0 [ 25.955446] binder_get_thread+0x15d/0x750 [ 25.959656] binder_poll+0x4a/0x210 [ 25.963255] SyS_epoll_ctl+0x11d7/0x2190 [ 25.967288] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 25.972014] [ 25.973621] Freed by task 3876: [ 25.976874] save_stack_trace+0x16/0x20 [ 25.980837] save_stack+0x43/0xd0 [ 25.984265] kasan_slab_free+0x72/0xc0 [ 25.988123] kfree+0x103/0x300 [ 25.991287] binder_thread_dec_tmpref+0x1cc/0x240 [ 25.996098] binder_thread_release+0x27d/0x540 [ 26.000649] binder_ioctl+0x9c0/0x11b0 [ 26.004504] do_vfs_ioctl+0x1aa/0x1140 [ 26.008363] SyS_ioctl+0x8f/0xc0 [ 26.011716] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 26.016437] [ 26.018034] The buggy address belongs to the object at ffff8801c86fe780 [ 26.018034] which belongs to the cache kmalloc-512 of size 512 [ 26.030668] The buggy address is located 184 bytes inside of [ 26.030668] 512-byte region [ffff8801c86fe780, ffff8801c86fe980) [ 26.043245] The buggy address belongs to the page: [ 26.048148] page:ffffea000721bf80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.058320] flags: 0x8000000000004080(slab|head) [ 26.063046] page dumped because: kasan: bad access detected [ 26.068723] [ 26.070325] Memory state around the buggy address: [ 26.075227] ffff8801c86fe700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.082561] ffff8801c86fe780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.089891] >ffff8801c86fe800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.097219] ^ [ 26.102379] ffff8801c86fe880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.109709] ffff8801c86fe900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.117037] ================================================================== [ 26.124365] Disabling lock debugging due to kernel taint [ 26.129784] Kernel panic - not syncing: panic_on_warn set ... [ 26.129784] [ 26.137116] CPU: 1 PID: 3876 Comm: syzkaller691556 Tainted: G B 4.9.78-g7be1985 #24 [ 26.146024] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.155357] ffff8801d699f838 ffffffff81d94409 ffffffff841971bf ffff8801d699f910 [ 26.163327] 0000000000000000 ffff8801c86fe838 ffff8801c86fe838 ffff8801d699f900 [ 26.171306] ffffffff8142f4a1 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f2e5 [ 26.179287] Call Trace: [ 26.181851] [] dump_stack+0xc1/0x128 [ 26.187195] [] panic+0x1bc/0x3a8 [ 26.192187] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.200395] [] ? add_taint+0x40/0x50 [ 26.205732] [] kasan_end_report+0x50/0x50 [ 26.211507] [] kasan_report+0x167/0x360 [ 26.217106] [] ? __lock_acquire+0x2eff/0x3640 [ 26.223230] [] __asan_report_load8_noabort+0x14/0x20 [ 26.229960] [] __lock_acquire+0x2eff/0x3640 [ 26.235905] [] ? __lock_acquire+0x629/0x3640 [ 26.241938] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.248929] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.255917] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.262903] [] ? mark_held_locks+0xaf/0x100 [ 26.268853] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.275065] [] lock_acquire+0x12e/0x410 [ 26.280663] [] ? remove_wait_queue+0x14/0x40 [ 26.286691] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.292981] [] ? remove_wait_queue+0x14/0x40 [ 26.299011] [] remove_wait_queue+0x14/0x40 [ 26.304874] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.311863] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.319125] [] ? ep_free+0x1b0/0x1b0 [ 26.324464] [] ep_free+0x96/0x1b0 [ 26.329541] [] ? ep_free+0x1b0/0x1b0 [ 26.334904] [] ep_eventpoll_release+0x44/0x60 [ 26.341026] [] __fput+0x28c/0x6e0 [ 26.346103] [] ____fput+0x15/0x20 [ 26.351179] [] task_work_run+0x115/0x190 [ 26.356877] [] do_exit+0x7e7/0x2a40 [ 26.362128] [] ? selinux_file_ioctl+0x355/0x530 [ 26.368421] [] ? release_task+0x1240/0x1240 [ 26.374368] [] ? SyS_epoll_create+0x190/0x190 [ 26.380488] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 26.387133] [] do_group_exit+0x108/0x320 [ 26.392823] [] SyS_exit_group+0x1d/0x20 [ 26.398420] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 26.405458] Dumping ftrace buffer: [ 26.408981] (ftrace buffer empty) [ 26.412665] Kernel Offset: disabled [ 26.416264] Rebooting in 86400 seconds..