[....] Starting enhanced syslogd: rsyslogd[ 13.947396] audit: type=1400 audit(1516023893.081:4): avc: denied { syslog } for pid=3171 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.210' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 25.293873] ================================================================== [ 25.301289] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 25.307928] Read of size 8 at addr ffff8801c928c838 by task syzkaller456562/3326 [ 25.315428] [ 25.317031] CPU: 0 PID: 3326 Comm: syzkaller456562 Not tainted 4.9.76-g8dec074 #23 [ 25.324720] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.334051] ffff8801cf50f870 ffffffff81d93169 ffffea000724a300 ffff8801c928c838 [ 25.342029] 0000000000000000 ffff8801c928c838 ffff8801c928c838 ffff8801cf50f8a8 [ 25.350005] ffffffff8153cb43 ffff8801c928c838 0000000000000008 0000000000000000 [ 25.357976] Call Trace: [ 25.360537] [] dump_stack+0xc1/0x128 [ 25.365876] [] print_address_description+0x73/0x280 [ 25.372515] [] kasan_report+0x275/0x360 [ 25.378119] [] ? __lock_acquire+0x2eff/0x3640 [ 25.384236] [] __asan_report_load8_noabort+0x14/0x20 [ 25.390967] [] __lock_acquire+0x2eff/0x3640 [ 25.396910] [] ? __lock_acquire+0x629/0x3640 [ 25.402938] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.409934] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.416916] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.423907] [] ? mark_held_locks+0xaf/0x100 [ 25.429869] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.436083] [] lock_acquire+0x12e/0x410 [ 25.441690] [] ? remove_wait_queue+0x14/0x40 [ 25.447715] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.454015] [] ? remove_wait_queue+0x14/0x40 [ 25.460048] [] remove_wait_queue+0x14/0x40 [ 25.465903] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.472897] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.480150] [] ? ep_free+0x1b0/0x1b0 [ 25.485507] [] ep_free+0x96/0x1b0 [ 25.490581] [] ? ep_free+0x1b0/0x1b0 [ 25.495911] [] ep_eventpoll_release+0x44/0x60 [ 25.502028] [] __fput+0x28c/0x6e0 [ 25.507107] [] ____fput+0x15/0x20 [ 25.512181] [] task_work_run+0x115/0x190 [ 25.517863] [] do_exit+0x7e7/0x2a40 [ 25.523110] [] ? __pmd_alloc+0x410/0x410 [ 25.528791] [] ? release_task+0x1240/0x1240 [ 25.534745] [] ? __do_page_fault+0x5ec/0xd40 [ 25.540774] [] ? up_read+0x1a/0x40 [ 25.545940] [] ? __do_page_fault+0x3bd/0xd40 [ 25.551980] [] do_group_exit+0x108/0x320 [ 25.557672] [] ? do_group_exit+0x320/0x320 [ 25.563527] [] SyS_exit_group+0x1d/0x20 [ 25.569134] [] do_fast_syscall_32+0x2f7/0x890 [ 25.575249] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.581892] [] entry_SYSENTER_compat+0x74/0x83 [ 25.588117] [ 25.589731] Allocated by task 3326: [ 25.593333] save_stack_trace+0x16/0x20 [ 25.597276] save_stack+0x43/0xd0 [ 25.600700] kasan_kmalloc+0xad/0xe0 [ 25.604383] kmem_cache_alloc_trace+0xfb/0x2a0 [ 25.608938] binder_get_thread+0x15d/0x750 [ 25.613143] binder_poll+0x4a/0x210 [ 25.616753] SyS_epoll_ctl+0x11d7/0x2190 [ 25.620785] do_fast_syscall_32+0x2f7/0x890 [ 25.625088] entry_SYSENTER_compat+0x74/0x83 [ 25.629463] [ 25.631065] Freed by task 3326: [ 25.634328] save_stack_trace+0x16/0x20 [ 25.638274] save_stack+0x43/0xd0 [ 25.641698] kasan_slab_free+0x72/0xc0 [ 25.645575] kfree+0x103/0x300 [ 25.648740] binder_thread_dec_tmpref+0x1cc/0x240 [ 25.653552] binder_thread_release+0x27d/0x540 [ 25.658118] binder_ioctl+0x9c0/0x11b0 [ 25.661991] compat_SyS_ioctl+0x15f/0x2050 [ 25.666212] do_fast_syscall_32+0x2f7/0x890 [ 25.670508] entry_SYSENTER_compat+0x74/0x83 [ 25.674891] [ 25.676491] The buggy address belongs to the object at ffff8801c928c780 [ 25.676491] which belongs to the cache kmalloc-512 of size 512 [ 25.689132] The buggy address is located 184 bytes inside of [ 25.689132] 512-byte region [ffff8801c928c780, ffff8801c928c980) [ 25.700977] The buggy address belongs to the page: [ 25.705882] page:ffffea000724a300 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 25.716068] flags: 0x8000000000004080(slab|head) [ 25.720791] page dumped because: kasan: bad access detected [ 25.726468] [ 25.728064] Memory state around the buggy address: [ 25.732975] ffff8801c928c700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.740306] ffff8801c928c780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.747642] >ffff8801c928c800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.755216] ^ [ 25.760376] ffff8801c928c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.767719] ffff8801c928c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.775052] ================================================================== [ 25.782384] Disabling lock debugging due to kernel taint [ 25.787804] Kernel panic - not syncing: panic_on_warn set ... [ 25.787804] [ 25.795139] CPU: 0 PID: 3326 Comm: syzkaller456562 Tainted: G B 4.9.76-g8dec074 #23 [ 25.804033] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.813378] ffff8801cf50f7c8 ffffffff81d93169 ffffffff84195c2f ffff8801cf50f8a0 [ 25.821359] 0000000000000000 ffff8801c928c838 ffff8801c928c838 ffff8801cf50f890 [ 25.829343] ffffffff8142e371 0000000041b58ab3 ffffffff84189690 ffffffff8142e1b5 [ 25.837353] Call Trace: [ 25.839914] [] dump_stack+0xc1/0x128 [ 25.845250] [] panic+0x1bc/0x3a8 [ 25.850239] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 25.858436] [] ? add_taint+0x40/0x50 [ 25.863771] [] kasan_end_report+0x50/0x50 [ 25.869540] [] kasan_report+0x167/0x360 [ 25.875138] [] ? __lock_acquire+0x2eff/0x3640 [ 25.881252] [] __asan_report_load8_noabort+0x14/0x20 [ 25.887974] [] __lock_acquire+0x2eff/0x3640 [ 25.893916] [] ? __lock_acquire+0x629/0x3640 [ 25.899945] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.906945] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.913929] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.920915] [] ? mark_held_locks+0xaf/0x100 [ 25.926858] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.933074] [] lock_acquire+0x12e/0x410 [ 25.938684] [] ? remove_wait_queue+0x14/0x40 [ 25.944813] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.951103] [] ? remove_wait_queue+0x14/0x40 [ 25.957142] [] remove_wait_queue+0x14/0x40 [ 25.963000] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.969985] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.977228] [] ? ep_free+0x1b0/0x1b0 [ 25.982562] [] ep_free+0x96/0x1b0 [ 25.987647] [] ? ep_free+0x1b0/0x1b0 [ 25.992981] [] ep_eventpoll_release+0x44/0x60 [ 25.999110] [] __fput+0x28c/0x6e0 [ 26.004183] [] ____fput+0x15/0x20 [ 26.009260] [] task_work_run+0x115/0x190 [ 26.014942] [] do_exit+0x7e7/0x2a40 [ 26.020193] [] ? __pmd_alloc+0x410/0x410 [ 26.025877] [] ? release_task+0x1240/0x1240 [ 26.031821] [] ? __do_page_fault+0x5ec/0xd40 [ 26.037850] [] ? up_read+0x1a/0x40 [ 26.043026] [] ? __do_page_fault+0x3bd/0xd40 [ 26.049058] [] do_group_exit+0x108/0x320 [ 26.054742] [] ? do_group_exit+0x320/0x320 [ 26.060597] [] SyS_exit_group+0x1d/0x20 [ 26.066214] [] do_fast_syscall_32+0x2f7/0x890 [ 26.072342] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.078981] [] entry_SYSENTER_compat+0x74/0x83 [ 26.085590] Dumping ftrace buffer: [ 26.089103] (ftrace buffer empty) [ 26.092788] Kernel Offset: disabled [ 26.096385] Rebooting in 86400 seconds..