[....] Starting enhanced syslogd: rsyslogd[ 11.379429] audit: type=1400 audit(1516194124.224:4): avc: denied { syslog } for pid=3174 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.50' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.928962] ================================================================== [ 20.936369] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.943004] Read of size 8 at addr ffff8801cd51a5b8 by task syzkaller263656/3323 [ 20.950504] [ 20.952102] CPU: 1 PID: 3323 Comm: syzkaller263656 Not tainted 4.9.77-g033d019 #24 [ 20.959788] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.969113] ffff8801c9aa7870 ffffffff81d941c9 ffffea0007354680 ffff8801cd51a5b8 [ 20.977140] 0000000000000000 ffff8801cd51a5b8 ffff8801cd51a5b8 ffff8801c9aa78a8 [ 20.985111] ffffffff8153db93 ffff8801cd51a5b8 0000000000000008 0000000000000000 [ 20.993086] Call Trace: [ 20.995644] [] dump_stack+0xc1/0x128 [ 21.000982] [] print_address_description+0x73/0x280 [ 21.007617] [] kasan_report+0x275/0x360 [ 21.013210] [] ? __lock_acquire+0x2eff/0x3640 [ 21.019323] [] __asan_report_load8_noabort+0x14/0x20 [ 21.026046] [] __lock_acquire+0x2eff/0x3640 [ 21.031987] [] ? __lock_acquire+0x629/0x3640 [ 21.038023] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.045007] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.052007] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.059001] [] ? mark_held_locks+0xaf/0x100 [ 21.064945] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.071145] [] lock_acquire+0x12e/0x410 [ 21.076736] [] ? remove_wait_queue+0x14/0x40 [ 21.082786] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.089098] [] ? remove_wait_queue+0x14/0x40 [ 21.095136] [] remove_wait_queue+0x14/0x40 [ 21.101001] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.107983] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.115224] [] ? ep_free+0x1b0/0x1b0 [ 21.120565] [] ep_free+0x96/0x1b0 [ 21.125640] [] ? ep_free+0x1b0/0x1b0 [ 21.130975] [] ep_eventpoll_release+0x44/0x60 [ 21.137107] [] __fput+0x28c/0x6e0 [ 21.142178] [] ____fput+0x15/0x20 [ 21.147250] [] task_work_run+0x115/0x190 [ 21.152945] [] do_exit+0x7e7/0x2a40 [ 21.158193] [] ? __pmd_alloc+0x410/0x410 [ 21.163874] [] ? release_task+0x1240/0x1240 [ 21.169818] [] ? __do_page_fault+0x5ec/0xd40 [ 21.175847] [] ? up_read+0x1a/0x40 [ 21.181005] [] ? __do_page_fault+0x3bd/0xd40 [ 21.187032] [] do_group_exit+0x108/0x320 [ 21.192710] [] ? do_group_exit+0x320/0x320 [ 21.198568] [] SyS_exit_group+0x1d/0x20 [ 21.204165] [] do_fast_syscall_32+0x2f7/0x890 [ 21.210301] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 21.216937] [] entry_SYSENTER_compat+0x74/0x83 [ 21.223138] [ 21.224736] Allocated by task 3323: [ 21.228334] save_stack_trace+0x16/0x20 [ 21.232299] save_stack+0x43/0xd0 [ 21.235721] kasan_kmalloc+0xad/0xe0 [ 21.239401] kmem_cache_alloc_trace+0xfb/0x2a0 [ 21.243952] binder_get_thread+0x15d/0x750 [ 21.248154] binder_poll+0x4a/0x210 [ 21.251753] SyS_epoll_ctl+0x11d7/0x2190 [ 21.255797] do_fast_syscall_32+0x2f7/0x890 [ 21.260087] entry_SYSENTER_compat+0x74/0x83 [ 21.264462] [ 21.266062] Freed by task 3323: [ 21.269311] save_stack_trace+0x16/0x20 [ 21.273253] save_stack+0x43/0xd0 [ 21.276676] kasan_slab_free+0x72/0xc0 [ 21.280533] kfree+0x103/0x300 [ 21.283697] binder_thread_dec_tmpref+0x1cc/0x240 [ 21.288509] binder_thread_release+0x27d/0x540 [ 21.293060] binder_ioctl+0x9c0/0x11b0 [ 21.296917] compat_SyS_ioctl+0x15f/0x2050 [ 21.301133] do_fast_syscall_32+0x2f7/0x890 [ 21.305423] entry_SYSENTER_compat+0x74/0x83 [ 21.309796] [ 21.311395] The buggy address belongs to the object at ffff8801cd51a500 [ 21.311395] which belongs to the cache kmalloc-512 of size 512 [ 21.324036] The buggy address is located 184 bytes inside of [ 21.324036] 512-byte region [ffff8801cd51a500, ffff8801cd51a700) [ 21.335892] The buggy address belongs to the page: [ 21.340804] page:ffffea0007354680 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 21.350985] flags: 0x8000000000004080(slab|head) [ 21.355721] page dumped because: kasan: bad access detected [ 21.361408] [ 21.363003] Memory state around the buggy address: [ 21.367904] ffff8801cd51a480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.375231] ffff8801cd51a500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.382557] >ffff8801cd51a580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.389882] ^ [ 21.395041] ffff8801cd51a600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.402368] ffff8801cd51a680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.409695] ================================================================== [ 21.417021] Disabling lock debugging due to kernel taint [ 21.422441] Kernel panic - not syncing: panic_on_warn set ... [ 21.422441] [ 21.429775] CPU: 1 PID: 3323 Comm: syzkaller263656 Tainted: G B 4.9.77-g033d019 #24 [ 21.438668] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.447995] ffff8801c9aa77c8 ffffffff81d941c9 ffffffff841970ff ffff8801c9aa78a0 [ 21.455965] 0000000000000000 ffff8801cd51a5b8 ffff8801cd51a5b8 ffff8801c9aa7890 [ 21.463939] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 21.471917] Call Trace: [ 21.474476] [] dump_stack+0xc1/0x128 [ 21.479812] [] panic+0x1bc/0x3a8 [ 21.484800] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 21.493014] [] ? add_taint+0x40/0x50 [ 21.498350] [] kasan_end_report+0x50/0x50 [ 21.504117] [] kasan_report+0x167/0x360 [ 21.509721] [] ? __lock_acquire+0x2eff/0x3640 [ 21.515835] [] __asan_report_load8_noabort+0x14/0x20 [ 21.522557] [] __lock_acquire+0x2eff/0x3640 [ 21.528499] [] ? __lock_acquire+0x629/0x3640 [ 21.534526] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.541509] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.548491] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.555477] [] ? mark_held_locks+0xaf/0x100 [ 21.561421] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.567623] [] lock_acquire+0x12e/0x410 [ 21.573218] [] ? remove_wait_queue+0x14/0x40 [ 21.579243] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.585532] [] ? remove_wait_queue+0x14/0x40 [ 21.591560] [] remove_wait_queue+0x14/0x40 [ 21.597416] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.604402] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.611656] [] ? ep_free+0x1b0/0x1b0 [ 21.616988] [] ep_free+0x96/0x1b0 [ 21.622060] [] ? ep_free+0x1b0/0x1b0 [ 21.627393] [] ep_eventpoll_release+0x44/0x60 [ 21.633505] [] __fput+0x28c/0x6e0 [ 21.638587] [] ____fput+0x15/0x20 [ 21.643671] [] task_work_run+0x115/0x190 [ 21.649358] [] do_exit+0x7e7/0x2a40 [ 21.654619] [] ? __pmd_alloc+0x410/0x410 [ 21.660310] [] ? release_task+0x1240/0x1240 [ 21.666253] [] ? __do_page_fault+0x5ec/0xd40 [ 21.672288] [] ? up_read+0x1a/0x40 [ 21.677449] [] ? __do_page_fault+0x3bd/0xd40 [ 21.683478] [] do_group_exit+0x108/0x320 [ 21.689158] [] ? do_group_exit+0x320/0x320 [ 21.695012] [] SyS_exit_group+0x1d/0x20 [ 21.700605] [] do_fast_syscall_32+0x2f7/0x890 [ 21.706720] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 21.713358] [] entry_SYSENTER_compat+0x74/0x83 [ 21.720070] Dumping ftrace buffer: [ 21.723582] (ftrace buffer empty) [ 21.727267] Kernel Offset: disabled [ 21.730864] Rebooting in 86400 seconds..