[....] Starting enhanced syslogd: rsyslogd[ 10.390736] audit: type=1400 audit(1516383896.082:4): avc: denied { syslog } for pid=3176 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.222' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 36.859597] ================================================================== [ 36.860691] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 36.861569] Read of size 8 at addr ffff8801cd4779b8 by task syzkaller934640/3343 [ 36.862555] [ 36.862812] CPU: 0 PID: 3343 Comm: syzkaller934640 Not tainted 4.9.77-g9c3804b #26 [ 36.863891] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.865146] ffff8801c6d6f870 ffffffff81d941c9 ffffea0007351d80 ffff8801cd4779b8 [ 36.866311] 0000000000000000 ffff8801cd4779b8 ffff8801cd4779b8 ffff8801c6d6f8a8 [ 36.867473] ffffffff8153db93 ffff8801cd4779b8 0000000000000008 0000000000000000 [ 36.868657] Call Trace: [ 36.869019] [] dump_stack+0xc1/0x128 [ 36.869744] [] print_address_description+0x73/0x280 [ 36.870667] [] kasan_report+0x275/0x360 [ 36.871443] [] ? __lock_acquire+0x2eff/0x3640 [ 36.872263] [] __asan_report_load8_noabort+0x14/0x20 [ 36.873153] [] __lock_acquire+0x2eff/0x3640 [ 36.873960] [] ? __lock_acquire+0x629/0x3640 [ 36.874775] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 36.875718] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 36.876663] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 36.877649] [] ? mark_held_locks+0xaf/0x100 [ 36.878440] [] ? mutex_lock_nested+0x5e3/0x870 [ 36.879273] [] lock_acquire+0x12e/0x410 [ 36.880031] [] ? remove_wait_queue+0x14/0x40 [ 36.886070] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 36.892360] [] ? remove_wait_queue+0x14/0x40 [ 36.898388] [] remove_wait_queue+0x14/0x40 [ 36.904246] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 36.911236] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 36.918484] [] ? ep_free+0x1b0/0x1b0 [ 36.923825] [] ep_free+0x96/0x1b0 [ 36.928899] [] ? ep_free+0x1b0/0x1b0 [ 36.934235] [] ep_eventpoll_release+0x44/0x60 [ 36.940359] [] __fput+0x28c/0x6e0 [ 36.946393] [] ____fput+0x15/0x20 [ 36.953466] [] task_work_run+0x115/0x190 [ 36.959672] [] do_exit+0x7e7/0x2a40 [ 36.964921] [] ? __pmd_alloc+0x410/0x410 [ 36.970615] [] ? release_task+0x1240/0x1240 [ 36.976560] [] ? __do_page_fault+0x5ec/0xd40 [ 36.982588] [] ? up_read+0x1a/0x40 [ 36.987748] [] ? __do_page_fault+0x3bd/0xd40 [ 36.993799] [] do_group_exit+0x108/0x320 [ 36.999481] [] ? do_group_exit+0x320/0x320 [ 37.005348] [] SyS_exit_group+0x1d/0x20 [ 37.010946] [] do_fast_syscall_32+0x2f7/0x890 [ 37.017063] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.023700] [] entry_SYSENTER_compat+0x74/0x83 [ 37.029901] [ 37.031500] Allocated by task 3343: [ 37.035110] save_stack_trace+0x16/0x20 [ 37.039060] save_stack+0x43/0xd0 [ 37.042498] kasan_kmalloc+0xad/0xe0 [ 37.046185] kmem_cache_alloc_trace+0xfb/0x2a0 [ 37.050747] binder_get_thread+0x15d/0x750 [ 37.054954] binder_poll+0x4a/0x210 [ 37.058553] SyS_epoll_ctl+0x11d7/0x2190 [ 37.062583] do_fast_syscall_32+0x2f7/0x890 [ 37.066876] entry_SYSENTER_compat+0x74/0x83 [ 37.071252] [ 37.072847] Freed by task 3343: [ 37.076108] save_stack_trace+0x16/0x20 [ 37.080063] save_stack+0x43/0xd0 [ 37.083484] kasan_slab_free+0x72/0xc0 [ 37.087342] kfree+0x103/0x300 [ 37.090505] binder_thread_dec_tmpref+0x1cc/0x240 [ 37.095318] binder_thread_release+0x27d/0x540 [ 37.099879] binder_ioctl+0x9c0/0x11b0 [ 37.103735] compat_SyS_ioctl+0x15f/0x2050 [ 37.107942] do_fast_syscall_32+0x2f7/0x890 [ 37.112231] entry_SYSENTER_compat+0x74/0x83 [ 37.116606] [ 37.118203] The buggy address belongs to the object at ffff8801cd477900 [ 37.118203] which belongs to the cache kmalloc-512 of size 512 [ 37.130830] The buggy address is located 184 bytes inside of [ 37.130830] 512-byte region [ffff8801cd477900, ffff8801cd477b00) [ 37.143832] The buggy address belongs to the page: [ 37.148736] page:ffffea0007351d80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 37.158907] flags: 0x8000000000004080(slab|head) [ 37.164257] page dumped because: kasan: bad access detected [ 37.171063] [ 37.172657] Memory state around the buggy address: [ 37.177555] ffff8801cd477880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.184893] ffff8801cd477900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.193441] >ffff8801cd477980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.200778] ^ [ 37.205950] ffff8801cd477a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.213279] ffff8801cd477a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 37.220604] ================================================================== [ 37.227941] Disabling lock debugging due to kernel taint [ 37.233368] Kernel panic - not syncing: panic_on_warn set ... [ 37.233368] [ 37.240703] CPU: 0 PID: 3343 Comm: syzkaller934640 Tainted: G B 4.9.77-g9c3804b #26 [ 37.249777] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.259115] ffff8801c6d6f7c8 ffffffff81d941c9 ffffffff841970ff ffff8801c6d6f8a0 [ 37.267091] 0000000000000000 ffff8801cd4779b8 ffff8801cd4779b8 ffff8801c6d6f890 [ 37.275067] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 37.283043] Call Trace: [ 37.285604] [] dump_stack+0xc1/0x128 [ 37.291112] [] panic+0x1bc/0x3a8 [ 37.297365] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 37.306619] [] ? add_taint+0x40/0x50 [ 37.312389] [] kasan_end_report+0x50/0x50 [ 37.320412] [] kasan_report+0x167/0x360 [ 37.326804] [] ? __lock_acquire+0x2eff/0x3640 [ 37.332920] [] __asan_report_load8_noabort+0x14/0x20 [ 37.339656] [] __lock_acquire+0x2eff/0x3640 [ 37.345596] [] ? __lock_acquire+0x629/0x3640 [ 37.351624] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.358618] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.365606] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.372590] [] ? mark_held_locks+0xaf/0x100 [ 37.378544] [] ? mutex_lock_nested+0x5e3/0x870 [ 37.384748] [] lock_acquire+0x12e/0x410 [ 37.390341] [] ? remove_wait_queue+0x14/0x40 [ 37.396371] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 37.402660] [] ? remove_wait_queue+0x14/0x40 [ 37.408687] [] remove_wait_queue+0x14/0x40 [ 37.414541] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 37.421534] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 37.428789] [] ? ep_free+0x1b0/0x1b0 [ 37.434125] [] ep_free+0x96/0x1b0 [ 37.439221] [] ? ep_free+0x1b0/0x1b0 [ 37.444556] [] ep_eventpoll_release+0x44/0x60 [ 37.450669] [] __fput+0x28c/0x6e0 [ 37.455743] [] ____fput+0x15/0x20 [ 37.460815] [] task_work_run+0x115/0x190 [ 37.467386] [] do_exit+0x7e7/0x2a40 [ 37.472644] [] ? __pmd_alloc+0x410/0x410 [ 37.478334] [] ? release_task+0x1240/0x1240 [ 37.484285] [] ? __do_page_fault+0x5ec/0xd40 [ 37.490312] [] ? up_read+0x1a/0x40 [ 37.495472] [] ? __do_page_fault+0x3bd/0xd40 [ 37.501502] [] do_group_exit+0x108/0x320 [ 37.507183] [] ? do_group_exit+0x320/0x320 [ 37.513048] [] SyS_exit_group+0x1d/0x20 [ 37.518642] [] do_fast_syscall_32+0x2f7/0x890 [ 37.524755] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.531391] [] entry_SYSENTER_compat+0x74/0x83 [ 37.538399] Dumping ftrace buffer: [ 37.541910] (ftrace buffer empty) [ 37.545589] Kernel Offset: disabled [ 37.549183] Rebooting in 86400 seconds..