[....] Starting enhanced syslogd: rsyslogd[ 13.296228] audit: type=1400 audit(1515971712.838:4): avc: denied { syslog } for pid=3168 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.23' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.479730] ================================================================== [ 24.487113] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 24.493751] Read of size 8 at addr ffff8801c98d5c38 by task syzkaller252693/3323 [ 24.501253] [ 24.502852] CPU: 0 PID: 3323 Comm: syzkaller252693 Not tainted 4.9.76-gf0f6293 #22 [ 24.510524] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.519844] ffff8801c968f870 ffffffff81d93149 ffffea0007263500 ffff8801c98d5c38 [ 24.527799] 0000000000000000 ffff8801c98d5c38 ffff8801c98d5c38 ffff8801c968f8a8 [ 24.535747] ffffffff8153cb43 ffff8801c98d5c38 0000000000000008 0000000000000000 [ 24.543688] Call Trace: [ 24.546243] [] dump_stack+0xc1/0x128 [ 24.551574] [] print_address_description+0x73/0x280 [ 24.558205] [] kasan_report+0x275/0x360 [ 24.563800] [] ? __lock_acquire+0x2eff/0x3640 [ 24.569911] [] __asan_report_load8_noabort+0x14/0x20 [ 24.576628] [] __lock_acquire+0x2eff/0x3640 [ 24.582570] [] ? __lock_acquire+0x629/0x3640 [ 24.588602] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.595583] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.602568] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.609555] [] ? mark_held_locks+0xaf/0x100 [ 24.615500] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.621704] [] lock_acquire+0x12e/0x410 [ 24.627293] [] ? remove_wait_queue+0x14/0x40 [ 24.633313] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.639597] [] ? remove_wait_queue+0x14/0x40 [ 24.645637] [] remove_wait_queue+0x14/0x40 [ 24.651488] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.658469] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.665707] [] ? ep_free+0x1b0/0x1b0 [ 24.671033] [] ep_free+0x96/0x1b0 [ 24.676100] [] ? ep_free+0x1b0/0x1b0 [ 24.681427] [] ep_eventpoll_release+0x44/0x60 [ 24.687540] [] __fput+0x28c/0x6e0 [ 24.692610] [] ____fput+0x15/0x20 [ 24.697678] [] task_work_run+0x115/0x190 [ 24.703350] [] do_exit+0x7e7/0x2a40 [ 24.708591] [] ? __pmd_alloc+0x410/0x410 [ 24.714264] [] ? release_task+0x1240/0x1240 [ 24.720199] [] ? __do_page_fault+0x5ec/0xd40 [ 24.726220] [] ? up_read+0x1a/0x40 [ 24.731373] [] ? __do_page_fault+0x3bd/0xd40 [ 24.737407] [] do_group_exit+0x108/0x320 [ 24.743085] [] ? do_group_exit+0x320/0x320 [ 24.748934] [] SyS_exit_group+0x1d/0x20 [ 24.754542] [] do_fast_syscall_32+0x2f7/0x890 [ 24.760652] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 24.767285] [] entry_SYSENTER_compat+0x74/0x83 [ 24.773476] [ 24.775071] Allocated by task 3323: [ 24.778676] save_stack_trace+0x16/0x20 [ 24.782623] save_stack+0x43/0xd0 [ 24.786041] kasan_kmalloc+0xad/0xe0 [ 24.789718] kmem_cache_alloc_trace+0xfb/0x2a0 [ 24.794279] binder_get_thread+0x15d/0x750 [ 24.798479] binder_poll+0x4a/0x210 [ 24.802073] SyS_epoll_ctl+0x11d7/0x2190 [ 24.806098] do_fast_syscall_32+0x2f7/0x890 [ 24.810382] entry_SYSENTER_compat+0x74/0x83 [ 24.814749] [ 24.816341] Freed by task 3323: [ 24.819584] save_stack_trace+0x16/0x20 [ 24.823520] save_stack+0x43/0xd0 [ 24.826938] kasan_slab_free+0x72/0xc0 [ 24.830789] kfree+0x103/0x300 [ 24.833946] binder_thread_dec_tmpref+0x1cc/0x240 [ 24.838750] binder_thread_release+0x27d/0x540 [ 24.843293] binder_ioctl+0x9c0/0x11b0 [ 24.847144] compat_SyS_ioctl+0x15f/0x2050 [ 24.851345] do_fast_syscall_32+0x2f7/0x890 [ 24.855636] entry_SYSENTER_compat+0x74/0x83 [ 24.860004] [ 24.861599] The buggy address belongs to the object at ffff8801c98d5b80 [ 24.861599] which belongs to the cache kmalloc-512 of size 512 [ 24.874224] The buggy address is located 184 bytes inside of [ 24.874224] 512-byte region [ffff8801c98d5b80, ffff8801c98d5d80) [ 24.886060] The buggy address belongs to the page: [ 24.890954] page:ffffea0007263500 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.901105] flags: 0x8000000000004080(slab|head) [ 24.905823] page dumped because: kasan: bad access detected [ 24.911495] [ 24.913086] Memory state around the buggy address: [ 24.917979] ffff8801c98d5b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.925301] ffff8801c98d5b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.932623] >ffff8801c98d5c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.939945] ^ [ 24.945098] ffff8801c98d5c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.952423] ffff8801c98d5d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.959748] ================================================================== [ 24.967076] Disabling lock debugging due to kernel taint [ 24.972488] Kernel panic - not syncing: panic_on_warn set ... [ 24.972488] [ 24.979823] CPU: 0 PID: 3323 Comm: syzkaller252693 Tainted: G B 4.9.76-gf0f6293 #22 [ 24.988715] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.998036] ffff8801c968f7c8 ffffffff81d93149 ffffffff84195c17 ffff8801c968f8a0 [ 25.005983] 0000000000000000 ffff8801c98d5c38 ffff8801c98d5c38 ffff8801c968f890 [ 25.013941] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 25.021880] Call Trace: [ 25.024443] [] dump_stack+0xc1/0x128 [ 25.029774] [] panic+0x1bc/0x3a8 [ 25.034767] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 25.042963] [] ? add_taint+0x40/0x50 [ 25.048299] [] kasan_end_report+0x50/0x50 [ 25.054066] [] kasan_report+0x167/0x360 [ 25.059658] [] ? __lock_acquire+0x2eff/0x3640 [ 25.065776] [] __asan_report_load8_noabort+0x14/0x20 [ 25.072496] [] __lock_acquire+0x2eff/0x3640 [ 25.078446] [] ? __lock_acquire+0x629/0x3640 [ 25.085423] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.092404] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.099402] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.106395] [] ? mark_held_locks+0xaf/0x100 [ 25.112340] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.118538] [] lock_acquire+0x12e/0x410 [ 25.124133] [] ? remove_wait_queue+0x14/0x40 [ 25.130156] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.136440] [] ? remove_wait_queue+0x14/0x40 [ 25.142464] [] remove_wait_queue+0x14/0x40 [ 25.148316] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.155296] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.163248] [] ? ep_free+0x1b0/0x1b0 [ 25.168579] [] ep_free+0x96/0x1b0 [ 25.173649] [] ? ep_free+0x1b0/0x1b0 [ 25.178978] [] ep_eventpoll_release+0x44/0x60 [ 25.185175] [] __fput+0x28c/0x6e0 [ 25.190244] [] ____fput+0x15/0x20 [ 25.195851] [] task_work_run+0x115/0x190 [ 25.201531] [] do_exit+0x7e7/0x2a40 [ 25.206771] [] ? __pmd_alloc+0x410/0x410 [ 25.212450] [] ? release_task+0x1240/0x1240 [ 25.218398] [] ? __do_page_fault+0x5ec/0xd40 [ 25.224421] [] ? up_read+0x1a/0x40 [ 25.229576] [] ? __do_page_fault+0x3bd/0xd40 [ 25.235597] [] do_group_exit+0x108/0x320 [ 25.241270] [] ? do_group_exit+0x320/0x320 [ 25.247118] [] SyS_exit_group+0x1d/0x20 [ 25.252710] [] do_fast_syscall_32+0x2f7/0x890 [ 25.259784] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.266416] [] entry_SYSENTER_compat+0x74/0x83 [ 25.273017] Dumping ftrace buffer: [ 25.276523] (ftrace buffer empty) [ 25.280207] Kernel Offset: disabled [ 25.283799] Rebooting in 86400 seconds..