[....] Starting enhanced syslogd: rsyslogd[ 13.422710] audit: type=1400 audit(1516432918.000:4): avc: denied { syslog } for pid=3182 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.57' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.917572] ================================================================== [ 26.924949] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.931590] Read of size 8 at addr ffff8801c7ce4838 by task syzkaller804825/3338 [ 26.939089] [ 26.940687] CPU: 0 PID: 3338 Comm: syzkaller804825 Not tainted 4.9.77-ge12a9c4 #27 [ 26.948359] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.957679] ffff8801c7c17870 ffffffff81d941c9 ffffea00071f3900 ffff8801c7ce4838 [ 26.965651] 0000000000000000 ffff8801c7ce4838 ffff8801c7ce4838 ffff8801c7c178a8 [ 26.973614] ffffffff8153db93 ffff8801c7ce4838 0000000000000008 0000000000000000 [ 26.981586] Call Trace: [ 26.984143] [] dump_stack+0xc1/0x128 [ 26.989477] [] print_address_description+0x73/0x280 [ 26.996108] [] kasan_report+0x275/0x360 [ 27.001703] [] ? __lock_acquire+0x2eff/0x3640 [ 27.007816] [] __asan_report_load8_noabort+0x14/0x20 [ 27.014534] [] __lock_acquire+0x2eff/0x3640 [ 27.020473] [] ? __lock_acquire+0x629/0x3640 [ 27.026499] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.033480] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.040459] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.047438] [] ? mark_held_locks+0xaf/0x100 [ 27.053386] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.059590] [] lock_acquire+0x12e/0x410 [ 27.065180] [] ? remove_wait_queue+0x14/0x40 [ 27.071204] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.077496] [] ? remove_wait_queue+0x14/0x40 [ 27.083528] [] remove_wait_queue+0x14/0x40 [ 27.089381] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.096367] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.103609] [] ? ep_free+0x1b0/0x1b0 [ 27.108938] [] ep_free+0x96/0x1b0 [ 27.114009] [] ? ep_free+0x1b0/0x1b0 [ 27.119340] [] ep_eventpoll_release+0x44/0x60 [ 27.125459] [] __fput+0x28c/0x6e0 [ 27.130530] [] ____fput+0x15/0x20 [ 27.135607] [] task_work_run+0x115/0x190 [ 27.141297] [] do_exit+0x7e7/0x2a40 [ 27.146551] [] ? __pmd_alloc+0x410/0x410 [ 27.152235] [] ? release_task+0x1240/0x1240 [ 27.158177] [] ? __do_page_fault+0x5ec/0xd40 [ 27.164206] [] ? up_read+0x1a/0x40 [ 27.169365] [] ? __do_page_fault+0x3bd/0xd40 [ 27.175392] [] do_group_exit+0x108/0x320 [ 27.181075] [] ? do_group_exit+0x320/0x320 [ 27.186928] [] SyS_exit_group+0x1d/0x20 [ 27.192521] [] do_fast_syscall_32+0x2f7/0x890 [ 27.198647] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.205288] [] entry_SYSENTER_compat+0x74/0x83 [ 27.211488] [ 27.213086] Allocated by task 3338: [ 27.216682] save_stack_trace+0x16/0x20 [ 27.220623] save_stack+0x43/0xd0 [ 27.224043] kasan_kmalloc+0xad/0xe0 [ 27.227724] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.232279] binder_get_thread+0x15d/0x750 [ 27.236494] binder_poll+0x4a/0x210 [ 27.240095] SyS_epoll_ctl+0x11d7/0x2190 [ 27.244123] do_fast_syscall_32+0x2f7/0x890 [ 27.248420] entry_SYSENTER_compat+0x74/0x83 [ 27.252796] [ 27.254390] Freed by task 3338: [ 27.257636] save_stack_trace+0x16/0x20 [ 27.261576] save_stack+0x43/0xd0 [ 27.264998] kasan_slab_free+0x72/0xc0 [ 27.268850] kfree+0x103/0x300 [ 27.272010] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.276828] binder_thread_release+0x27d/0x540 [ 27.281382] binder_ioctl+0x9c0/0x11b0 [ 27.285238] compat_SyS_ioctl+0x15f/0x2050 [ 27.289438] do_fast_syscall_32+0x2f7/0x890 [ 27.293727] entry_SYSENTER_compat+0x74/0x83 [ 27.298098] [ 27.299693] The buggy address belongs to the object at ffff8801c7ce4780 [ 27.299693] which belongs to the cache kmalloc-512 of size 512 [ 27.312314] The buggy address is located 184 bytes inside of [ 27.312314] 512-byte region [ffff8801c7ce4780, ffff8801c7ce4980) [ 27.324153] The buggy address belongs to the page: [ 27.329050] page:ffffea00071f3900 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.339217] flags: 0x8000000000004080(slab|head) [ 27.343939] page dumped because: kasan: bad access detected [ 27.349620] [ 27.351213] Memory state around the buggy address: [ 27.356114] ffff8801c7ce4700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.363442] ffff8801c7ce4780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.370765] >ffff8801c7ce4800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.378096] ^ [ 27.383254] ffff8801c7ce4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.390579] ffff8801c7ce4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.397912] ================================================================== [ 27.405238] Disabling lock debugging due to kernel taint [ 27.410660] Kernel panic - not syncing: panic_on_warn set ... [ 27.410660] [ 27.418000] CPU: 0 PID: 3338 Comm: syzkaller804825 Tainted: G B 4.9.77-ge12a9c4 #27 [ 27.426895] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.436231] ffff8801c7c177c8 ffffffff81d941c9 ffffffff841970ff ffff8801c7c178a0 [ 27.444200] 0000000000000000 ffff8801c7ce4838 ffff8801c7ce4838 ffff8801c7c17890 [ 27.452165] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 27.460123] Call Trace: [ 27.462681] [] dump_stack+0xc1/0x128 [ 27.468014] [] panic+0x1bc/0x3a8 [ 27.473011] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.481210] [] ? add_taint+0x40/0x50 [ 27.486542] [] kasan_end_report+0x50/0x50 [ 27.492306] [] kasan_report+0x167/0x360 [ 27.497901] [] ? __lock_acquire+0x2eff/0x3640 [ 27.504022] [] __asan_report_load8_noabort+0x14/0x20 [ 27.510745] [] __lock_acquire+0x2eff/0x3640 [ 27.516684] [] ? __lock_acquire+0x629/0x3640 [ 27.522709] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.529690] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.537322] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.544305] [] ? mark_held_locks+0xaf/0x100 [ 27.550248] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.556532] [] lock_acquire+0x12e/0x410 [ 27.562122] [] ? remove_wait_queue+0x14/0x40 [ 27.568145] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.574429] [] ? remove_wait_queue+0x14/0x40 [ 27.580452] [] remove_wait_queue+0x14/0x40 [ 27.586307] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.593288] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.600532] [] ? ep_free+0x1b0/0x1b0 [ 27.605867] [] ep_free+0x96/0x1b0 [ 27.610936] [] ? ep_free+0x1b0/0x1b0 [ 27.616274] [] ep_eventpoll_release+0x44/0x60 [ 27.622391] [] __fput+0x28c/0x6e0 [ 27.627469] [] ____fput+0x15/0x20 [ 27.632539] [] task_work_run+0x115/0x190 [ 27.638219] [] do_exit+0x7e7/0x2a40 [ 27.643462] [] ? __pmd_alloc+0x410/0x410 [ 27.649139] [] ? release_task+0x1240/0x1240 [ 27.655076] [] ? __do_page_fault+0x5ec/0xd40 [ 27.661101] [] ? up_read+0x1a/0x40 [ 27.666256] [] ? __do_page_fault+0x3bd/0xd40 [ 27.672280] [] do_group_exit+0x108/0x320 [ 27.677956] [] ? do_group_exit+0x320/0x320 [ 27.683806] [] SyS_exit_group+0x1d/0x20 [ 27.689395] [] do_fast_syscall_32+0x2f7/0x890 [ 27.695505] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.702141] [] entry_SYSENTER_compat+0x74/0x83 [ 27.708777] Dumping ftrace buffer: [ 27.712287] (ftrace buffer empty) [ 27.715967] Kernel Offset: disabled [ 27.719558] Rebooting in 86400 seconds..