[....] Starting enhanced syslogd: rsyslogd[ 12.708891] audit: type=1400 audit(1517641913.720:4): avc: denied { syslog } for pid=3866 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.15.194' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.481134] ================================================================== [ 24.488529] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 24.495172] Read of size 8 at addr ffff8801c5a940b8 by task syzkaller999395/4023 [ 24.502670] [ 24.504278] CPU: 0 PID: 4023 Comm: syzkaller999395 Not tainted 4.9.79-g47af77b #26 [ 24.511951] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.521276] ffff8801d3c2f8c0 ffffffff81d94b09 ffffea000716a500 ffff8801c5a940b8 [ 24.529256] 0000000000000000 ffff8801c5a940b8 ffff8801c5a940b8 ffff8801d3c2f8f8 [ 24.537314] ffffffff8153e083 ffff8801c5a940b8 0000000000000008 0000000000000000 [ 24.545270] Call Trace: [ 24.547828] [] dump_stack+0xc1/0x128 [ 24.553162] [] print_address_description+0x73/0x280 [ 24.559803] [] kasan_report+0x275/0x360 [ 24.565405] [] ? __lock_acquire+0x2eff/0x3640 [ 24.571520] [] __asan_report_load8_noabort+0x14/0x20 [ 24.578241] [] __lock_acquire+0x2eff/0x3640 [ 24.584179] [] ? __lock_acquire+0x629/0x3640 [ 24.590209] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.597190] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.604171] [] ? __lock_is_held+0xa1/0xf0 [ 24.609943] [] lock_acquire+0x12e/0x410 [ 24.615541] [] ? remove_wait_queue+0x14/0x40 [ 24.621579] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.627866] [] ? remove_wait_queue+0x14/0x40 [ 24.633899] [] remove_wait_queue+0x14/0x40 [ 24.639756] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.646739] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.653980] [] ep_remove+0x41/0x290 [ 24.659233] [] eventpoll_release_file+0xc5/0x140 [ 24.665606] [] __fput+0x5a8/0x6e0 [ 24.670678] [] ____fput+0x15/0x20 [ 24.675752] [] task_work_run+0x115/0x190 [ 24.681436] [] do_exit+0x7e7/0x2a40 [ 24.686689] [] ? selinux_file_ioctl+0x355/0x530 [ 24.692994] [] ? release_task+0x1240/0x1240 [ 24.698981] [] ? SyS_epoll_create+0x190/0x190 [ 24.705095] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 24.711730] [] do_group_exit+0x108/0x320 [ 24.717408] [] SyS_exit_group+0x1d/0x20 [ 24.722999] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 24.729541] [ 24.731145] Allocated by task 4023: [ 24.734740] save_stack_trace+0x16/0x20 [ 24.738682] save_stack+0x43/0xd0 [ 24.742102] kasan_kmalloc+0xad/0xe0 [ 24.745782] kmem_cache_alloc_trace+0xfb/0x2a0 [ 24.750340] binder_get_thread+0x15d/0x750 [ 24.754544] binder_poll+0x4a/0x210 [ 24.758145] SyS_epoll_ctl+0x11d7/0x2190 [ 24.762174] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 24.766895] [ 24.768493] Freed by task 4023: [ 24.771743] save_stack_trace+0x16/0x20 [ 24.775684] save_stack+0x43/0xd0 [ 24.779121] kasan_slab_free+0x72/0xc0 [ 24.782973] kfree+0x103/0x300 [ 24.786134] binder_thread_dec_tmpref+0x1cc/0x240 [ 24.790952] binder_thread_release+0x27d/0x540 [ 24.795501] binder_ioctl+0x9c0/0x11b0 [ 24.799356] do_vfs_ioctl+0x1aa/0x1140 [ 24.803215] SyS_ioctl+0x8f/0xc0 [ 24.806550] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 24.811273] [ 24.812877] The buggy address belongs to the object at ffff8801c5a94000 [ 24.812877] which belongs to the cache kmalloc-512 of size 512 [ 24.825500] The buggy address is located 184 bytes inside of [ 24.825500] 512-byte region [ffff8801c5a94000, ffff8801c5a94200) [ 24.837340] The buggy address belongs to the page: [ 24.842239] page:ffffea000716a500 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.852402] flags: 0x8000000000004080(slab|head) [ 24.857132] page dumped because: kasan: bad access detected [ 24.862817] [ 24.864419] Memory state around the buggy address: [ 24.869314] ffff8801c5a93f80: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc [ 24.876652] ffff8801c5a94000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.883978] >ffff8801c5a94080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.891307] ^ [ 24.896463] ffff8801c5a94100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.903789] ffff8801c5a94180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.911113] ================================================================== [ 24.918439] Disabling lock debugging due to kernel taint [ 24.923855] Kernel panic - not syncing: panic_on_warn set ... [ 24.923855] [ 24.931195] CPU: 0 PID: 4023 Comm: syzkaller999395 Tainted: G B 4.9.79-g47af77b #26 [ 24.940086] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.949411] ffff8801d3c2f818 ffffffff81d94b09 ffffffff8419709f ffff8801d3c2f8f0 [ 24.957374] 0000000000000000 ffff8801c5a940b8 ffff8801c5a940b8 ffff8801d3c2f8e0 [ 24.965341] ffffffff8142f531 0000000041b58ab3 ffffffff8418ab10 ffffffff8142f375 [ 24.973305] Call Trace: [ 24.975862] [] dump_stack+0xc1/0x128 [ 24.981198] [] panic+0x1bc/0x3a8 [ 24.986182] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 24.994384] [] ? add_taint+0x40/0x50 [ 24.999720] [] kasan_end_report+0x50/0x50 [ 25.005492] [] kasan_report+0x167/0x360 [ 25.011087] [] ? __lock_acquire+0x2eff/0x3640 [ 25.017201] [] __asan_report_load8_noabort+0x14/0x20 [ 25.023928] [] __lock_acquire+0x2eff/0x3640 [ 25.029870] [] ? __lock_acquire+0x629/0x3640 [ 25.035898] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.042879] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.049860] [] ? __lock_is_held+0xa1/0xf0 [ 25.055630] [] lock_acquire+0x12e/0x410 [ 25.061224] [] ? remove_wait_queue+0x14/0x40 [ 25.067252] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.073545] [] ? remove_wait_queue+0x14/0x40 [ 25.079570] [] remove_wait_queue+0x14/0x40 [ 25.085466] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.092633] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.099877] [] ep_remove+0x41/0x290 [ 25.105119] [] eventpoll_release_file+0xc5/0x140 [ 25.111493] [] __fput+0x5a8/0x6e0 [ 25.116570] [] ____fput+0x15/0x20 [ 25.121642] [] task_work_run+0x115/0x190 [ 25.127320] [] do_exit+0x7e7/0x2a40 [ 25.132567] [] ? selinux_file_ioctl+0x355/0x530 [ 25.138854] [] ? release_task+0x1240/0x1240 [ 25.144796] [] ? SyS_epoll_create+0x190/0x190 [ 25.150912] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 25.157544] [] do_group_exit+0x108/0x320 [ 25.163232] [] SyS_exit_group+0x1d/0x20 [ 25.168830] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 25.175766] Dumping ftrace buffer: [ 25.179276] (ftrace buffer empty) [ 25.182958] Kernel Offset: disabled [ 25.186556] Rebooting in 86400 seconds..