[....] Starting enhanced syslogd: rsyslogd[ 16.020858] audit: type=1400 audit(1517302591.307:4): avc: denied { syslog } for pid=3909 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.15.225' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.878611] ================================================================== [ 27.885998] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.892636] Read of size 8 at addr ffff8801c2f23738 by task syzkaller448518/4065 [ 27.900131] [ 27.901728] CPU: 0 PID: 4065 Comm: syzkaller448518 Not tainted 4.9.78-g7be1985 #33 [ 27.909401] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.918725] ffff8801d3c47870 ffffffff81d94409 ffffea00070bc880 ffff8801c2f23738 [ 27.926694] 0000000000000000 ffff8801c2f23738 ffff8801c2f23738 ffff8801d3c478a8 [ 27.934655] ffffffff8153dc73 ffff8801c2f23738 0000000000000008 0000000000000000 [ 27.942613] Call Trace: [ 27.945169] [] dump_stack+0xc1/0x128 [ 27.950503] [] print_address_description+0x73/0x280 [ 27.957133] [] kasan_report+0x275/0x360 [ 27.962735] [] ? __lock_acquire+0x2eff/0x3640 [ 27.968852] [] __asan_report_load8_noabort+0x14/0x20 [ 27.975570] [] __lock_acquire+0x2eff/0x3640 [ 27.981508] [] ? __lock_acquire+0x629/0x3640 [ 27.987539] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.994521] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.001502] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.008480] [] ? mark_held_locks+0xaf/0x100 [ 28.014425] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.020640] [] lock_acquire+0x12e/0x410 [ 28.026233] [] ? remove_wait_queue+0x14/0x40 [ 28.032255] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.038538] [] ? remove_wait_queue+0x14/0x40 [ 28.044562] [] remove_wait_queue+0x14/0x40 [ 28.050416] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.057394] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.064643] [] ? ep_free+0x1b0/0x1b0 [ 28.069971] [] ep_free+0x96/0x1b0 [ 28.075042] [] ? ep_free+0x1b0/0x1b0 [ 28.080370] [] ep_eventpoll_release+0x44/0x60 [ 28.086480] [] __fput+0x28c/0x6e0 [ 28.091547] [] ____fput+0x15/0x20 [ 28.096616] [] task_work_run+0x115/0x190 [ 28.102296] [] do_exit+0x7e7/0x2a40 [ 28.107542] [] ? __pmd_alloc+0x410/0x410 [ 28.113221] [] ? release_task+0x1240/0x1240 [ 28.119160] [] ? __do_page_fault+0x5ec/0xd40 [ 28.125184] [] ? up_read+0x1a/0x40 [ 28.130338] [] ? __do_page_fault+0x3bd/0xd40 [ 28.136365] [] do_group_exit+0x108/0x320 [ 28.142040] [] ? do_group_exit+0x320/0x320 [ 28.147890] [] SyS_exit_group+0x1d/0x20 [ 28.153483] [] do_fast_syscall_32+0x2f7/0x890 [ 28.159592] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.166226] [] entry_SYSENTER_compat+0x74/0x83 [ 28.172423] [ 28.174019] Allocated by task 4065: [ 28.177612] save_stack_trace+0x16/0x20 [ 28.181552] save_stack+0x43/0xd0 [ 28.184970] kasan_kmalloc+0xad/0xe0 [ 28.188650] kmem_cache_alloc_trace+0xfb/0x2a0 [ 28.193200] binder_get_thread+0x15d/0x750 [ 28.197403] binder_poll+0x4a/0x210 [ 28.200996] SyS_epoll_ctl+0x11d7/0x2190 [ 28.205022] do_fast_syscall_32+0x2f7/0x890 [ 28.209312] entry_SYSENTER_compat+0x74/0x83 [ 28.213681] [ 28.215273] Freed by task 4065: [ 28.218517] save_stack_trace+0x16/0x20 [ 28.222461] save_stack+0x43/0xd0 [ 28.225879] kasan_slab_free+0x72/0xc0 [ 28.229734] kfree+0x103/0x300 [ 28.232892] binder_thread_dec_tmpref+0x1cc/0x240 [ 28.237698] binder_thread_release+0x27d/0x540 [ 28.242244] binder_ioctl+0x9c0/0x11b0 [ 28.246096] compat_SyS_ioctl+0x15f/0x2050 [ 28.250304] do_fast_syscall_32+0x2f7/0x890 [ 28.254595] entry_SYSENTER_compat+0x74/0x83 [ 28.258966] [ 28.260561] The buggy address belongs to the object at ffff8801c2f23680 [ 28.260561] which belongs to the cache kmalloc-512 of size 512 [ 28.273184] The buggy address is located 184 bytes inside of [ 28.273184] 512-byte region [ffff8801c2f23680, ffff8801c2f23880) [ 28.285021] The buggy address belongs to the page: [ 28.289918] page:ffffea00070bc880 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 28.300082] flags: 0x8000000000004080(slab|head) [ 28.304801] page dumped because: kasan: bad access detected [ 28.310475] [ 28.312070] Memory state around the buggy address: [ 28.316964] ffff8801c2f23600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.324304] ffff8801c2f23680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.331630] >ffff8801c2f23700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.338953] ^ [ 28.344107] ffff8801c2f23780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.351435] ffff8801c2f23800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.358764] ================================================================== [ 28.366090] Disabling lock debugging due to kernel taint [ 28.371510] Kernel panic - not syncing: panic_on_warn set ... [ 28.371510] [ 28.378845] CPU: 0 PID: 4065 Comm: syzkaller448518 Tainted: G B 4.9.78-g7be1985 #33 [ 28.387734] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.397061] ffff8801d3c477c8 ffffffff81d94409 ffffffff841971bf ffff8801d3c478a0 [ 28.405019] 0000000000000000 ffff8801c2f23738 ffff8801c2f23738 ffff8801d3c47890 [ 28.412996] ffffffff8142f4a1 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f2e5 [ 28.420960] Call Trace: [ 28.423519] [] dump_stack+0xc1/0x128 [ 28.428850] [] panic+0x1bc/0x3a8 [ 28.433835] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 28.442031] [] ? add_taint+0x40/0x50 [ 28.447368] [] kasan_end_report+0x50/0x50 [ 28.453142] [] kasan_report+0x167/0x360 [ 28.458736] [] ? __lock_acquire+0x2eff/0x3640 [ 28.464850] [] __asan_report_load8_noabort+0x14/0x20 [ 28.471571] [] __lock_acquire+0x2eff/0x3640 [ 28.477510] [] ? __lock_acquire+0x629/0x3640 [ 28.483537] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.490515] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.497496] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.504475] [] ? mark_held_locks+0xaf/0x100 [ 28.510414] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.516615] [] lock_acquire+0x12e/0x410 [ 28.522211] [] ? remove_wait_queue+0x14/0x40 [ 28.528236] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.534522] [] ? remove_wait_queue+0x14/0x40 [ 28.540546] [] remove_wait_queue+0x14/0x40 [ 28.546401] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.553381] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.560620] [] ? ep_free+0x1b0/0x1b0 [ 28.565954] [] ep_free+0x96/0x1b0 [ 28.571030] [] ? ep_free+0x1b0/0x1b0 [ 28.576372] [] ep_eventpoll_release+0x44/0x60 [ 28.582485] [] __fput+0x28c/0x6e0 [ 28.587565] [] ____fput+0x15/0x20 [ 28.592645] [] task_work_run+0x115/0x190 [ 28.598334] [] do_exit+0x7e7/0x2a40 [ 28.603601] [] ? __pmd_alloc+0x410/0x410 [ 28.609866] [] ? release_task+0x1240/0x1240 [ 28.615807] [] ? __do_page_fault+0x5ec/0xd40 [ 28.621835] [] ? up_read+0x1a/0x40 [ 28.626994] [] ? __do_page_fault+0x3bd/0xd40 [ 28.633033] [] do_group_exit+0x108/0x320 [ 28.638709] [] ? do_group_exit+0x320/0x320 [ 28.644567] [] SyS_exit_group+0x1d/0x20 [ 28.650163] [] do_fast_syscall_32+0x2f7/0x890 [ 28.656273] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.662908] [] entry_SYSENTER_compat+0x74/0x83 [ 28.669524] Dumping ftrace buffer: [ 28.673031] (ftrace buffer empty) [ 28.676711] Kernel Offset: disabled [ 28.680302] Rebooting in 86400 seconds..