[....] Starting enhanced syslogd: rsyslogd[ 11.508329] audit: type=1400 audit(1516435120.609:4): avc: denied { syslog } for pid=3189 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.27' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.090348] ================================================================== [ 20.091449] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.092344] Read of size 8 at addr ffff8801cdee6d38 by task syzkaller429344/3338 [ 20.093364] [ 20.093599] CPU: 1 PID: 3338 Comm: syzkaller429344 Not tainted 4.9.77-ge12a9c4 #27 [ 20.094620] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.095843] ffff8801cd5cf870 ffffffff81d941c9 ffffea000737b980 ffff8801cdee6d38 [ 20.097046] 0000000000000000 ffff8801cdee6d38 ffff8801cdee6d38 ffff8801cd5cf8a8 [ 20.098189] ffffffff8153db93 ffff8801cdee6d38 0000000000000008 0000000000000000 [ 20.099353] Call Trace: [ 20.099713] [] dump_stack+0xc1/0x128 [ 20.100428] [] print_address_description+0x73/0x280 [ 20.101327] [] kasan_report+0x275/0x360 [ 20.102072] [] ? __lock_acquire+0x2eff/0x3640 [ 20.102922] [] __asan_report_load8_noabort+0x14/0x20 [ 20.103849] [] __lock_acquire+0x2eff/0x3640 [ 20.104688] [] ? __lock_acquire+0x629/0x3640 [ 20.105492] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.106444] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.107386] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.108338] [] ? mark_held_locks+0xaf/0x100 [ 20.109129] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.109970] [] lock_acquire+0x12e/0x410 [ 20.112409] [] ? remove_wait_queue+0x14/0x40 [ 20.118437] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.124727] [] ? remove_wait_queue+0x14/0x40 [ 20.130762] [] remove_wait_queue+0x14/0x40 [ 20.136620] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.143604] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.150845] [] ? ep_free+0x1b0/0x1b0 [ 20.156184] [] ep_free+0x96/0x1b0 [ 20.161257] [] ? ep_free+0x1b0/0x1b0 [ 20.166591] [] ep_eventpoll_release+0x44/0x60 [ 20.172713] [] __fput+0x28c/0x6e0 [ 20.177785] [] ____fput+0x15/0x20 [ 20.182859] [] task_work_run+0x115/0x190 [ 20.188541] [] do_exit+0x7e7/0x2a40 [ 20.193788] [] ? __pmd_alloc+0x410/0x410 [ 20.199482] [] ? release_task+0x1240/0x1240 [ 20.205423] [] ? __do_page_fault+0x5ec/0xd40 [ 20.211450] [] ? up_read+0x1a/0x40 [ 20.216612] [] ? __do_page_fault+0x3bd/0xd40 [ 20.222640] [] do_group_exit+0x108/0x320 [ 20.228319] [] ? do_group_exit+0x320/0x320 [ 20.234172] [] SyS_exit_group+0x1d/0x20 [ 20.239768] [] do_fast_syscall_32+0x2f7/0x890 [ 20.245883] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.252527] [] entry_SYSENTER_compat+0x74/0x83 [ 20.258730] [ 20.260328] Allocated by task 3338: [ 20.263923] save_stack_trace+0x16/0x20 [ 20.267864] save_stack+0x43/0xd0 [ 20.271283] kasan_kmalloc+0xad/0xe0 [ 20.274967] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.279517] binder_get_thread+0x15d/0x750 [ 20.283721] binder_poll+0x4a/0x210 [ 20.287316] SyS_epoll_ctl+0x11d7/0x2190 [ 20.291345] do_fast_syscall_32+0x2f7/0x890 [ 20.295638] entry_SYSENTER_compat+0x74/0x83 [ 20.300011] [ 20.301606] Freed by task 3338: [ 20.304856] save_stack_trace+0x16/0x20 [ 20.308796] save_stack+0x43/0xd0 [ 20.312216] kasan_slab_free+0x72/0xc0 [ 20.316072] kfree+0x103/0x300 [ 20.319237] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.324049] binder_thread_release+0x27d/0x540 [ 20.328597] binder_ioctl+0x9c0/0x11b0 [ 20.332455] compat_SyS_ioctl+0x15f/0x2050 [ 20.336664] do_fast_syscall_32+0x2f7/0x890 [ 20.340954] entry_SYSENTER_compat+0x74/0x83 [ 20.345339] [ 20.346941] The buggy address belongs to the object at ffff8801cdee6c80 [ 20.346941] which belongs to the cache kmalloc-512 of size 512 [ 20.359566] The buggy address is located 184 bytes inside of [ 20.359566] 512-byte region [ffff8801cdee6c80, ffff8801cdee6e80) [ 20.371418] The buggy address belongs to the page: [ 20.376316] page:ffffea000737b980 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.386496] flags: 0x8000000000004080(slab|head) [ 20.391236] page dumped because: kasan: bad access detected [ 20.396924] [ 20.398520] Memory state around the buggy address: [ 20.403416] ffff8801cdee6c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.410756] ffff8801cdee6c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.418084] >ffff8801cdee6d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.425411] ^ [ 20.430569] ffff8801cdee6d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.437898] ffff8801cdee6e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.445228] ================================================================== [ 20.452555] Disabling lock debugging due to kernel taint [ 20.457972] Kernel panic - not syncing: panic_on_warn set ... [ 20.457972] [ 20.465303] CPU: 1 PID: 3338 Comm: syzkaller429344 Tainted: G B 4.9.77-ge12a9c4 #27 [ 20.474201] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.483531] ffff8801cd5cf7c8 ffffffff81d941c9 ffffffff841970ff ffff8801cd5cf8a0 [ 20.491503] 0000000000000000 ffff8801cdee6d38 ffff8801cdee6d38 ffff8801cd5cf890 [ 20.499471] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 20.507432] Call Trace: [ 20.509992] [] dump_stack+0xc1/0x128 [ 20.515348] [] panic+0x1bc/0x3a8 [ 20.520333] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.528532] [] ? add_taint+0x40/0x50 [ 20.533869] [] kasan_end_report+0x50/0x50 [ 20.539638] [] kasan_report+0x167/0x360 [ 20.545235] [] ? __lock_acquire+0x2eff/0x3640 [ 20.551351] [] __asan_report_load8_noabort+0x14/0x20 [ 20.558076] [] __lock_acquire+0x2eff/0x3640 [ 20.564018] [] ? __lock_acquire+0x629/0x3640 [ 20.570047] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.577032] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.584028] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.591018] [] ? mark_held_locks+0xaf/0x100 [ 20.596972] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.603180] [] lock_acquire+0x12e/0x410 [ 20.608772] [] ? remove_wait_queue+0x14/0x40 [ 20.614800] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.621090] [] ? remove_wait_queue+0x14/0x40 [ 20.627117] [] remove_wait_queue+0x14/0x40 [ 20.632975] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.639960] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.647203] [] ? ep_free+0x1b0/0x1b0 [ 20.652537] [] ep_free+0x96/0x1b0 [ 20.657611] [] ? ep_free+0x1b0/0x1b0 [ 20.662947] [] ep_eventpoll_release+0x44/0x60 [ 20.669068] [] __fput+0x28c/0x6e0 [ 20.674149] [] ____fput+0x15/0x20 [ 20.679223] [] task_work_run+0x115/0x190 [ 20.684905] [] do_exit+0x7e7/0x2a40 [ 20.690151] [] ? __pmd_alloc+0x410/0x410 [ 20.695836] [] ? release_task+0x1240/0x1240 [ 20.701777] [] ? __do_page_fault+0x5ec/0xd40 [ 20.707805] [] ? up_read+0x1a/0x40 [ 20.712964] [] ? __do_page_fault+0x3bd/0xd40 [ 20.719004] [] do_group_exit+0x108/0x320 [ 20.724686] [] ? do_group_exit+0x320/0x320 [ 20.730537] [] SyS_exit_group+0x1d/0x20 [ 20.736136] [] do_fast_syscall_32+0x2f7/0x890 [ 20.742248] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.748885] [] entry_SYSENTER_compat+0x74/0x83 [ 20.755508] Dumping ftrace buffer: [ 20.759024] (ftrace buffer empty) [ 20.762705] Kernel Offset: disabled [ 20.766302] Rebooting in 86400 seconds..