[....] Starting enhanced syslogd: rsyslogd[ 12.051194] audit: type=1400 audit(1515135900.987:4): avc: denied { syslog } for pid=3172 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 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.43' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.382471] ================================================================== [ 20.389846] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.396475] Read of size 8 at addr ffff8801ccd21238 by task syzkaller807841/3327 [ 20.403969] [ 20.405563] CPU: 1 PID: 3327 Comm: syzkaller807841 Not tainted 4.9.74-g173c52e #4 [ 20.413145] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.422465] ffff8801c85d78e0 ffffffff81d91b09 ffffea0007334800 ffff8801ccd21238 [ 20.430411] 0000000000000000 ffff8801ccd21238 ffff8801ccd21238 ffff8801c85d7918 [ 20.438362] ffffffff8153b503 ffff8801ccd21238 0000000000000008 0000000000000000 [ 20.446306] Call Trace: [ 20.448856] [] dump_stack+0xc1/0x128 [ 20.454184] [] print_address_description+0x73/0x280 [ 20.460812] [] kasan_report+0x275/0x360 [ 20.466401] [] ? __lock_acquire+0x2eff/0x3640 [ 20.472510] [] __asan_report_load8_noabort+0x14/0x20 [ 20.479224] [] __lock_acquire+0x2eff/0x3640 [ 20.485166] [] ? __lock_acquire+0x629/0x3640 [ 20.491188] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.498166] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.505142] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.512118] [] ? mark_held_locks+0xaf/0x100 [ 20.518052] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.524249] [] lock_acquire+0x12e/0x410 [ 20.529836] [] ? remove_wait_queue+0x14/0x40 [ 20.535855] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.542139] [] ? remove_wait_queue+0x14/0x40 [ 20.548159] [] remove_wait_queue+0x14/0x40 [ 20.554007] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.560985] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.568219] [] ? ep_free+0x1b0/0x1b0 [ 20.573546] [] ep_free+0x96/0x1b0 [ 20.578613] [] ? ep_free+0x1b0/0x1b0 [ 20.583938] [] ep_eventpoll_release+0x44/0x60 [ 20.590049] [] __fput+0x28c/0x6e0 [ 20.595115] [] ____fput+0x15/0x20 [ 20.600182] [] task_work_run+0x115/0x190 [ 20.605858] [] do_exit+0x7e7/0x2a40 [ 20.611099] [] ? selinux_file_ioctl+0x355/0x530 [ 20.617381] [] ? release_task+0x1240/0x1240 [ 20.623315] [] ? SyS_epoll_create+0x190/0x190 [ 20.629425] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.636053] [] do_group_exit+0x108/0x320 [ 20.641726] [] SyS_exit_group+0x1d/0x20 [ 20.647316] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.653855] [ 20.655449] Allocated by task 3327: [ 20.659042] save_stack_trace+0x16/0x20 [ 20.662981] save_stack+0x43/0xd0 [ 20.666397] kasan_kmalloc+0xad/0xe0 [ 20.670072] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.674620] binder_get_thread+0x15d/0x750 [ 20.678815] binder_poll+0x4a/0x210 [ 20.682404] SyS_epoll_ctl+0x11d7/0x2190 [ 20.686426] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.691144] [ 20.692737] Freed by task 3327: [ 20.695981] save_stack_trace+0x16/0x20 [ 20.699915] save_stack+0x43/0xd0 [ 20.703332] kasan_slab_free+0x72/0xc0 [ 20.707185] kfree+0x103/0x300 [ 20.710342] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.715147] binder_thread_release+0x27d/0x540 [ 20.719690] binder_ioctl+0x9c0/0x11b0 [ 20.723543] do_vfs_ioctl+0x1aa/0x1140 [ 20.727400] SyS_ioctl+0x8f/0xc0 [ 20.730732] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.735449] [ 20.737041] The buggy address belongs to the object at ffff8801ccd21180 [ 20.737041] which belongs to the cache kmalloc-512 of size 512 [ 20.749665] The buggy address is located 184 bytes inside of [ 20.749665] 512-byte region [ffff8801ccd21180, ffff8801ccd21380) [ 20.761499] The buggy address belongs to the page: [ 20.766394] page:ffffea0007334800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.776546] flags: 0x8000000000004080(slab|head) [ 20.781263] page dumped because: kasan: bad access detected [ 20.786932] [ 20.788523] Memory state around the buggy address: [ 20.793413] ffff8801ccd21100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.800735] ffff8801ccd21180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.808059] >ffff8801ccd21200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.815379] ^ [ 20.820532] ffff8801ccd21280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.827855] ffff8801ccd21300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.835176] ================================================================== [ 20.842497] Disabling lock debugging due to kernel taint [ 20.847907] Kernel panic - not syncing: panic_on_warn set ... [ 20.847907] [ 20.855233] CPU: 1 PID: 3327 Comm: syzkaller807841 Tainted: G B 4.9.74-g173c52e #4 [ 20.864032] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.873352] ffff8801c85d7838 ffffffff81d91b09 ffffffff841955df ffff8801c85d7910 [ 20.881303] 0000000000000000 ffff8801ccd21238 ffff8801ccd21238 ffff8801c85d7900 [ 20.889262] ffffffff8142d161 0000000041b58ab3 ffffffff84189020 ffffffff8142cfa5 [ 20.897200] Call Trace: [ 20.899751] [] dump_stack+0xc1/0x128 [ 20.905081] [] panic+0x1bc/0x3a8 [ 20.910061] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.918255] [] ? add_taint+0x40/0x50 [ 20.925147] [] kasan_end_report+0x50/0x50 [ 20.930908] [] kasan_report+0x167/0x360 [ 20.936496] [] ? __lock_acquire+0x2eff/0x3640 [ 20.942603] [] __asan_report_load8_noabort+0x14/0x20 [ 20.949316] [] __lock_acquire+0x2eff/0x3640 [ 20.955249] [] ? __lock_acquire+0x629/0x3640 [ 20.961270] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.968246] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.975226] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.982201] [] ? mark_held_locks+0xaf/0x100 [ 20.988138] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.994333] [] lock_acquire+0x12e/0x410 [ 21.000445] [] ? remove_wait_queue+0x14/0x40 [ 21.007856] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.014135] [] ? remove_wait_queue+0x14/0x40 [ 21.020153] [] remove_wait_queue+0x14/0x40 [ 21.026000] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.032974] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.040209] [] ? ep_free+0x1b0/0x1b0 [ 21.045536] [] ep_free+0x96/0x1b0 [ 21.050600] [] ? ep_free+0x1b0/0x1b0 [ 21.055926] [] ep_eventpoll_release+0x44/0x60 [ 21.062036] [] __fput+0x28c/0x6e0 [ 21.067102] [] ____fput+0x15/0x20 [ 21.072167] [] task_work_run+0x115/0x190 [ 21.078454] [] do_exit+0x7e7/0x2a40 [ 21.085433] [] ? selinux_file_ioctl+0x355/0x530 [ 21.093363] [] ? release_task+0x1240/0x1240 [ 21.101249] [] ? SyS_epoll_create+0x190/0x190 [ 21.108922] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 21.115551] [] do_group_exit+0x108/0x320 [ 21.121229] [] SyS_exit_group+0x1d/0x20 [ 21.126815] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 21.133391] Dumping ftrace buffer: [ 21.136894] (ftrace buffer empty) [ 21.140571] Kernel Offset: disabled [ 21.144159] Rebooting in 86400 seconds..