[....] Starting enhanced syslogd: rsyslogd[ 14.101796] audit: type=1400 audit(1517473762.173:4): avc: denied { syslog } for pid=3912 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.210' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.716971] ================================================================== [ 26.724365] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.731002] Read of size 8 at addr ffff8801b65ec0b8 by task syzkaller544579/4069 [ 26.738498] [ 26.740096] CPU: 0 PID: 4069 Comm: syzkaller544579 Not tainted 4.9.79-g71f1469 #25 [ 26.747769] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.757091] ffff8801d40378e0 ffffffff81d94829 ffffea0006d97b00 ffff8801b65ec0b8 [ 26.765054] 0000000000000000 ffff8801b65ec0b8 ffff8801b65ec0b8 ffff8801d4037918 [ 26.773011] ffffffff8153e083 ffff8801b65ec0b8 0000000000000008 0000000000000000 [ 26.780970] Call Trace: [ 26.783536] [] dump_stack+0xc1/0x128 [ 26.788867] [] print_address_description+0x73/0x280 [ 26.795498] [] kasan_report+0x275/0x360 [ 26.801092] [] ? __lock_acquire+0x2eff/0x3640 [ 26.807202] [] __asan_report_load8_noabort+0x14/0x20 [ 26.813922] [] __lock_acquire+0x2eff/0x3640 [ 26.819858] [] ? __lock_acquire+0x629/0x3640 [ 26.825881] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.832862] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.839840] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.846821] [] ? mark_held_locks+0xaf/0x100 [ 26.852760] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.858956] [] lock_acquire+0x12e/0x410 [ 26.864546] [] ? remove_wait_queue+0x14/0x40 [ 26.870568] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.876854] [] ? remove_wait_queue+0x14/0x40 [ 26.882880] [] remove_wait_queue+0x14/0x40 [ 26.888731] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.895709] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.902950] [] ? ep_free+0x1b0/0x1b0 [ 26.908280] [] ep_free+0x96/0x1b0 [ 26.913348] [] ? ep_free+0x1b0/0x1b0 [ 26.918675] [] ep_eventpoll_release+0x44/0x60 [ 26.924896] [] __fput+0x28c/0x6e0 [ 26.929963] [] ____fput+0x15/0x20 [ 26.935035] [] task_work_run+0x115/0x190 [ 26.940713] [] do_exit+0x7e7/0x2a40 [ 26.945959] [] ? selinux_file_ioctl+0x355/0x530 [ 26.952246] [] ? release_task+0x1240/0x1240 [ 26.958185] [] ? SyS_epoll_create+0x190/0x190 [ 26.964303] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 26.970933] [] do_group_exit+0x108/0x320 [ 26.976610] [] SyS_exit_group+0x1d/0x20 [ 26.982199] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 26.988740] [ 26.990333] Allocated by task 4069: [ 26.993928] save_stack_trace+0x16/0x20 [ 26.997870] save_stack+0x43/0xd0 [ 27.001288] kasan_kmalloc+0xad/0xe0 [ 27.004965] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.009515] binder_get_thread+0x15d/0x750 [ 27.013719] binder_poll+0x4a/0x210 [ 27.017313] SyS_epoll_ctl+0x11d7/0x2190 [ 27.021343] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.026062] [ 27.027658] Freed by task 4069: [ 27.030903] save_stack_trace+0x16/0x20 [ 27.034842] save_stack+0x43/0xd0 [ 27.038258] kasan_slab_free+0x72/0xc0 [ 27.042113] kfree+0x103/0x300 [ 27.045270] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.050076] binder_thread_release+0x27d/0x540 [ 27.054623] binder_ioctl+0x9c0/0x11b0 [ 27.058475] do_vfs_ioctl+0x1aa/0x1140 [ 27.062330] SyS_ioctl+0x8f/0xc0 [ 27.065664] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.070384] [ 27.071985] The buggy address belongs to the object at ffff8801b65ec000 [ 27.071985] which belongs to the cache kmalloc-512 of size 512 [ 27.084606] The buggy address is located 184 bytes inside of [ 27.084606] 512-byte region [ffff8801b65ec000, ffff8801b65ec200) [ 27.096443] The buggy address belongs to the page: [ 27.101338] page:ffffea0006d97b00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.111500] flags: 0x8000000000004080(slab|head) [ 27.116218] page dumped because: kasan: bad access detected [ 27.121893] [ 27.123488] Memory state around the buggy address: [ 27.128382] ffff8801b65ebf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 27.135705] ffff8801b65ec000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.143028] >ffff8801b65ec080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.150349] ^ [ 27.155503] ffff8801b65ec100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.162827] ffff8801b65ec180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.170149] ================================================================== [ 27.177474] Disabling lock debugging due to kernel taint [ 27.182890] Kernel panic - not syncing: panic_on_warn set ... [ 27.182890] [ 27.190217] CPU: 0 PID: 4069 Comm: syzkaller544579 Tainted: G B 4.9.79-g71f1469 #25 [ 27.199101] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.208422] ffff8801d4037838 ffffffff81d94829 ffffffff8419709f ffff8801d4037910 [ 27.216388] 0000000000000000 ffff8801b65ec0b8 ffff8801b65ec0b8 ffff8801d4037900 [ 27.224344] ffffffff8142f531 0000000041b58ab3 ffffffff8418ab10 ffffffff8142f375 [ 27.232302] Call Trace: [ 27.234857] [] dump_stack+0xc1/0x128 [ 27.240188] [] panic+0x1bc/0x3a8 [ 27.245170] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.253364] [] ? add_taint+0x40/0x50 [ 27.258695] [] kasan_end_report+0x50/0x50 [ 27.264459] [] kasan_report+0x167/0x360 [ 27.270051] [] ? __lock_acquire+0x2eff/0x3640 [ 27.276161] [] __asan_report_load8_noabort+0x14/0x20 [ 27.282880] [] __lock_acquire+0x2eff/0x3640 [ 27.288817] [] ? __lock_acquire+0x629/0x3640 [ 27.294847] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.301826] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.308807] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.315786] [] ? mark_held_locks+0xaf/0x100 [ 27.321724] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.327920] [] lock_acquire+0x12e/0x410 [ 27.333510] [] ? remove_wait_queue+0x14/0x40 [ 27.339544] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.345835] [] ? remove_wait_queue+0x14/0x40 [ 27.351862] [] remove_wait_queue+0x14/0x40 [ 27.357715] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.364694] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.371933] [] ? ep_free+0x1b0/0x1b0 [ 27.377264] [] ep_free+0x96/0x1b0 [ 27.382332] [] ? ep_free+0x1b0/0x1b0 [ 27.387659] [] ep_eventpoll_release+0x44/0x60 [ 27.393770] [] __fput+0x28c/0x6e0 [ 27.398837] [] ____fput+0x15/0x20 [ 27.403906] [] task_work_run+0x115/0x190 [ 27.409582] [] do_exit+0x7e7/0x2a40 [ 27.414825] [] ? selinux_file_ioctl+0x355/0x530 [ 27.421110] [] ? release_task+0x1240/0x1240 [ 27.427048] [] ? SyS_epoll_create+0x190/0x190 [ 27.433161] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 27.439791] [] do_group_exit+0x108/0x320 [ 27.445470] [] SyS_exit_group+0x1d/0x20 [ 27.451062] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.458054] Dumping ftrace buffer: [ 27.461566] (ftrace buffer empty) [ 27.465246] Kernel Offset: disabled [ 27.468837] Rebooting in 86400 seconds..