[....] Starting enhanced syslogd: rsyslogd[ 11.012639] audit: type=1400 audit(1516159997.543:4): avc: denied { syslog } for pid=3168 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.216' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.203558] ================================================================== [ 20.204660] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.205535] Read of size 8 at addr ffff8801c97a34b8 by task syzkaller111375/3318 [ 20.206537] [ 20.206767] CPU: 0 PID: 3318 Comm: syzkaller111375 Not tainted 4.9.76-g8dec074 #23 [ 20.207772] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.209019] ffff8801c9faf870 ffffffff81d93169 ffffea000725e880 ffff8801c97a34b8 [ 20.210163] 0000000000000000 ffff8801c97a34b8 ffff8801c97a34b8 ffff8801c9faf8a8 [ 20.211290] ffffffff8153cb43 ffff8801c97a34b8 0000000000000008 0000000000000000 [ 20.212436] Call Trace: [ 20.212792] [] dump_stack+0xc1/0x128 [ 20.213556] [] print_address_description+0x73/0x280 [ 20.214450] [] kasan_report+0x275/0x360 [ 20.215202] [] ? __lock_acquire+0x2eff/0x3640 [ 20.216008] [] __asan_report_load8_noabort+0x14/0x20 [ 20.216896] [] __lock_acquire+0x2eff/0x3640 [ 20.217772] [] ? __lock_acquire+0x629/0x3640 [ 20.218584] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.219501] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.220453] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.221434] [] ? mark_held_locks+0xaf/0x100 [ 20.222221] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.223066] [] lock_acquire+0x12e/0x410 [ 20.223828] [] ? remove_wait_queue+0x14/0x40 [ 20.229848] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.236130] [] ? remove_wait_queue+0x14/0x40 [ 20.242151] [] remove_wait_queue+0x14/0x40 [ 20.248002] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.254976] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.262218] [] ? ep_free+0x1b0/0x1b0 [ 20.267545] [] ep_free+0x96/0x1b0 [ 20.272611] [] ? ep_free+0x1b0/0x1b0 [ 20.277940] [] ep_eventpoll_release+0x44/0x60 [ 20.284050] [] __fput+0x28c/0x6e0 [ 20.289117] [] ____fput+0x15/0x20 [ 20.294182] [] task_work_run+0x115/0x190 [ 20.299862] [] do_exit+0x7e7/0x2a40 [ 20.305103] [] ? __pmd_alloc+0x410/0x410 [ 20.310777] [] ? release_task+0x1240/0x1240 [ 20.316715] [] ? __do_page_fault+0x5ec/0xd40 [ 20.322736] [] ? up_read+0x1a/0x40 [ 20.327891] [] ? __do_page_fault+0x3bd/0xd40 [ 20.333916] [] do_group_exit+0x108/0x320 [ 20.339591] [] ? do_group_exit+0x320/0x320 [ 20.345438] [] SyS_exit_group+0x1d/0x20 [ 20.351027] [] do_fast_syscall_32+0x2f7/0x890 [ 20.357132] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.363761] [] entry_SYSENTER_compat+0x74/0x83 [ 20.369956] [ 20.371548] Allocated by task 3318: [ 20.375140] save_stack_trace+0x16/0x20 [ 20.379165] save_stack+0x43/0xd0 [ 20.382579] kasan_kmalloc+0xad/0xe0 [ 20.386255] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.390801] binder_get_thread+0x15d/0x750 [ 20.395002] binder_poll+0x4a/0x210 [ 20.398599] SyS_epoll_ctl+0x11d7/0x2190 [ 20.402623] do_fast_syscall_32+0x2f7/0x890 [ 20.406907] entry_SYSENTER_compat+0x74/0x83 [ 20.411276] [ 20.412868] Freed by task 3318: [ 20.416110] save_stack_trace+0x16/0x20 [ 20.420049] save_stack+0x43/0xd0 [ 20.423465] kasan_slab_free+0x72/0xc0 [ 20.427317] kfree+0x103/0x300 [ 20.430472] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.435276] binder_thread_release+0x27d/0x540 [ 20.439820] binder_ioctl+0x9c0/0x11b0 [ 20.443672] compat_SyS_ioctl+0x15f/0x2050 [ 20.447869] do_fast_syscall_32+0x2f7/0x890 [ 20.452156] entry_SYSENTER_compat+0x74/0x83 [ 20.456524] [ 20.458130] The buggy address belongs to the object at ffff8801c97a3400 [ 20.458130] which belongs to the cache kmalloc-512 of size 512 [ 20.470748] The buggy address is located 184 bytes inside of [ 20.470748] 512-byte region [ffff8801c97a3400, ffff8801c97a3600) [ 20.482588] The buggy address belongs to the page: [ 20.487494] page:ffffea000725e880 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.498425] flags: 0x8000000000004080(slab|head) [ 20.503140] page dumped because: kasan: bad access detected [ 20.508810] [ 20.510400] Memory state around the buggy address: [ 20.515291] ffff8801c97a3380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.522614] ffff8801c97a3400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.529936] >ffff8801c97a3480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.537257] ^ [ 20.542414] ffff8801c97a3500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.549734] ffff8801c97a3580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.557068] ================================================================== [ 20.564389] Disabling lock debugging due to kernel taint [ 20.569804] Kernel panic - not syncing: panic_on_warn set ... [ 20.569804] [ 20.577129] CPU: 0 PID: 3318 Comm: syzkaller111375 Tainted: G B 4.9.76-g8dec074 #23 [ 20.586019] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.595338] ffff8801c9faf7c8 ffffffff81d93169 ffffffff84195c2f ffff8801c9faf8a0 [ 20.603282] 0000000000000000 ffff8801c97a34b8 ffff8801c97a34b8 ffff8801c9faf890 [ 20.611226] ffffffff8142e371 0000000041b58ab3 ffffffff84189690 ffffffff8142e1b5 [ 20.619178] Call Trace: [ 20.621732] [] dump_stack+0xc1/0x128 [ 20.627061] [] panic+0x1bc/0x3a8 [ 20.632044] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.640238] [] ? add_taint+0x40/0x50 [ 20.645566] [] kasan_end_report+0x50/0x50 [ 20.651327] [] kasan_report+0x167/0x360 [ 20.656914] [] ? __lock_acquire+0x2eff/0x3640 [ 20.663035] [] __asan_report_load8_noabort+0x14/0x20 [ 20.669755] [] __lock_acquire+0x2eff/0x3640 [ 20.675691] [] ? __lock_acquire+0x629/0x3640 [ 20.681719] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.688696] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.695676] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.702654] [] ? mark_held_locks+0xaf/0x100 [ 20.708589] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.714783] [] lock_acquire+0x12e/0x410 [ 20.720368] [] ? remove_wait_queue+0x14/0x40 [ 20.726390] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.732673] [] ? remove_wait_queue+0x14/0x40 [ 20.739303] [] remove_wait_queue+0x14/0x40 [ 20.745152] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.752133] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.759380] [] ? ep_free+0x1b0/0x1b0 [ 20.764713] [] ep_free+0x96/0x1b0 [ 20.769777] [] ? ep_free+0x1b0/0x1b0 [ 20.775104] [] ep_eventpoll_release+0x44/0x60 [ 20.781211] [] __fput+0x28c/0x6e0 [ 20.786277] [] ____fput+0x15/0x20 [ 20.791345] [] task_work_run+0x115/0x190 [ 20.797018] [] do_exit+0x7e7/0x2a40 [ 20.802258] [] ? __pmd_alloc+0x410/0x410 [ 20.807930] [] ? release_task+0x1240/0x1240 [ 20.813866] [] ? __do_page_fault+0x5ec/0xd40 [ 20.819975] [] ? up_read+0x1a/0x40 [ 20.825129] [] ? __do_page_fault+0x3bd/0xd40 [ 20.831151] [] do_group_exit+0x108/0x320 [ 20.836830] [] ? do_group_exit+0x320/0x320 [ 20.842677] [] SyS_exit_group+0x1d/0x20 [ 20.848272] [] do_fast_syscall_32+0x2f7/0x890 [ 20.854378] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.861020] [] entry_SYSENTER_compat+0x74/0x83 [ 20.867251] Dumping ftrace buffer: [ 20.870755] (ftrace buffer empty) [ 20.874427] Kernel Offset: disabled [ 20.878033] Rebooting in 86400 seconds..