[....] Starting enhanced syslogd: rsyslogd[ 11.153234] audit: type=1400 audit(1515692840.196:4): avc: denied { syslog } for pid=3174 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.37' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.503231] ================================================================== [ 27.510633] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.517276] Read of size 8 at addr ffff8801cd1859b8 by task syzkaller010285/3331 [ 27.524775] [ 27.526372] CPU: 0 PID: 3331 Comm: syzkaller010285 Not tainted 4.9.76-g9154940 #20 [ 27.534040] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.543372] ffff8801c8ff7870 ffffffff81d93149 ffffea0007346100 ffff8801cd1859b8 [ 27.551329] 0000000000000000 ffff8801cd1859b8 ffff8801cd1859b8 ffff8801c8ff78a8 [ 27.559270] ffffffff8153cb43 ffff8801cd1859b8 0000000000000008 0000000000000000 [ 27.567214] Call Trace: [ 27.569770] [] dump_stack+0xc1/0x128 [ 27.575103] [] print_address_description+0x73/0x280 [ 27.581737] [] kasan_report+0x275/0x360 [ 27.587337] [] ? __lock_acquire+0x2eff/0x3640 [ 27.593448] [] __asan_report_load8_noabort+0x14/0x20 [ 27.600166] [] __lock_acquire+0x2eff/0x3640 [ 27.606103] [] ? __lock_acquire+0x629/0x3640 [ 27.612133] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.619112] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.626091] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.633072] [] ? mark_held_locks+0xaf/0x100 [ 27.639012] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.645210] [] lock_acquire+0x12e/0x410 [ 27.650801] [] ? remove_wait_queue+0x14/0x40 [ 27.656824] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.663116] [] ? remove_wait_queue+0x14/0x40 [ 27.669141] [] remove_wait_queue+0x14/0x40 [ 27.674992] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.681968] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.689215] [] ? ep_free+0x1b0/0x1b0 [ 27.694542] [] ep_free+0x96/0x1b0 [ 27.699609] [] ? ep_free+0x1b0/0x1b0 [ 27.704938] [] ep_eventpoll_release+0x44/0x60 [ 27.711062] [] __fput+0x28c/0x6e0 [ 27.716131] [] ____fput+0x15/0x20 [ 27.721200] [] task_work_run+0x115/0x190 [ 27.726877] [] do_exit+0x7e7/0x2a40 [ 27.732122] [] ? __pmd_alloc+0x410/0x410 [ 27.737803] [] ? release_task+0x1240/0x1240 [ 27.743739] [] ? __do_page_fault+0x5ec/0xd40 [ 27.749769] [] ? up_read+0x1a/0x40 [ 27.754922] [] ? __do_page_fault+0x3bd/0xd40 [ 27.760946] [] do_group_exit+0x108/0x320 [ 27.766622] [] ? do_group_exit+0x320/0x320 [ 27.772485] [] SyS_exit_group+0x1d/0x20 [ 27.778075] [] do_fast_syscall_32+0x2f7/0x890 [ 27.784193] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.790831] [] entry_SYSENTER_compat+0x74/0x83 [ 27.797027] [ 27.798623] Allocated by task 3331: [ 27.802222] save_stack_trace+0x16/0x20 [ 27.806160] save_stack+0x43/0xd0 [ 27.809577] kasan_kmalloc+0xad/0xe0 [ 27.813255] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.817803] binder_get_thread+0x15d/0x750 [ 27.822000] binder_poll+0x4a/0x210 [ 27.825593] SyS_epoll_ctl+0x11d7/0x2190 [ 27.829618] do_fast_syscall_32+0x2f7/0x890 [ 27.833903] entry_SYSENTER_compat+0x74/0x83 [ 27.838273] [ 27.839868] Freed by task 3331: [ 27.843109] save_stack_trace+0x16/0x20 [ 27.847048] save_stack+0x43/0xd0 [ 27.850464] kasan_slab_free+0x72/0xc0 [ 27.854313] kfree+0x103/0x300 [ 27.857470] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.862278] binder_thread_release+0x27d/0x540 [ 27.866826] binder_ioctl+0x9c0/0x11b0 [ 27.870679] compat_SyS_ioctl+0x15f/0x2050 [ 27.874882] do_fast_syscall_32+0x2f7/0x890 [ 27.879181] entry_SYSENTER_compat+0x74/0x83 [ 27.883558] [ 27.885149] The buggy address belongs to the object at ffff8801cd185900 [ 27.885149] which belongs to the cache kmalloc-512 of size 512 [ 27.897775] The buggy address is located 184 bytes inside of [ 27.897775] 512-byte region [ffff8801cd185900, ffff8801cd185b00) [ 27.909620] The buggy address belongs to the page: [ 27.914514] page:ffffea0007346100 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.924672] flags: 0x8000000000004080(slab|head) [ 27.929391] page dumped because: kasan: bad access detected [ 27.935071] [ 27.936668] Memory state around the buggy address: [ 27.941561] ffff8801cd185880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.948891] ffff8801cd185900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.956215] >ffff8801cd185980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.963539] ^ [ 27.968691] ffff8801cd185a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.976013] ffff8801cd185a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.983335] ================================================================== [ 27.990656] Disabling lock debugging due to kernel taint [ 27.996067] Kernel panic - not syncing: panic_on_warn set ... [ 27.996067] [ 28.003407] CPU: 0 PID: 3331 Comm: syzkaller010285 Tainted: G B 4.9.76-g9154940 #20 [ 28.012301] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.021621] ffff8801c8ff77c8 ffffffff81d93149 ffffffff84195c17 ffff8801c8ff78a0 [ 28.029593] 0000000000000000 ffff8801cd1859b8 ffff8801cd1859b8 ffff8801c8ff7890 [ 28.037538] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 28.045493] Call Trace: [ 28.048054] [] dump_stack+0xc1/0x128 [ 28.053384] [] panic+0x1bc/0x3a8 [ 28.058366] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 28.066568] [] ? add_taint+0x40/0x50 [ 28.071908] [] kasan_end_report+0x50/0x50 [ 28.077678] [] kasan_report+0x167/0x360 [ 28.083275] [] ? __lock_acquire+0x2eff/0x3640 [ 28.089384] [] __asan_report_load8_noabort+0x14/0x20 [ 28.096129] [] __lock_acquire+0x2eff/0x3640 [ 28.102069] [] ? __lock_acquire+0x629/0x3640 [ 28.108093] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.115071] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.122047] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.129025] [] ? mark_held_locks+0xaf/0x100 [ 28.134964] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.141161] [] lock_acquire+0x12e/0x410 [ 28.146748] [] ? remove_wait_queue+0x14/0x40 [ 28.152770] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.159050] [] ? remove_wait_queue+0x14/0x40 [ 28.165069] [] remove_wait_queue+0x14/0x40 [ 28.170922] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.177908] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.185155] [] ? ep_free+0x1b0/0x1b0 [ 28.190500] [] ep_free+0x96/0x1b0 [ 28.195568] [] ? ep_free+0x1b0/0x1b0 [ 28.200905] [] ep_eventpoll_release+0x44/0x60 [ 28.207016] [] __fput+0x28c/0x6e0 [ 28.212092] [] ____fput+0x15/0x20 [ 28.217173] [] task_work_run+0x115/0x190 [ 28.222857] [] do_exit+0x7e7/0x2a40 [ 28.228100] [] ? __pmd_alloc+0x410/0x410 [ 28.233775] [] ? release_task+0x1240/0x1240 [ 28.239720] [] ? __do_page_fault+0x5ec/0xd40 [ 28.245754] [] ? up_read+0x1a/0x40 [ 28.250908] [] ? __do_page_fault+0x3bd/0xd40 [ 28.256931] [] do_group_exit+0x108/0x320 [ 28.262606] [] ? do_group_exit+0x320/0x320 [ 28.268466] [] SyS_exit_group+0x1d/0x20 [ 28.274066] [] do_fast_syscall_32+0x2f7/0x890 [ 28.280176] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.286808] [] entry_SYSENTER_compat+0x74/0x83 [ 28.293379] Dumping ftrace buffer: [ 28.296900] (ftrace buffer empty) [ 28.300579] Kernel Offset: disabled [ 28.304172] Rebooting in 86400 seconds..