[....] Starting enhanced syslogd: rsyslogd[ 14.971840] audit: type=1400 audit(1515688276.667: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.201' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 35.742759] ================================================================== [ 35.750322] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 35.750326] Read of size 8 at addr ffff8801c8522ab8 by task syzkaller100563/3335 [ 35.750327] [ 35.750333] CPU: 0 PID: 3335 Comm: syzkaller100563 Not tainted 4.9.76-g9154940 #20 [ 35.750335] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.750345] ffff8801c878f870 ffffffff81d93149 ffffea0007214880 ffff8801c8522ab8 [ 35.750350] 0000000000000000 ffff8801c8522ab8 ffff8801c8522ab8 ffff8801c878f8a8 [ 35.750355] ffffffff8153cb43 ffff8801c8522ab8 0000000000000008 0000000000000000 [ 35.750356] Call Trace: [ 35.750365] [] dump_stack+0xc1/0x128 [ 35.750372] [] print_address_description+0x73/0x280 [ 35.750376] [] kasan_report+0x275/0x360 [ 35.750380] [] ? __lock_acquire+0x2eff/0x3640 [ 35.750386] [] __asan_report_load8_noabort+0x14/0x20 [ 35.750390] [] __lock_acquire+0x2eff/0x3640 [ 35.750394] [] ? __lock_acquire+0x629/0x3640 [ 35.750398] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 35.750403] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 35.750407] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 35.750411] [] ? mark_held_locks+0xaf/0x100 [ 35.750420] [] ? mutex_lock_nested+0x5e3/0x870 [ 35.750424] [] lock_acquire+0x12e/0x410 [ 35.750428] [] ? remove_wait_queue+0x14/0x40 [ 35.750433] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 35.750436] [] ? remove_wait_queue+0x14/0x40 [ 35.750440] [] remove_wait_queue+0x14/0x40 [ 35.750447] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 35.750451] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 35.750454] [] ? ep_free+0x1b0/0x1b0 [ 35.750458] [] ep_free+0x96/0x1b0 [ 35.750462] [] ? ep_free+0x1b0/0x1b0 [ 35.750466] [] ep_eventpoll_release+0x44/0x60 [ 35.750473] [] __fput+0x28c/0x6e0 [ 35.750477] [] ____fput+0x15/0x20 [ 35.750483] [] task_work_run+0x115/0x190 [ 35.750489] [] do_exit+0x7e7/0x2a40 [ 35.750494] [] ? __pmd_alloc+0x410/0x410 [ 35.750499] [] ? release_task+0x1240/0x1240 [ 35.750506] [] ? __do_page_fault+0x5ec/0xd40 [ 35.750510] [] ? up_read+0x1a/0x40 [ 35.750514] [] ? __do_page_fault+0x3bd/0xd40 [ 35.750518] [] do_group_exit+0x108/0x320 [ 35.750528] [] ? do_group_exit+0x320/0x320 [ 35.750532] [] SyS_exit_group+0x1d/0x20 [ 35.750538] [] do_fast_syscall_32+0x2f7/0x890 [ 35.750542] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.750547] [] entry_SYSENTER_compat+0x74/0x83 [ 35.750549] [ 35.750551] Allocated by task 3335: [ 35.750556] save_stack_trace+0x16/0x20 [ 35.750560] save_stack+0x43/0xd0 [ 35.750563] kasan_kmalloc+0xad/0xe0 [ 35.750566] kmem_cache_alloc_trace+0xfb/0x2a0 [ 35.750572] binder_get_thread+0x15d/0x750 [ 35.750574] binder_poll+0x4a/0x210 [ 35.750577] SyS_epoll_ctl+0x11d7/0x2190 [ 35.750580] do_fast_syscall_32+0x2f7/0x890 [ 35.750583] entry_SYSENTER_compat+0x74/0x83 [ 35.750584] [ 35.750585] Freed by task 3335: [ 35.750588] save_stack_trace+0x16/0x20 [ 35.750591] save_stack+0x43/0xd0 [ 35.750594] kasan_slab_free+0x72/0xc0 [ 35.750596] kfree+0x103/0x300 [ 35.750600] binder_thread_dec_tmpref+0x1cc/0x240 [ 35.750603] binder_thread_release+0x27d/0x540 [ 35.750606] binder_ioctl+0x9c0/0x11b0 [ 35.750611] compat_SyS_ioctl+0x15f/0x2050 [ 35.750614] do_fast_syscall_32+0x2f7/0x890 [ 35.750617] entry_SYSENTER_compat+0x74/0x83 [ 35.750617] [ 35.750621] The buggy address belongs to the object at ffff8801c8522a00 [ 35.750621] which belongs to the cache kmalloc-512 of size 512 [ 35.750624] The buggy address is located 184 bytes inside of [ 35.750624] 512-byte region [ffff8801c8522a00, ffff8801c8522c00) [ 35.750625] The buggy address belongs to the page: [ 35.750631] page:ffffea0007214880 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 35.750635] flags: 0x8000000000004080(slab|head) [ 35.750637] page dumped because: kasan: bad access detected [ 35.750637] [ 35.750639] Memory state around the buggy address: [ 35.750643] ffff8801c8522980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 35.750645] ffff8801c8522a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.750648] >ffff8801c8522a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.750649] ^ [ 35.750652] ffff8801c8522b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.750654] ffff8801c8522b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.750655] ================================================================== [ 35.750657] Disabling lock debugging due to kernel taint [ 35.750660] Kernel panic - not syncing: panic_on_warn set ... [ 35.750660] [ 35.750664] CPU: 0 PID: 3335 Comm: syzkaller100563 Tainted: G B 4.9.76-g9154940 #20 [ 35.750666] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.750671] ffff8801c878f7c8 ffffffff81d93149 ffffffff84195c17 ffff8801c878f8a0 [ 35.750676] 0000000000000000 ffff8801c8522ab8 ffff8801c8522ab8 ffff8801c878f890 [ 35.750681] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 35.750682] Call Trace: [ 35.750686] [] dump_stack+0xc1/0x128 [ 35.750691] [] panic+0x1bc/0x3a8 [ 35.750696] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 35.750700] [] ? add_taint+0x40/0x50 [ 35.750704] [] kasan_end_report+0x50/0x50 [ 35.750707] [] kasan_report+0x167/0x360 [ 35.750712] [] ? __lock_acquire+0x2eff/0x3640 [ 35.750716] [] __asan_report_load8_noabort+0x14/0x20 [ 35.750720] [] __lock_acquire+0x2eff/0x3640 [ 35.750724] [] ? __lock_acquire+0x629/0x3640 [ 35.750728] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 35.750733] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 35.750737] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 35.750741] [] ? mark_held_locks+0xaf/0x100 [ 35.750745] [] ? mutex_lock_nested+0x5e3/0x870 [ 35.750749] [] lock_acquire+0x12e/0x410 [ 35.750753] [] ? remove_wait_queue+0x14/0x40 [ 35.750757] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 35.750760] [] ? remove_wait_queue+0x14/0x40 [ 35.750764] [] remove_wait_queue+0x14/0x40 [ 35.750768] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 35.750772] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 35.750775] [] ? ep_free+0x1b0/0x1b0 [ 35.750778] [] ep_free+0x96/0x1b0 [ 35.750782] [] ? ep_free+0x1b0/0x1b0 [ 35.750786] [] ep_eventpoll_release+0x44/0x60 [ 35.750790] [] __fput+0x28c/0x6e0 [ 35.750794] [] ____fput+0x15/0x20 [ 35.750798] [] task_work_run+0x115/0x190 [ 35.750802] [] do_exit+0x7e7/0x2a40 [ 35.750805] [] ? __pmd_alloc+0x410/0x410 [ 35.750809] [] ? release_task+0x1240/0x1240 [ 35.750813] [] ? __do_page_fault+0x5ec/0xd40 [ 35.750817] [] ? up_read+0x1a/0x40 [ 35.750820] [] ? __do_page_fault+0x3bd/0xd40 [ 35.750825] [] do_group_exit+0x108/0x320 [ 35.750829] [] ? do_group_exit+0x320/0x320 [ 35.750833] [] SyS_exit_group+0x1d/0x20 [ 35.750836] [] do_fast_syscall_32+0x2f7/0x890 [ 35.750840] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.750844] [] entry_SYSENTER_compat+0x74/0x83 [ 35.757942] Dumping ftrace buffer: [ 35.757945] (ftrace buffer empty) [ 35.757947] Kernel Offset: disabled [ 36.543719] Rebooting in 86400 seconds..