[....] Starting enhanced syslogd: rsyslogd[ 10.768472] audit: type=1400 audit(1516333032.390: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.18' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.209248] ================================================================== [ 20.210376] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.211294] Read of size 8 at addr ffff8801cc87e338 by task syzkaller557404/3318 [ 20.212291] [ 20.212525] CPU: 0 PID: 3318 Comm: syzkaller557404 Not tainted 4.9.77-g8788313 #25 [ 20.213561] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.214803] ffff8801c883f870 ffffffff81d941c9 ffffea0007321f80 ffff8801cc87e338 [ 20.215960] 0000000000000000 ffff8801cc87e338 ffff8801cc87e338 ffff8801c883f8a8 [ 20.217166] ffffffff8153db93 ffff8801cc87e338 0000000000000008 0000000000000000 [ 20.218510] Call Trace: [ 20.218870] [] dump_stack+0xc1/0x128 [ 20.219609] [] print_address_description+0x73/0x280 [ 20.220505] [] kasan_report+0x275/0x360 [ 20.221305] [] ? __lock_acquire+0x2eff/0x3640 [ 20.222118] [] __asan_report_load8_noabort+0x14/0x20 [ 20.223015] [] __lock_acquire+0x2eff/0x3640 [ 20.223808] [] ? __lock_acquire+0x629/0x3640 [ 20.224714] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.225649] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.226619] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.227605] [] ? mark_held_locks+0xaf/0x100 [ 20.228407] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.229231] [] lock_acquire+0x12e/0x410 [ 20.229976] [] ? remove_wait_queue+0x14/0x40 [ 20.236008] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.242295] [] ? remove_wait_queue+0x14/0x40 [ 20.248322] [] remove_wait_queue+0x14/0x40 [ 20.254178] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.261159] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.268407] [] ? ep_free+0x1b0/0x1b0 [ 20.273746] [] ep_free+0x96/0x1b0 [ 20.278819] [] ? ep_free+0x1b0/0x1b0 [ 20.284150] [] ep_eventpoll_release+0x44/0x60 [ 20.290265] [] __fput+0x28c/0x6e0 [ 20.295343] [] ____fput+0x15/0x20 [ 20.300421] [] task_work_run+0x115/0x190 [ 20.306114] [] do_exit+0x7e7/0x2a40 [ 20.311360] [] ? __pmd_alloc+0x410/0x410 [ 20.317040] [] ? release_task+0x1240/0x1240 [ 20.322980] [] ? __do_page_fault+0x5ec/0xd40 [ 20.329026] [] ? up_read+0x1a/0x40 [ 20.334187] [] ? __do_page_fault+0x3bd/0xd40 [ 20.340214] [] do_group_exit+0x108/0x320 [ 20.345895] [] ? do_group_exit+0x320/0x320 [ 20.351760] [] SyS_exit_group+0x1d/0x20 [ 20.357379] [] do_fast_syscall_32+0x2f7/0x890 [ 20.363523] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.370187] [] entry_SYSENTER_compat+0x74/0x83 [ 20.376390] [ 20.377996] Allocated by task 3318: [ 20.381595] save_stack_trace+0x16/0x20 [ 20.385545] save_stack+0x43/0xd0 [ 20.388965] kasan_kmalloc+0xad/0xe0 [ 20.392653] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.397211] binder_get_thread+0x15d/0x750 [ 20.401412] binder_poll+0x4a/0x210 [ 20.405010] SyS_epoll_ctl+0x11d7/0x2190 [ 20.409040] do_fast_syscall_32+0x2f7/0x890 [ 20.413345] entry_SYSENTER_compat+0x74/0x83 [ 20.417721] [ 20.419326] Freed by task 3318: [ 20.422589] save_stack_trace+0x16/0x20 [ 20.426534] save_stack+0x43/0xd0 [ 20.429956] kasan_slab_free+0x72/0xc0 [ 20.433811] kfree+0x103/0x300 [ 20.436988] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.441804] binder_thread_release+0x27d/0x540 [ 20.446352] binder_ioctl+0x9c0/0x11b0 [ 20.450207] compat_SyS_ioctl+0x15f/0x2050 [ 20.454412] do_fast_syscall_32+0x2f7/0x890 [ 20.458710] entry_SYSENTER_compat+0x74/0x83 [ 20.463083] [ 20.464699] The buggy address belongs to the object at ffff8801cc87e280 [ 20.464699] which belongs to the cache kmalloc-512 of size 512 [ 20.477326] The buggy address is located 184 bytes inside of [ 20.477326] 512-byte region [ffff8801cc87e280, ffff8801cc87e480) [ 20.489169] The buggy address belongs to the page: [ 20.494068] page:ffffea0007321f80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.504244] flags: 0x8000000000004080(slab|head) [ 20.508980] page dumped because: kasan: bad access detected [ 20.514660] [ 20.516262] Memory state around the buggy address: [ 20.521178] ffff8801cc87e200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.528511] ffff8801cc87e280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.535845] >ffff8801cc87e300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.543171] ^ [ 20.548330] ffff8801cc87e380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.555660] ffff8801cc87e400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.562988] ================================================================== [ 20.570319] Disabling lock debugging due to kernel taint [ 20.575742] Kernel panic - not syncing: panic_on_warn set ... [ 20.575742] [ 20.583075] CPU: 0 PID: 3318 Comm: syzkaller557404 Tainted: G B 4.9.77-g8788313 #25 [ 20.591966] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.601296] ffff8801c883f7c8 ffffffff81d941c9 ffffffff841970ff ffff8801c883f8a0 [ 20.609274] 0000000000000000 ffff8801cc87e338 ffff8801cc87e338 ffff8801c883f890 [ 20.617248] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 20.625217] Call Trace: [ 20.627777] [] dump_stack+0xc1/0x128 [ 20.633117] [] panic+0x1bc/0x3a8 [ 20.638107] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.646304] [] ? add_taint+0x40/0x50 [ 20.651648] [] kasan_end_report+0x50/0x50 [ 20.657415] [] kasan_report+0x167/0x360 [ 20.663008] [] ? __lock_acquire+0x2eff/0x3640 [ 20.669123] [] __asan_report_load8_noabort+0x14/0x20 [ 20.675853] [] __lock_acquire+0x2eff/0x3640 [ 20.681795] [] ? __lock_acquire+0x629/0x3640 [ 20.687822] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.694807] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.701789] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.708772] [] ? mark_held_locks+0xaf/0x100 [ 20.714716] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.720924] [] lock_acquire+0x12e/0x410 [ 20.726527] [] ? remove_wait_queue+0x14/0x40 [ 20.732559] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.738856] [] ? remove_wait_queue+0x14/0x40 [ 20.744892] [] remove_wait_queue+0x14/0x40 [ 20.750758] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.757742] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.764984] [] ? ep_free+0x1b0/0x1b0 [ 20.770328] [] ep_free+0x96/0x1b0 [ 20.775401] [] ? ep_free+0x1b0/0x1b0 [ 20.780733] [] ep_eventpoll_release+0x44/0x60 [ 20.786866] [] __fput+0x28c/0x6e0 [ 20.791942] [] ____fput+0x15/0x20 [ 20.797023] [] task_work_run+0x115/0x190 [ 20.802718] [] do_exit+0x7e7/0x2a40 [ 20.807969] [] ? __pmd_alloc+0x410/0x410 [ 20.813669] [] ? release_task+0x1240/0x1240 [ 20.819614] [] ? __do_page_fault+0x5ec/0xd40 [ 20.825651] [] ? up_read+0x1a/0x40 [ 20.830902] [] ? __do_page_fault+0x3bd/0xd40 [ 20.836952] [] do_group_exit+0x108/0x320 [ 20.842645] [] ? do_group_exit+0x320/0x320 [ 20.848500] [] SyS_exit_group+0x1d/0x20 [ 20.854109] [] do_fast_syscall_32+0x2f7/0x890 [ 20.860225] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.866864] [] entry_SYSENTER_compat+0x74/0x83 [ 20.873741] Dumping ftrace buffer: [ 20.877259] (ftrace buffer empty) [ 20.881150] Kernel Offset: disabled [ 20.884837] Rebooting in 86400 seconds..