[....] Starting enhanced syslogd: rsyslogd[ 13.033328] audit: type=1400 audit(1517220750.791:4): avc: denied { syslog } for pid=3177 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.16' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.674386] ================================================================== [ 20.681784] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.688433] Read of size 8 at addr ffff8801cc3dcd38 by task syzkaller656584/3326 [ 20.695935] [ 20.697538] CPU: 0 PID: 3326 Comm: syzkaller656584 Not tainted 4.9.78-g68d447c #32 [ 20.705212] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.714538] ffff8801c8197870 ffffffff81d943a9 ffffea000730f700 ffff8801cc3dcd38 [ 20.722519] 0000000000000000 ffff8801cc3dcd38 ffff8801cc3dcd38 ffff8801c81978a8 [ 20.730650] ffffffff8153dc23 ffff8801cc3dcd38 0000000000000008 0000000000000000 [ 20.738623] Call Trace: [ 20.741181] [] dump_stack+0xc1/0x128 [ 20.746525] [] print_address_description+0x73/0x280 [ 20.753172] [] kasan_report+0x275/0x360 [ 20.758766] [] ? __lock_acquire+0x2eff/0x3640 [ 20.764897] [] __asan_report_load8_noabort+0x14/0x20 [ 20.771622] [] __lock_acquire+0x2eff/0x3640 [ 20.777577] [] ? __lock_acquire+0x629/0x3640 [ 20.783604] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.790590] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.797572] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.804554] [] ? mark_held_locks+0xaf/0x100 [ 20.810496] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.816695] [] lock_acquire+0x12e/0x410 [ 20.822291] [] ? remove_wait_queue+0x14/0x40 [ 20.828318] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.834605] [] ? remove_wait_queue+0x14/0x40 [ 20.840633] [] remove_wait_queue+0x14/0x40 [ 20.846493] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.853475] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.860718] [] ? ep_free+0x1b0/0x1b0 [ 20.866063] [] ep_free+0x96/0x1b0 [ 20.871145] [] ? ep_free+0x1b0/0x1b0 [ 20.876477] [] ep_eventpoll_release+0x44/0x60 [ 20.882590] [] __fput+0x28c/0x6e0 [ 20.887662] [] ____fput+0x15/0x20 [ 20.892749] [] task_work_run+0x115/0x190 [ 20.898432] [] do_exit+0x7e7/0x2a40 [ 20.903678] [] ? __pmd_alloc+0x410/0x410 [ 20.909359] [] ? release_task+0x1240/0x1240 [ 20.915300] [] ? __do_page_fault+0x5ec/0xd40 [ 20.921331] [] ? up_read+0x1a/0x40 [ 20.926495] [] ? __do_page_fault+0x3bd/0xd40 [ 20.932524] [] do_group_exit+0x108/0x320 [ 20.938203] [] ? do_group_exit+0x320/0x320 [ 20.944059] [] SyS_exit_group+0x1d/0x20 [ 20.949652] [] do_fast_syscall_32+0x2f7/0x890 [ 20.955779] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.962420] [] entry_SYSENTER_compat+0x74/0x83 [ 20.968622] [ 20.970222] Allocated by task 3326: [ 20.973819] save_stack_trace+0x16/0x20 [ 20.977765] save_stack+0x43/0xd0 [ 20.981186] kasan_kmalloc+0xad/0xe0 [ 20.984869] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.989420] binder_get_thread+0x15d/0x750 [ 20.993621] binder_poll+0x4a/0x210 [ 20.997227] SyS_epoll_ctl+0x11d7/0x2190 [ 21.001270] do_fast_syscall_32+0x2f7/0x890 [ 21.005574] entry_SYSENTER_compat+0x74/0x83 [ 21.009950] [ 21.011545] Freed by task 3326: [ 21.014794] save_stack_trace+0x16/0x20 [ 21.018739] save_stack+0x43/0xd0 [ 21.022175] kasan_slab_free+0x72/0xc0 [ 21.026031] kfree+0x103/0x300 [ 21.029204] binder_thread_dec_tmpref+0x1cc/0x240 [ 21.034058] binder_thread_release+0x27d/0x540 [ 21.038629] binder_ioctl+0x9c0/0x11b0 [ 21.042492] compat_SyS_ioctl+0x15f/0x2050 [ 21.046697] do_fast_syscall_32+0x2f7/0x890 [ 21.050987] entry_SYSENTER_compat+0x74/0x83 [ 21.055361] [ 21.056958] The buggy address belongs to the object at ffff8801cc3dcc80 [ 21.056958] which belongs to the cache kmalloc-512 of size 512 [ 21.069597] The buggy address is located 184 bytes inside of [ 21.069597] 512-byte region [ffff8801cc3dcc80, ffff8801cc3dce80) [ 21.081439] The buggy address belongs to the page: [ 21.086339] page:ffffea000730f700 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 21.096511] flags: 0x8000000000004080(slab|head) [ 21.101233] page dumped because: kasan: bad access detected [ 21.106908] [ 21.108503] Memory state around the buggy address: [ 21.113401] ffff8801cc3dcc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.120726] ffff8801cc3dcc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.128053] >ffff8801cc3dcd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.135380] ^ [ 21.140550] ffff8801cc3dcd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.147885] ffff8801cc3dce00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.155214] ================================================================== [ 21.162537] Disabling lock debugging due to kernel taint [ 21.167953] Kernel panic - not syncing: panic_on_warn set ... [ 21.167953] [ 21.175298] CPU: 0 PID: 3326 Comm: syzkaller656584 Tainted: G B 4.9.78-g68d447c #32 [ 21.184190] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.193520] ffff8801c81977c8 ffffffff81d943a9 ffffffff841971bf ffff8801c81978a0 [ 21.201527] 0000000000000000 ffff8801cc3dcd38 ffff8801cc3dcd38 ffff8801c8197890 [ 21.209496] ffffffff8142f451 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f295 [ 21.217473] Call Trace: [ 21.220041] [] dump_stack+0xc1/0x128 [ 21.225387] [] panic+0x1bc/0x3a8 [ 21.230374] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 21.238573] [] ? add_taint+0x40/0x50 [ 21.243906] [] kasan_end_report+0x50/0x50 [ 21.249673] [] kasan_report+0x167/0x360 [ 21.255270] [] ? __lock_acquire+0x2eff/0x3640 [ 21.261388] [] __asan_report_load8_noabort+0x14/0x20 [ 21.268108] [] __lock_acquire+0x2eff/0x3640 [ 21.274046] [] ? __lock_acquire+0x629/0x3640 [ 21.280072] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.287051] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.294034] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.301016] [] ? mark_held_locks+0xaf/0x100 [ 21.306960] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.313164] [] lock_acquire+0x12e/0x410 [ 21.318763] [] ? remove_wait_queue+0x14/0x40 [ 21.324790] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.331077] [] ? remove_wait_queue+0x14/0x40 [ 21.337103] [] remove_wait_queue+0x14/0x40 [ 21.342962] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.349944] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.357199] [] ? ep_free+0x1b0/0x1b0 [ 21.362619] [] ep_free+0x96/0x1b0 [ 21.367693] [] ? ep_free+0x1b0/0x1b0 [ 21.373025] [] ep_eventpoll_release+0x44/0x60 [ 21.379136] [] __fput+0x28c/0x6e0 [ 21.384209] [] ____fput+0x15/0x20 [ 21.389289] [] task_work_run+0x115/0x190 [ 21.394968] [] do_exit+0x7e7/0x2a40 [ 21.400212] [] ? __pmd_alloc+0x410/0x410 [ 21.405896] [] ? release_task+0x1240/0x1240 [ 21.411839] [] ? __do_page_fault+0x5ec/0xd40 [ 21.417890] [] ? up_read+0x1a/0x40 [ 21.423060] [] ? __do_page_fault+0x3bd/0xd40 [ 21.429090] [] do_group_exit+0x108/0x320 [ 21.434770] [] ? do_group_exit+0x320/0x320 [ 21.440625] [] SyS_exit_group+0x1d/0x20 [ 21.446221] [] do_fast_syscall_32+0x2f7/0x890 [ 21.452344] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 21.458984] [] entry_SYSENTER_compat+0x74/0x83 [ 21.465623] Dumping ftrace buffer: [ 21.469676] (ftrace buffer empty) [ 21.473356] Kernel Offset: disabled [ 21.476948] Rebooting in 86400 seconds..