[....] Starting enhanced syslogd: rsyslogd[ 10.655400] audit: type=1400 audit(1515919484.119:4): avc: denied { syslog } for pid=3182 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.15.196' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 38.294500] ================================================================== [ 38.295678] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 38.296590] Read of size 8 at addr ffff8801c8d025b8 by task syzkaller246200/3348 [ 38.297664] [ 38.297920] CPU: 1 PID: 3348 Comm: syzkaller246200 Not tainted 4.9.76-g8e170a5 #21 [ 38.298968] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 38.300314] ffff8801c820f870 ffffffff81d93149 ffffea0007234080 ffff8801c8d025b8 [ 38.301589] 0000000000000000 ffff8801c8d025b8 ffff8801c8d025b8 ffff8801c820f8a8 [ 38.302854] ffffffff8153cb43 ffff8801c8d025b8 0000000000000008 0000000000000000 [ 38.304138] Call Trace: [ 38.304508] [] dump_stack+0xc1/0x128 [ 38.305245] [] print_address_description+0x73/0x280 [ 38.306150] [] kasan_report+0x275/0x360 [ 38.306921] [] ? __lock_acquire+0x2eff/0x3640 [ 38.307829] [] __asan_report_load8_noabort+0x14/0x20 [ 38.308859] [] __lock_acquire+0x2eff/0x3640 [ 38.309779] [] ? __lock_acquire+0x629/0x3640 [ 38.310604] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.311642] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.312608] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.313553] [] ? mark_held_locks+0xaf/0x100 [ 38.314409] [] ? mutex_lock_nested+0x5e3/0x870 [ 38.319467] [] lock_acquire+0x12e/0x410 [ 38.325069] [] ? remove_wait_queue+0x14/0x40 [ 38.331114] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 38.337406] [] ? remove_wait_queue+0x14/0x40 [ 38.343440] [] remove_wait_queue+0x14/0x40 [ 38.349299] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 38.356302] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 38.363548] [] ? ep_free+0x1b0/0x1b0 [ 38.368900] [] ep_free+0x96/0x1b0 [ 38.373979] [] ? ep_free+0x1b0/0x1b0 [ 38.379318] [] ep_eventpoll_release+0x44/0x60 [ 38.385437] [] __fput+0x28c/0x6e0 [ 38.390525] [] ____fput+0x15/0x20 [ 38.395600] [] task_work_run+0x115/0x190 [ 38.401287] [] do_exit+0x7e7/0x2a40 [ 38.406549] [] ? __pmd_alloc+0x410/0x410 [ 38.412253] [] ? release_task+0x1240/0x1240 [ 38.418202] [] ? __do_page_fault+0x5ec/0xd40 [ 38.424233] [] ? up_read+0x1a/0x40 [ 38.429396] [] ? __do_page_fault+0x3bd/0xd40 [ 38.435436] [] do_group_exit+0x108/0x320 [ 38.441118] [] ? do_group_exit+0x320/0x320 [ 38.446974] [] SyS_exit_group+0x1d/0x20 [ 38.452573] [] do_fast_syscall_32+0x2f7/0x890 [ 38.458691] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.466199] [] entry_SYSENTER_compat+0x74/0x83 [ 38.472402] [ 38.474004] Allocated by task 3348: [ 38.477606] save_stack_trace+0x16/0x20 [ 38.481551] save_stack+0x43/0xd0 [ 38.484974] kasan_kmalloc+0xad/0xe0 [ 38.488658] kmem_cache_alloc_trace+0xfb/0x2a0 [ 38.493213] binder_get_thread+0x15d/0x750 [ 38.497416] binder_poll+0x4a/0x210 [ 38.501015] SyS_epoll_ctl+0x11d7/0x2190 [ 38.505064] do_fast_syscall_32+0x2f7/0x890 [ 38.509372] entry_SYSENTER_compat+0x74/0x83 [ 38.513749] [ 38.515346] Freed by task 3348: [ 38.518596] save_stack_trace+0x16/0x20 [ 38.522540] save_stack+0x43/0xd0 [ 38.525964] kasan_slab_free+0x72/0xc0 [ 38.529821] kfree+0x103/0x300 [ 38.532986] binder_thread_dec_tmpref+0x1cc/0x240 [ 38.537799] binder_thread_release+0x27d/0x540 [ 38.542361] binder_ioctl+0x9c0/0x11b0 [ 38.546218] compat_SyS_ioctl+0x15f/0x2050 [ 38.550440] do_fast_syscall_32+0x2f7/0x890 [ 38.554742] entry_SYSENTER_compat+0x74/0x83 [ 38.559118] [ 38.560718] The buggy address belongs to the object at ffff8801c8d02500 [ 38.560718] which belongs to the cache kmalloc-512 of size 512 [ 38.573432] The buggy address is located 184 bytes inside of [ 38.573432] 512-byte region [ffff8801c8d02500, ffff8801c8d02700) [ 38.585983] The buggy address belongs to the page: [ 38.590894] page:ffffea0007234080 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 38.601063] flags: 0x8000000000004080(slab|head) [ 38.605799] page dumped because: kasan: bad access detected [ 38.611477] [ 38.613074] Memory state around the buggy address: [ 38.617978] ffff8801c8d02480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 38.625309] ffff8801c8d02500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.632640] >ffff8801c8d02580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.639982] ^ [ 38.645158] ffff8801c8d02600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.652500] ffff8801c8d02680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.659829] ================================================================== [ 38.667167] Disabling lock debugging due to kernel taint [ 38.672587] Kernel panic - not syncing: panic_on_warn set ... [ 38.672587] [ 38.679925] CPU: 1 PID: 3348 Comm: syzkaller246200 Tainted: G B 4.9.76-g8e170a5 #21 [ 38.688818] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 38.698147] ffff8801c820f7c8 ffffffff81d93149 ffffffff84195c17 ffff8801c820f8a0 [ 38.706130] 0000000000000000 ffff8801c8d025b8 ffff8801c8d025b8 ffff8801c820f890 [ 38.714122] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 38.722105] Call Trace: [ 38.724669] [] dump_stack+0xc1/0x128 [ 38.730007] [] panic+0x1bc/0x3a8 [ 38.735003] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 38.743241] [] ? add_taint+0x40/0x50 [ 38.748591] [] kasan_end_report+0x50/0x50 [ 38.754362] [] kasan_report+0x167/0x360 [ 38.759962] [] ? __lock_acquire+0x2eff/0x3640 [ 38.766093] [] __asan_report_load8_noabort+0x14/0x20 [ 38.772820] [] __lock_acquire+0x2eff/0x3640 [ 38.778766] [] ? __lock_acquire+0x629/0x3640 [ 38.784808] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.791797] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.798782] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.805776] [] ? mark_held_locks+0xaf/0x100 [ 38.811722] [] ? mutex_lock_nested+0x5e3/0x870 [ 38.817928] [] lock_acquire+0x12e/0x410 [ 38.823526] [] ? remove_wait_queue+0x14/0x40 [ 38.829571] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 38.835860] [] ? remove_wait_queue+0x14/0x40 [ 38.841890] [] remove_wait_queue+0x14/0x40 [ 38.847752] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 38.854738] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 38.861982] [] ? ep_free+0x1b0/0x1b0 [ 38.867329] [] ep_free+0x96/0x1b0 [ 38.872406] [] ? ep_free+0x1b0/0x1b0 [ 38.877740] [] ep_eventpoll_release+0x44/0x60 [ 38.883870] [] __fput+0x28c/0x6e0 [ 38.888946] [] ____fput+0x15/0x20 [ 38.894025] [] task_work_run+0x115/0x190 [ 38.899708] [] do_exit+0x7e7/0x2a40 [ 38.904976] [] ? __pmd_alloc+0x410/0x410 [ 38.910662] [] ? release_task+0x1240/0x1240 [ 38.916610] [] ? __do_page_fault+0x5ec/0xd40 [ 38.922642] [] ? up_read+0x1a/0x40 [ 38.927804] [] ? __do_page_fault+0x3bd/0xd40 [ 38.933843] [] do_group_exit+0x108/0x320 [ 38.939527] [] ? do_group_exit+0x320/0x320 [ 38.945382] [] SyS_exit_group+0x1d/0x20 [ 38.950982] [] do_fast_syscall_32+0x2f7/0x890 [ 38.957101] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.963740] [] entry_SYSENTER_compat+0x74/0x83 [ 38.970398] Dumping ftrace buffer: [ 38.973923] (ftrace buffer empty) [ 38.977609] Kernel Offset: disabled [ 38.981208] Rebooting in 86400 seconds..