[....] Starting enhanced syslogd: rsyslogd[ 10.994748] audit: type=1400 audit(1515607349.422: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 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.202' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 25.591062] ================================================================== [ 25.592239] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 25.593133] Read of size 8 at addr ffff8801c8f66838 by task syzkaller600551/3333 [ 25.594118] [ 25.594349] CPU: 1 PID: 3333 Comm: syzkaller600551 Not tainted 4.9.76-g9154940 #20 [ 25.595414] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.596633] ffff8801cd5af870 ffffffff81d93149 ffffea000723d980 ffff8801c8f66838 [ 25.597783] 0000000000000000 ffff8801c8f66838 ffff8801c8f66838 ffff8801cd5af8a8 [ 25.598977] ffffffff8153cb43 ffff8801c8f66838 0000000000000008 0000000000000000 [ 25.600201] Call Trace: [ 25.600589] [] dump_stack+0xc1/0x128 [ 25.601330] [] print_address_description+0x73/0x280 [ 25.602207] [] kasan_report+0x275/0x360 [ 25.602964] [] ? __lock_acquire+0x2eff/0x3640 [ 25.603773] [] __asan_report_load8_noabort+0x14/0x20 [ 25.604706] [] __lock_acquire+0x2eff/0x3640 [ 25.605493] [] ? __lock_acquire+0x629/0x3640 [ 25.606292] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.607234] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.608154] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.609085] [] ? mark_held_locks+0xaf/0x100 [ 25.609873] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.610704] [] lock_acquire+0x12e/0x410 [ 25.613218] [] ? remove_wait_queue+0x14/0x40 [ 25.619243] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.625529] [] ? remove_wait_queue+0x14/0x40 [ 25.631567] [] remove_wait_queue+0x14/0x40 [ 25.637439] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.644424] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.651663] [] ? ep_free+0x1b0/0x1b0 [ 25.656992] [] ep_free+0x96/0x1b0 [ 25.662070] [] ? ep_free+0x1b0/0x1b0 [ 25.667418] [] ep_eventpoll_release+0x44/0x60 [ 25.673537] [] __fput+0x28c/0x6e0 [ 25.678611] [] ____fput+0x15/0x20 [ 25.683681] [] task_work_run+0x115/0x190 [ 25.689359] [] do_exit+0x7e7/0x2a40 [ 25.694601] [] ? __pmd_alloc+0x410/0x410 [ 25.700299] [] ? release_task+0x1240/0x1240 [ 25.706245] [] ? __do_page_fault+0x5ec/0xd40 [ 25.712272] [] ? up_read+0x1a/0x40 [ 25.717430] [] ? __do_page_fault+0x3bd/0xd40 [ 25.723455] [] do_group_exit+0x108/0x320 [ 25.729137] [] ? do_group_exit+0x320/0x320 [ 25.734989] [] SyS_exit_group+0x1d/0x20 [ 25.740595] [] do_fast_syscall_32+0x2f7/0x890 [ 25.746711] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.753347] [] entry_SYSENTER_compat+0x74/0x83 [ 25.759543] [ 25.761137] Allocated by task 3333: [ 25.764732] save_stack_trace+0x16/0x20 [ 25.768671] save_stack+0x43/0xd0 [ 25.772090] kasan_kmalloc+0xad/0xe0 [ 25.775770] kmem_cache_alloc_trace+0xfb/0x2a0 [ 25.780321] binder_get_thread+0x15d/0x750 [ 25.784521] binder_poll+0x4a/0x210 [ 25.788115] SyS_epoll_ctl+0x11d7/0x2190 [ 25.792140] do_fast_syscall_32+0x2f7/0x890 [ 25.796428] entry_SYSENTER_compat+0x74/0x83 [ 25.800800] [ 25.802395] Freed by task 3333: [ 25.805639] save_stack_trace+0x16/0x20 [ 25.809578] save_stack+0x43/0xd0 [ 25.812995] kasan_slab_free+0x72/0xc0 [ 25.816848] kfree+0x103/0x300 [ 25.820008] binder_thread_dec_tmpref+0x1cc/0x240 [ 25.824816] binder_thread_release+0x27d/0x540 [ 25.829366] binder_ioctl+0x9c0/0x11b0 [ 25.833222] compat_SyS_ioctl+0x15f/0x2050 [ 25.837425] do_fast_syscall_32+0x2f7/0x890 [ 25.841713] entry_SYSENTER_compat+0x74/0x83 [ 25.846086] [ 25.847681] The buggy address belongs to the object at ffff8801c8f66780 [ 25.847681] which belongs to the cache kmalloc-512 of size 512 [ 25.860304] The buggy address is located 184 bytes inside of [ 25.860304] 512-byte region [ffff8801c8f66780, ffff8801c8f66980) [ 25.872151] The buggy address belongs to the page: [ 25.877049] page:ffffea000723d980 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 25.887207] flags: 0x8000000000004080(slab|head) [ 25.891925] page dumped because: kasan: bad access detected [ 25.897599] [ 25.899193] Memory state around the buggy address: [ 25.904090] ffff8801c8f66700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.911415] ffff8801c8f66780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.918748] >ffff8801c8f66800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.926081] ^ [ 25.931243] ffff8801c8f66880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.938583] ffff8801c8f66900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.945905] ================================================================== [ 25.953228] Disabling lock debugging due to kernel taint [ 25.958642] Kernel panic - not syncing: panic_on_warn set ... [ 25.958642] [ 25.965991] CPU: 1 PID: 3333 Comm: syzkaller600551 Tainted: G B 4.9.76-g9154940 #20 [ 25.974892] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.984227] ffff8801cd5af7c8 ffffffff81d93149 ffffffff84195c17 ffff8801cd5af8a0 [ 25.992202] 0000000000000000 ffff8801c8f66838 ffff8801c8f66838 ffff8801cd5af890 [ 26.000172] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 26.008130] Call Trace: [ 26.010691] [] dump_stack+0xc1/0x128 [ 26.016025] [] panic+0x1bc/0x3a8 [ 26.021011] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.029209] [] ? add_taint+0x40/0x50 [ 26.034540] [] kasan_end_report+0x50/0x50 [ 26.040308] [] kasan_report+0x167/0x360 [ 26.045902] [] ? __lock_acquire+0x2eff/0x3640 [ 26.052016] [] __asan_report_load8_noabort+0x14/0x20 [ 26.058747] [] __lock_acquire+0x2eff/0x3640 [ 26.064689] [] ? __lock_acquire+0x629/0x3640 [ 26.070715] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.077700] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.084684] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.091668] [] ? mark_held_locks+0xaf/0x100 [ 26.097616] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.103819] [] lock_acquire+0x12e/0x410 [ 26.109415] [] ? remove_wait_queue+0x14/0x40 [ 26.115452] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.121748] [] ? remove_wait_queue+0x14/0x40 [ 26.127773] [] remove_wait_queue+0x14/0x40 [ 26.133639] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.140624] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.147871] [] ? ep_free+0x1b0/0x1b0 [ 26.153200] [] ep_free+0x96/0x1b0 [ 26.158272] [] ? ep_free+0x1b0/0x1b0 [ 26.163612] [] ep_eventpoll_release+0x44/0x60 [ 26.169727] [] __fput+0x28c/0x6e0 [ 26.174800] [] ____fput+0x15/0x20 [ 26.179873] [] task_work_run+0x115/0x190 [ 26.185562] [] do_exit+0x7e7/0x2a40 [ 26.190806] [] ? __pmd_alloc+0x410/0x410 [ 26.196483] [] ? release_task+0x1240/0x1240 [ 26.202424] [] ? __do_page_fault+0x5ec/0xd40 [ 26.208449] [] ? up_read+0x1a/0x40 [ 26.213606] [] ? __do_page_fault+0x3bd/0xd40 [ 26.219643] [] do_group_exit+0x108/0x320 [ 26.225332] [] ? do_group_exit+0x320/0x320 [ 26.231184] [] SyS_exit_group+0x1d/0x20 [ 26.236777] [] do_fast_syscall_32+0x2f7/0x890 [ 26.242888] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.249523] [] entry_SYSENTER_compat+0x74/0x83 [ 26.256117] Dumping ftrace buffer: [ 26.259626] (ftrace buffer empty) [ 26.263303] Kernel Offset: disabled [ 26.266898] Rebooting in 86400 seconds..