[....] Starting enhanced syslogd: rsyslogd[ 12.637176] audit: type=1400 audit(1517604315.635:4): avc: denied { syslog } for pid=3902 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.12' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.579136] ================================================================== [ 20.586547] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.593181] Read of size 8 at addr ffff8801da1f0d38 by task syzkaller026881/4051 [ 20.600679] [ 20.602279] CPU: 1 PID: 4051 Comm: syzkaller026881 Not tainted 4.9.79-g71f1469 #25 [ 20.609952] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.619279] ffff8801d35ff8e0 ffffffff81d94829 ffffea0007687c00 ffff8801da1f0d38 [ 20.627247] 0000000000000000 ffff8801da1f0d38 ffff8801da1f0d38 ffff8801d35ff918 [ 20.635219] ffffffff8153e083 ffff8801da1f0d38 0000000000000008 0000000000000000 [ 20.643196] Call Trace: [ 20.645758] [] dump_stack+0xc1/0x128 [ 20.651619] [] print_address_description+0x73/0x280 [ 20.658253] [] kasan_report+0x275/0x360 [ 20.663849] [] ? __lock_acquire+0x2eff/0x3640 [ 20.669960] [] __asan_report_load8_noabort+0x14/0x20 [ 20.676683] [] __lock_acquire+0x2eff/0x3640 [ 20.682631] [] ? __lock_acquire+0x629/0x3640 [ 20.688673] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.695657] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.702640] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.709625] [] ? mark_held_locks+0xaf/0x100 [ 20.715566] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.721764] [] lock_acquire+0x12e/0x410 [ 20.727357] [] ? remove_wait_queue+0x14/0x40 [ 20.733382] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.739670] [] ? remove_wait_queue+0x14/0x40 [ 20.745697] [] remove_wait_queue+0x14/0x40 [ 20.751553] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.758535] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.765782] [] ? ep_free+0x1b0/0x1b0 [ 20.771122] [] ep_free+0x96/0x1b0 [ 20.776202] [] ? ep_free+0x1b0/0x1b0 [ 20.781546] [] ep_eventpoll_release+0x44/0x60 [ 20.787661] [] __fput+0x28c/0x6e0 [ 20.792732] [] ____fput+0x15/0x20 [ 20.797804] [] task_work_run+0x115/0x190 [ 20.803487] [] do_exit+0x7e7/0x2a40 [ 20.808736] [] ? selinux_file_ioctl+0x355/0x530 [ 20.815025] [] ? release_task+0x1240/0x1240 [ 20.820966] [] ? SyS_epoll_create+0x190/0x190 [ 20.827083] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 20.833716] [] do_group_exit+0x108/0x320 [ 20.839406] [] SyS_exit_group+0x1d/0x20 [ 20.845004] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 20.851551] [ 20.853151] Allocated by task 4051: [ 20.856751] save_stack_trace+0x16/0x20 [ 20.860696] save_stack+0x43/0xd0 [ 20.864116] kasan_kmalloc+0xad/0xe0 [ 20.867796] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.872363] binder_get_thread+0x15d/0x750 [ 20.876575] binder_poll+0x4a/0x210 [ 20.880172] SyS_epoll_ctl+0x11d7/0x2190 [ 20.884203] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 20.888928] [ 20.890526] Freed by task 4051: [ 20.893774] save_stack_trace+0x16/0x20 [ 20.897718] save_stack+0x43/0xd0 [ 20.901139] kasan_slab_free+0x72/0xc0 [ 20.904994] kfree+0x103/0x300 [ 20.908163] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.912975] binder_thread_release+0x27d/0x540 [ 20.917525] binder_ioctl+0x9c0/0x11b0 [ 20.921383] do_vfs_ioctl+0x1aa/0x1140 [ 20.925240] SyS_ioctl+0x8f/0xc0 [ 20.928576] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 20.933296] [ 20.934894] The buggy address belongs to the object at ffff8801da1f0c80 [ 20.934894] which belongs to the cache kmalloc-512 of size 512 [ 20.947519] The buggy address is located 184 bytes inside of [ 20.947519] 512-byte region [ffff8801da1f0c80, ffff8801da1f0e80) [ 20.959361] The buggy address belongs to the page: [ 20.964260] page:ffffea0007687c00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.974424] flags: 0x8000000000004080(slab|head) [ 20.979145] page dumped because: kasan: bad access detected [ 20.984828] [ 20.986432] Memory state around the buggy address: [ 20.991340] ffff8801da1f0c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.998666] ffff8801da1f0c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.006003] >ffff8801da1f0d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.013330] ^ [ 21.018486] ffff8801da1f0d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.025817] ffff8801da1f0e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.033148] ================================================================== [ 21.040474] Disabling lock debugging due to kernel taint [ 21.045892] Kernel panic - not syncing: panic_on_warn set ... [ 21.045892] [ 21.053222] CPU: 1 PID: 4051 Comm: syzkaller026881 Tainted: G B 4.9.79-g71f1469 #25 [ 21.062114] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.071443] ffff8801d35ff838 ffffffff81d94829 ffffffff8419709f ffff8801d35ff910 [ 21.079412] 0000000000000000 ffff8801da1f0d38 ffff8801da1f0d38 ffff8801d35ff900 [ 21.087377] ffffffff8142f531 0000000041b58ab3 ffffffff8418ab10 ffffffff8142f375 [ 21.095339] Call Trace: [ 21.097900] [] dump_stack+0xc1/0x128 [ 21.103233] [] panic+0x1bc/0x3a8 [ 21.108220] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 21.116434] [] ? add_taint+0x40/0x50 [ 21.121767] [] kasan_end_report+0x50/0x50 [ 21.127538] [] kasan_report+0x167/0x360 [ 21.133141] [] ? __lock_acquire+0x2eff/0x3640 [ 21.139254] [] __asan_report_load8_noabort+0x14/0x20 [ 21.145980] [] __lock_acquire+0x2eff/0x3640 [ 21.151919] [] ? __lock_acquire+0x629/0x3640 [ 21.157946] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.164928] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.171908] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.178890] [] ? mark_held_locks+0xaf/0x100 [ 21.184848] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.191061] [] lock_acquire+0x12e/0x410 [ 21.196661] [] ? remove_wait_queue+0x14/0x40 [ 21.202690] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.208977] [] ? remove_wait_queue+0x14/0x40 [ 21.215003] [] remove_wait_queue+0x14/0x40 [ 21.220860] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.227842] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.235089] [] ? ep_free+0x1b0/0x1b0 [ 21.240433] [] ep_free+0x96/0x1b0 [ 21.245510] [] ? ep_free+0x1b0/0x1b0 [ 21.250843] [] ep_eventpoll_release+0x44/0x60 [ 21.256956] [] __fput+0x28c/0x6e0 [ 21.262024] [] ____fput+0x15/0x20 [ 21.267099] [] task_work_run+0x115/0x190 [ 21.272780] [] do_exit+0x7e7/0x2a40 [ 21.278025] [] ? selinux_file_ioctl+0x355/0x530 [ 21.284312] [] ? release_task+0x1240/0x1240 [ 21.290251] [] ? SyS_epoll_create+0x190/0x190 [ 21.296367] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 21.303002] [] do_group_exit+0x108/0x320 [ 21.308689] [] SyS_exit_group+0x1d/0x20 [ 21.314279] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 21.321305] Dumping ftrace buffer: [ 21.324820] (ftrace buffer empty) [ 21.328498] Kernel Offset: disabled [ 21.332093] Rebooting in 86400 seconds..