[ 10.561552] audit: type=1400 audit(1514838605.042:4): avc: denied { syslog } for pid=3166 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [....] Starting enhanced syslogd: rsyslogd[?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.20' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 34.175304] ================================================================== [ 34.176525] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 34.177431] Read of size 8 at addr ffff8801caa0f9b8 by task syzkaller886303/3340 [ 34.178477] [ 34.178708] CPU: 1 PID: 3340 Comm: syzkaller886303 Not tainted 4.9.73-gf3f3457 #1 [ 34.179724] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.180971] ffff8801c78f78e0 ffffffff81d922b9 ffffea00072a8380 ffff8801caa0f9b8 [ 34.182133] 0000000000000000 ffff8801caa0f9b8 ffff8801caa0f9b8 ffff8801c78f7918 [ 34.183277] ffffffff8153bab3 ffff8801caa0f9b8 0000000000000008 0000000000000000 [ 34.184426] Call Trace: [ 34.184783] [] dump_stack+0xc1/0x128 [ 34.185495] [] print_address_description+0x73/0x280 [ 34.186370] [] kasan_report+0x275/0x360 [ 34.187124] [] ? __lock_acquire+0x2eff/0x3640 [ 34.187946] [] __asan_report_load8_noabort+0x14/0x20 [ 34.188843] [] __lock_acquire+0x2eff/0x3640 [ 34.189629] [] ? __lock_acquire+0x629/0x3640 [ 34.190428] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 34.191371] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 34.192322] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 34.193242] [] ? mark_held_locks+0xaf/0x100 [ 34.194046] [] ? mutex_lock_nested+0x5e3/0x870 [ 34.194898] [] lock_acquire+0x12e/0x410 [ 34.197379] [] ? remove_wait_queue+0x14/0x40 [ 34.203411] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 34.209695] [] ? remove_wait_queue+0x14/0x40 [ 34.215719] [] remove_wait_queue+0x14/0x40 [ 34.221572] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 34.228550] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 34.235789] [] ? ep_free+0x1b0/0x1b0 [ 34.241115] [] ep_free+0x96/0x1b0 [ 34.246182] [] ? ep_free+0x1b0/0x1b0 [ 34.251519] [] ep_eventpoll_release+0x44/0x60 [ 34.257629] [] __fput+0x28c/0x6e0 [ 34.262698] [] ____fput+0x15/0x20 [ 34.267767] [] task_work_run+0x115/0x190 [ 34.273446] [] do_exit+0x7e7/0x2a40 [ 34.278691] [] ? selinux_file_ioctl+0x355/0x530 [ 34.284975] [] ? release_task+0x1240/0x1240 [ 34.290914] [] ? SyS_epoll_create+0x190/0x190 [ 34.297025] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 34.303660] [] do_group_exit+0x108/0x320 [ 34.309338] [] SyS_exit_group+0x1d/0x20 [ 34.314926] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 34.321483] [ 34.323081] Allocated by task 3340: [ 34.326673] save_stack_trace+0x16/0x20 [ 34.330616] save_stack+0x43/0xd0 [ 34.334033] kasan_kmalloc+0xad/0xe0 [ 34.337719] kmem_cache_alloc_trace+0xfb/0x2a0 [ 34.342268] binder_get_thread+0x15d/0x750 [ 34.346467] binder_poll+0x4a/0x210 [ 34.350062] SyS_epoll_ctl+0x11d7/0x2190 [ 34.354089] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 34.358807] [ 34.360401] Freed by task 3340: [ 34.363646] save_stack_trace+0x16/0x20 [ 34.367585] save_stack+0x43/0xd0 [ 34.371012] kasan_slab_free+0x72/0xc0 [ 34.374872] kfree+0x103/0x300 [ 34.378900] binder_thread_dec_tmpref+0x1cc/0x240 [ 34.383729] binder_thread_release+0x27d/0x540 [ 34.388276] binder_ioctl+0x9c0/0x11b0 [ 34.392128] do_vfs_ioctl+0x1aa/0x1140 [ 34.395990] SyS_ioctl+0x8f/0xc0 [ 34.399330] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 34.404059] [ 34.405656] The buggy address belongs to the object at ffff8801caa0f900 [ 34.405656] which belongs to the cache kmalloc-512 of size 512 [ 34.418285] The buggy address is located 184 bytes inside of [ 34.418285] 512-byte region [ffff8801caa0f900, ffff8801caa0fb00) [ 34.430136] The buggy address belongs to the page: [ 34.435044] page:ffffea00072a8380 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 34.445203] flags: 0x8000000000004080(slab|head) [ 34.449921] page dumped because: kasan: bad access detected [ 34.455594] [ 34.457185] Memory state around the buggy address: [ 34.462079] ffff8801caa0f880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 34.469415] ffff8801caa0f900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.476739] >ffff8801caa0f980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.484066] ^ [ 34.489220] ffff8801caa0fa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.496543] ffff8801caa0fa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.503865] ================================================================== [ 34.511209] Disabling lock debugging due to kernel taint [ 34.516634] Kernel panic - not syncing: panic_on_warn set ... [ 34.516634] [ 34.523963] CPU: 1 PID: 3340 Comm: syzkaller886303 Tainted: G B 4.9.73-gf3f3457 #1 [ 34.532764] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.542085] ffff8801c78f7838 ffffffff81d922b9 ffffffff841955bf ffff8801c78f7910 [ 34.550050] 0000000000000000 ffff8801caa0f9b8 ffff8801caa0f9b8 ffff8801c78f7900 [ 34.558010] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 34.565972] Call Trace: [ 34.568529] [] dump_stack+0xc1/0x128 [ 34.573857] [] panic+0x1bc/0x3a8 [ 34.578840] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 34.587642] [] ? add_taint+0x40/0x50 [ 34.592985] [] kasan_end_report+0x50/0x50 [ 34.598749] [] kasan_report+0x167/0x360 [ 34.604340] [] ? __lock_acquire+0x2eff/0x3640 [ 34.610458] [] __asan_report_load8_noabort+0x14/0x20 [ 34.617175] [] __lock_acquire+0x2eff/0x3640 [ 34.623112] [] ? __lock_acquire+0x629/0x3640 [ 34.629136] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 34.636122] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 34.643101] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 34.650082] [] ? mark_held_locks+0xaf/0x100 [ 34.656033] [] ? mutex_lock_nested+0x5e3/0x870 [ 34.662242] [] lock_acquire+0x12e/0x410 [ 34.667839] [] ? remove_wait_queue+0x14/0x40 [ 34.673874] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 34.680157] [] ? remove_wait_queue+0x14/0x40 [ 34.686180] [] remove_wait_queue+0x14/0x40 [ 34.692035] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 34.699027] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 34.706276] [] ? ep_free+0x1b0/0x1b0 [ 34.711619] [] ep_free+0x96/0x1b0 [ 34.716689] [] ? ep_free+0x1b0/0x1b0 [ 34.722021] [] ep_eventpoll_release+0x44/0x60 [ 34.728131] [] __fput+0x28c/0x6e0 [ 34.733200] [] ____fput+0x15/0x20 [ 34.738266] [] task_work_run+0x115/0x190 [ 34.743945] [] do_exit+0x7e7/0x2a40 [ 34.749197] [] ? selinux_file_ioctl+0x355/0x530 [ 34.755492] [] ? release_task+0x1240/0x1240 [ 34.761442] [] ? SyS_epoll_create+0x190/0x190 [ 34.767553] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 34.774187] [] do_group_exit+0x108/0x320 [ 34.779865] [] SyS_exit_group+0x1d/0x20 [ 34.785629] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 34.792215] Dumping ftrace buffer: [ 34.795722] (ftrace buffer empty) [ 34.799399] Kernel Offset: disabled [ 34.802991] Rebooting in 86400 seconds..