[....] Starting enhanced syslogd: rsyslogd[ 10.443473] audit: type=1400 audit(1516970778.486:4): avc: denied { syslog } for pid=3169 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.59' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.129014] ================================================================== [ 20.130149] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.131047] Read of size 8 at addr ffff8801c91aed38 by task syzkaller692351/3318 [ 20.132033] [ 20.132265] CPU: 0 PID: 3318 Comm: syzkaller692351 Not tainted 4.9.78-gf518fe4 #31 [ 20.133296] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.134527] ffff8801c8f6f870 ffffffff81d943a9 ffffea0007246b80 ffff8801c91aed38 [ 20.135759] 0000000000000000 ffff8801c91aed38 ffff8801c91aed38 ffff8801c8f6f8a8 [ 20.136991] ffffffff8153dc23 ffff8801c91aed38 0000000000000008 0000000000000000 [ 20.138199] Call Trace: [ 20.138580] [] dump_stack+0xc1/0x128 [ 20.139355] [] print_address_description+0x73/0x280 [ 20.140324] [] kasan_report+0x275/0x360 [ 20.141082] [] ? __lock_acquire+0x2eff/0x3640 [ 20.141989] [] __asan_report_load8_noabort+0x14/0x20 [ 20.142894] [] __lock_acquire+0x2eff/0x3640 [ 20.143683] [] ? __lock_acquire+0x629/0x3640 [ 20.144484] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.145421] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.146368] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.147291] [] ? mark_held_locks+0xaf/0x100 [ 20.148090] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.148910] [] lock_acquire+0x12e/0x410 [ 20.153239] [] ? remove_wait_queue+0x14/0x40 [ 20.159264] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.165551] [] ? remove_wait_queue+0x14/0x40 [ 20.171577] [] remove_wait_queue+0x14/0x40 [ 20.177430] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.184411] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.191651] [] ? ep_free+0x1b0/0x1b0 [ 20.196981] [] ep_free+0x96/0x1b0 [ 20.202049] [] ? ep_free+0x1b0/0x1b0 [ 20.207380] [] ep_eventpoll_release+0x44/0x60 [ 20.213491] [] __fput+0x28c/0x6e0 [ 20.218566] [] ____fput+0x15/0x20 [ 20.223637] [] task_work_run+0x115/0x190 [ 20.229316] [] do_exit+0x7e7/0x2a40 [ 20.234558] [] ? __pmd_alloc+0x410/0x410 [ 20.240236] [] ? release_task+0x1240/0x1240 [ 20.246175] [] ? __do_page_fault+0x5ec/0xd40 [ 20.252200] [] ? up_read+0x1a/0x40 [ 20.257356] [] ? __do_page_fault+0x3bd/0xd40 [ 20.263380] [] do_group_exit+0x108/0x320 [ 20.269058] [] ? do_group_exit+0x320/0x320 [ 20.274908] [] SyS_exit_group+0x1d/0x20 [ 20.280506] [] do_fast_syscall_32+0x2f7/0x890 [ 20.286620] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.293255] [] entry_SYSENTER_compat+0x74/0x83 [ 20.299450] [ 20.301045] Allocated by task 3318: [ 20.304641] save_stack_trace+0x16/0x20 [ 20.308584] save_stack+0x43/0xd0 [ 20.312002] kasan_kmalloc+0xad/0xe0 [ 20.315681] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.320232] binder_get_thread+0x15d/0x750 [ 20.324430] binder_poll+0x4a/0x210 [ 20.328023] SyS_epoll_ctl+0x11d7/0x2190 [ 20.332057] do_fast_syscall_32+0x2f7/0x890 [ 20.336344] entry_SYSENTER_compat+0x74/0x83 [ 20.340714] [ 20.342307] Freed by task 3318: [ 20.345553] save_stack_trace+0x16/0x20 [ 20.349507] save_stack+0x43/0xd0 [ 20.352924] kasan_slab_free+0x72/0xc0 [ 20.356776] kfree+0x103/0x300 [ 20.359934] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.364742] binder_thread_release+0x27d/0x540 [ 20.369290] binder_ioctl+0x9c0/0x11b0 [ 20.373142] compat_SyS_ioctl+0x15f/0x2050 [ 20.377342] do_fast_syscall_32+0x2f7/0x890 [ 20.381629] entry_SYSENTER_compat+0x74/0x83 [ 20.385999] [ 20.387602] The buggy address belongs to the object at ffff8801c91aec80 [ 20.387602] which belongs to the cache kmalloc-512 of size 512 [ 20.400231] The buggy address is located 184 bytes inside of [ 20.400231] 512-byte region [ffff8801c91aec80, ffff8801c91aee80) [ 20.412075] The buggy address belongs to the page: [ 20.416971] page:ffffea0007246b80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.427137] flags: 0x8000000000004080(slab|head) [ 20.431857] page dumped because: kasan: bad access detected [ 20.437532] [ 20.439128] Memory state around the buggy address: [ 20.444025] ffff8801c91aec00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.451348] ffff8801c91aec80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.458674] >ffff8801c91aed00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.466014] ^ [ 20.471169] ffff8801c91aed80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.478498] ffff8801c91aee00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.485822] ================================================================== [ 20.493156] Disabling lock debugging due to kernel taint [ 20.498572] Kernel panic - not syncing: panic_on_warn set ... [ 20.498572] [ 20.505902] CPU: 0 PID: 3318 Comm: syzkaller692351 Tainted: G B 4.9.78-gf518fe4 #31 [ 20.514791] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.524115] ffff8801c8f6f7c8 ffffffff81d943a9 ffffffff841971bf ffff8801c8f6f8a0 [ 20.532080] 0000000000000000 ffff8801c91aed38 ffff8801c91aed38 ffff8801c8f6f890 [ 20.540048] ffffffff8142f451 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f295 [ 20.548013] Call Trace: [ 20.550571] [] dump_stack+0xc1/0x128 [ 20.555910] [] panic+0x1bc/0x3a8 [ 20.560893] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.569087] [] ? add_taint+0x40/0x50 [ 20.574419] [] kasan_end_report+0x50/0x50 [ 20.580184] [] kasan_report+0x167/0x360 [ 20.585775] [] ? __lock_acquire+0x2eff/0x3640 [ 20.591886] [] __asan_report_load8_noabort+0x14/0x20 [ 20.598607] [] __lock_acquire+0x2eff/0x3640 [ 20.604544] [] ? __lock_acquire+0x629/0x3640 [ 20.610569] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.617551] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.624532] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.631512] [] ? mark_held_locks+0xaf/0x100 [ 20.637450] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.643646] [] lock_acquire+0x12e/0x410 [ 20.649239] [] ? remove_wait_queue+0x14/0x40 [ 20.655264] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.661551] [] ? remove_wait_queue+0x14/0x40 [ 20.667576] [] remove_wait_queue+0x14/0x40 [ 20.673431] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.680413] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.687655] [] ? ep_free+0x1b0/0x1b0 [ 20.692985] [] ep_free+0x96/0x1b0 [ 20.698056] [] ? ep_free+0x1b0/0x1b0 [ 20.703735] [] ep_eventpoll_release+0x44/0x60 [ 20.709850] [] __fput+0x28c/0x6e0 [ 20.714921] [] ____fput+0x15/0x20 [ 20.719989] [] task_work_run+0x115/0x190 [ 20.725669] [] do_exit+0x7e7/0x2a40 [ 20.730913] [] ? __pmd_alloc+0x410/0x410 [ 20.736592] [] ? release_task+0x1240/0x1240 [ 20.742534] [] ? __do_page_fault+0x5ec/0xd40 [ 20.748561] [] ? up_read+0x1a/0x40 [ 20.753718] [] ? __do_page_fault+0x3bd/0xd40 [ 20.759744] [] do_group_exit+0x108/0x320 [ 20.765420] [] ? do_group_exit+0x320/0x320 [ 20.771271] [] SyS_exit_group+0x1d/0x20 [ 20.776865] [] do_fast_syscall_32+0x2f7/0x890 [ 20.782977] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.789620] [] entry_SYSENTER_compat+0x74/0x83 [ 20.796237] Dumping ftrace buffer: [ 20.799748] (ftrace buffer empty) [ 20.803424] Kernel Offset: disabled [ 20.807018] Rebooting in 86400 seconds..