[....] Starting enhanced syslogd: rsyslogd[ 12.130391] audit: type=1400 audit(1516196325.281:4): avc: denied { syslog } for pid=3163 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.7' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 47.435295] ================================================================== [ 47.442677] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 47.449313] Read of size 8 at addr ffff8801cc8e0ab8 by task syzkaller600625/3342 [ 47.456820] [ 47.458421] CPU: 0 PID: 3342 Comm: syzkaller600625 Not tainted 4.9.77-g033d019 #24 [ 47.466368] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.475708] ffff8801d0317870 ffffffff81d941c9 ffffea0007323800 ffff8801cc8e0ab8 [ 47.483701] 0000000000000000 ffff8801cc8e0ab8 ffff8801cc8e0ab8 ffff8801d03178a8 [ 47.491694] ffffffff8153db93 ffff8801cc8e0ab8 0000000000000008 0000000000000000 [ 47.499685] Call Trace: [ 47.502247] [] dump_stack+0xc1/0x128 [ 47.507587] [] print_address_description+0x73/0x280 [ 47.514240] [] kasan_report+0x275/0x360 [ 47.519851] [] ? __lock_acquire+0x2eff/0x3640 [ 47.525975] [] __asan_report_load8_noabort+0x14/0x20 [ 47.532709] [] __lock_acquire+0x2eff/0x3640 [ 47.538660] [] ? __lock_acquire+0x629/0x3640 [ 47.544697] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 47.551692] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 47.558701] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 47.565700] [] ? mark_held_locks+0xaf/0x100 [ 47.571651] [] ? mutex_lock_nested+0x5e3/0x870 [ 47.577859] [] lock_acquire+0x12e/0x410 [ 47.583482] [] ? remove_wait_queue+0x14/0x40 [ 47.589516] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 47.595823] [] ? remove_wait_queue+0x14/0x40 [ 47.601860] [] remove_wait_queue+0x14/0x40 [ 47.607730] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 47.614724] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 47.621986] [] ? ep_free+0x1b0/0x1b0 [ 47.627331] [] ep_free+0x96/0x1b0 [ 47.632414] [] ? ep_free+0x1b0/0x1b0 [ 47.637749] [] ep_eventpoll_release+0x44/0x60 [ 47.643887] [] __fput+0x28c/0x6e0 [ 47.648965] [] ____fput+0x15/0x20 [ 47.654042] [] task_work_run+0x115/0x190 [ 47.659726] [] do_exit+0x7e7/0x2a40 [ 47.664975] [] ? __pmd_alloc+0x410/0x410 [ 47.670660] [] ? release_task+0x1240/0x1240 [ 47.676608] [] ? __do_page_fault+0x5ec/0xd40 [ 47.682643] [] ? up_read+0x1a/0x40 [ 47.687808] [] ? __do_page_fault+0x3bd/0xd40 [ 47.693841] [] do_group_exit+0x108/0x320 [ 47.699540] [] ? do_group_exit+0x320/0x320 [ 47.705401] [] SyS_exit_group+0x1d/0x20 [ 47.711000] [] do_fast_syscall_32+0x2f7/0x890 [ 47.717128] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 47.723781] [] entry_SYSENTER_compat+0x74/0x83 [ 47.729983] [ 47.731584] Allocated by task 3342: [ 47.735194] save_stack_trace+0x16/0x20 [ 47.739157] save_stack+0x43/0xd0 [ 47.742590] kasan_kmalloc+0xad/0xe0 [ 47.746279] kmem_cache_alloc_trace+0xfb/0x2a0 [ 47.750839] binder_get_thread+0x15d/0x750 [ 47.755044] binder_poll+0x4a/0x210 [ 47.758646] SyS_epoll_ctl+0x11d7/0x2190 [ 47.762679] do_fast_syscall_32+0x2f7/0x890 [ 47.766985] entry_SYSENTER_compat+0x74/0x83 [ 47.771364] [ 47.772968] Freed by task 3342: [ 47.776226] save_stack_trace+0x16/0x20 [ 47.780183] save_stack+0x43/0xd0 [ 47.783615] kasan_slab_free+0x72/0xc0 [ 47.787474] kfree+0x103/0x300 [ 47.790641] binder_thread_dec_tmpref+0x1cc/0x240 [ 47.795454] binder_thread_release+0x27d/0x540 [ 47.800013] binder_ioctl+0x9c0/0x11b0 [ 47.803874] compat_SyS_ioctl+0x15f/0x2050 [ 47.808082] do_fast_syscall_32+0x2f7/0x890 [ 47.812386] entry_SYSENTER_compat+0x74/0x83 [ 47.816766] [ 47.818369] The buggy address belongs to the object at ffff8801cc8e0a00 [ 47.818369] which belongs to the cache kmalloc-512 of size 512 [ 47.831004] The buggy address is located 184 bytes inside of [ 47.831004] 512-byte region [ffff8801cc8e0a00, ffff8801cc8e0c00) [ 47.842853] The buggy address belongs to the page: [ 47.847761] page:ffffea0007323800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 47.857935] flags: 0x8000000000004080(slab|head) [ 47.862664] page dumped because: kasan: bad access detected [ 47.868346] [ 47.869961] Memory state around the buggy address: [ 47.874866] ffff8801cc8e0980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 47.882203] ffff8801cc8e0a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.889541] >ffff8801cc8e0a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.896870] ^ [ 47.902033] ffff8801cc8e0b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.909368] ffff8801cc8e0b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.916696] ================================================================== [ 47.924033] Disabling lock debugging due to kernel taint [ 47.929456] Kernel panic - not syncing: panic_on_warn set ... [ 47.929456] [ 47.936792] CPU: 0 PID: 3342 Comm: syzkaller600625 Tainted: G B 4.9.77-g033d019 #24 [ 47.945684] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.955016] ffff8801d03177c8 ffffffff81d941c9 ffffffff841970ff ffff8801d03178a0 [ 47.963005] 0000000000000000 ffff8801cc8e0ab8 ffff8801cc8e0ab8 ffff8801d0317890 [ 47.971028] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 47.979026] Call Trace: [ 47.981590] [] dump_stack+0xc1/0x128 [ 47.986929] [] panic+0x1bc/0x3a8 [ 47.991935] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 48.000155] [] ? add_taint+0x40/0x50 [ 48.005502] [] kasan_end_report+0x50/0x50 [ 48.011277] [] kasan_report+0x167/0x360 [ 48.016882] [] ? __lock_acquire+0x2eff/0x3640 [ 48.023004] [] __asan_report_load8_noabort+0x14/0x20 [ 48.029747] [] __lock_acquire+0x2eff/0x3640 [ 48.035699] [] ? __lock_acquire+0x629/0x3640 [ 48.041739] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 48.048738] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 48.055721] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 48.062703] [] ? mark_held_locks+0xaf/0x100 [ 48.068643] [] ? mutex_lock_nested+0x5e3/0x870 [ 48.074840] [] lock_acquire+0x12e/0x410 [ 48.080431] [] ? remove_wait_queue+0x14/0x40 [ 48.086458] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 48.092746] [] ? remove_wait_queue+0x14/0x40 [ 48.098770] [] remove_wait_queue+0x14/0x40 [ 48.104626] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 48.111606] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 48.118848] [] ? ep_free+0x1b0/0x1b0 [ 48.124180] [] ep_free+0x96/0x1b0 [ 48.129251] [] ? ep_free+0x1b0/0x1b0 [ 48.134583] [] ep_eventpoll_release+0x44/0x60 [ 48.140693] [] __fput+0x28c/0x6e0 [ 48.145762] [] ____fput+0x15/0x20 [ 48.150833] [] task_work_run+0x115/0x190 [ 48.156512] [] do_exit+0x7e7/0x2a40 [ 48.161757] [] ? __pmd_alloc+0x410/0x410 [ 48.167439] [] ? release_task+0x1240/0x1240 [ 48.173380] [] ? __do_page_fault+0x5ec/0xd40 [ 48.179408] [] ? up_read+0x1a/0x40 [ 48.184566] [] ? __do_page_fault+0x3bd/0xd40 [ 48.190591] [] do_group_exit+0x108/0x320 [ 48.196268] [] ? do_group_exit+0x320/0x320 [ 48.202126] [] SyS_exit_group+0x1d/0x20 [ 48.207721] [] do_fast_syscall_32+0x2f7/0x890 [ 48.214047] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 48.220689] [] entry_SYSENTER_compat+0x74/0x83 [ 48.227287] Dumping ftrace buffer: [ 48.230798] (ftrace buffer empty) [ 48.234479] Kernel Offset: disabled [ 48.238077] Rebooting in 86400 seconds..