[....] Starting enhanced syslogd: rsyslogd[ 10.655389] audit: type=1400 audit(1514552513.763:4): avc: denied { syslog } for pid=3165 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.0.62' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.212182] ================================================================== [ 20.213418] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.214295] Read of size 8 at addr ffff8801c9633738 by task syzkaller185844/3314 [ 20.215306] [ 20.215538] CPU: 1 PID: 3314 Comm: syzkaller185844 Not tainted 4.9.72-gcb7518e #114 [ 20.216667] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.217935] ffff8801ca1978e0 ffffffff81d922b9 ffffea0007258c80 ffff8801c9633738 [ 20.219066] 0000000000000000 ffff8801c9633738 ffff8801c9633738 ffff8801ca197918 [ 20.220237] ffffffff8153bab3 ffff8801c9633738 0000000000000008 0000000000000000 [ 20.221383] Call Trace: [ 20.221740] [] dump_stack+0xc1/0x128 [ 20.222491] [] print_address_description+0x73/0x280 [ 20.223488] [] kasan_report+0x275/0x360 [ 20.224339] [] ? __lock_acquire+0x2eff/0x3640 [ 20.225225] [] __asan_report_load8_noabort+0x14/0x20 [ 20.226121] [] __lock_acquire+0x2eff/0x3640 [ 20.226963] [] ? __lock_acquire+0x629/0x3640 [ 20.227783] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.228821] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.229741] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.230697] [] ? mark_held_locks+0xaf/0x100 [ 20.231485] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.232533] [] lock_acquire+0x12e/0x410 [ 20.238121] [] ? remove_wait_queue+0x14/0x40 [ 20.244146] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.250432] [] ? remove_wait_queue+0x14/0x40 [ 20.256455] [] remove_wait_queue+0x14/0x40 [ 20.262307] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.269288] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.276526] [] ? ep_free+0x1b0/0x1b0 [ 20.281857] [] ep_free+0x96/0x1b0 [ 20.286927] [] ? ep_free+0x1b0/0x1b0 [ 20.292266] [] ep_eventpoll_release+0x44/0x60 [ 20.298380] [] __fput+0x28c/0x6e0 [ 20.303458] [] ____fput+0x15/0x20 [ 20.308526] [] task_work_run+0x115/0x190 [ 20.314202] [] do_exit+0x7e7/0x2a40 [ 20.319447] [] ? selinux_file_ioctl+0x355/0x530 [ 20.325733] [] ? release_task+0x1240/0x1240 [ 20.331679] [] ? SyS_epoll_create+0x190/0x190 [ 20.337798] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.344430] [] do_group_exit+0x108/0x320 [ 20.350113] [] SyS_exit_group+0x1d/0x20 [ 20.355705] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.362251] [ 20.363844] Allocated by task 3314: [ 20.367446] save_stack_trace+0x16/0x20 [ 20.371393] save_stack+0x43/0xd0 [ 20.374828] kasan_kmalloc+0xad/0xe0 [ 20.378505] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.383070] binder_get_thread+0x15d/0x750 [ 20.387285] binder_poll+0x4a/0x210 [ 20.390882] SyS_epoll_ctl+0x11d7/0x2190 [ 20.394907] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.399636] [ 20.401229] Freed by task 3314: [ 20.404474] save_stack_trace+0x16/0x20 [ 20.408413] save_stack+0x43/0xd0 [ 20.411833] kasan_slab_free+0x72/0xc0 [ 20.415685] kfree+0x103/0x300 [ 20.418846] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.423663] binder_thread_release+0x27d/0x540 [ 20.428209] binder_ioctl+0x9c0/0x11b0 [ 20.432061] do_vfs_ioctl+0x1aa/0x1140 [ 20.435921] SyS_ioctl+0x8f/0xc0 [ 20.439252] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.443969] [ 20.445565] The buggy address belongs to the object at ffff8801c9633680 [ 20.445565] which belongs to the cache kmalloc-512 of size 512 [ 20.458190] The buggy address is located 184 bytes inside of [ 20.458190] 512-byte region [ffff8801c9633680, ffff8801c9633880) [ 20.470032] The buggy address belongs to the page: [ 20.474942] page:ffffea0007258c80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.485129] flags: 0x8000000000004080(slab|head) [ 20.489847] page dumped because: kasan: bad access detected [ 20.495518] [ 20.497112] Memory state around the buggy address: [ 20.502004] ffff8801c9633600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.509327] ffff8801c9633680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.516662] >ffff8801c9633700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.523999] ^ [ 20.529171] ffff8801c9633780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.536501] ffff8801c9633800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.543832] ================================================================== [ 20.551161] Disabling lock debugging due to kernel taint [ 20.556578] Kernel panic - not syncing: panic_on_warn set ... [ 20.556578] [ 20.563927] CPU: 1 PID: 3314 Comm: syzkaller185844 Tainted: G B 4.9.72-gcb7518e #114 [ 20.572985] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.582314] ffff8801ca197838 ffffffff81d922b9 ffffffff841955bf ffff8801ca197910 [ 20.590265] 0000000000000000 ffff8801c9633738 ffff8801c9633738 ffff8801ca197900 [ 20.598213] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 20.606163] Call Trace: [ 20.608723] [] dump_stack+0xc1/0x128 [ 20.614057] [] panic+0x1bc/0x3a8 [ 20.619039] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.627234] [] ? add_taint+0x40/0x50 [ 20.632571] [] kasan_end_report+0x50/0x50 [ 20.638344] [] kasan_report+0x167/0x360 [ 20.643945] [] ? __lock_acquire+0x2eff/0x3640 [ 20.650058] [] __asan_report_load8_noabort+0x14/0x20 [ 20.656779] [] __lock_acquire+0x2eff/0x3640 [ 20.662716] [] ? __lock_acquire+0x629/0x3640 [ 20.668749] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.675737] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.682716] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.690536] [] ? mark_held_locks+0xaf/0x100 [ 20.696479] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.702678] [] lock_acquire+0x12e/0x410 [ 20.708269] [] ? remove_wait_queue+0x14/0x40 [ 20.714296] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.720579] [] ? remove_wait_queue+0x14/0x40 [ 20.726604] [] remove_wait_queue+0x14/0x40 [ 20.732452] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.739431] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.746670] [] ? ep_free+0x1b0/0x1b0 [ 20.752003] [] ep_free+0x96/0x1b0 [ 20.757070] [] ? ep_free+0x1b0/0x1b0 [ 20.762397] [] ep_eventpoll_release+0x44/0x60 [ 20.768519] [] __fput+0x28c/0x6e0 [ 20.773596] [] ____fput+0x15/0x20 [ 20.778665] [] task_work_run+0x115/0x190 [ 20.784343] [] do_exit+0x7e7/0x2a40 [ 20.789591] [] ? selinux_file_ioctl+0x355/0x530 [ 20.795879] [] ? release_task+0x1240/0x1240 [ 20.801834] [] ? SyS_epoll_create+0x190/0x190 [ 20.807947] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.814582] [] do_group_exit+0x108/0x320 [ 20.820262] [] SyS_exit_group+0x1d/0x20 [ 20.825864] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.832917] Dumping ftrace buffer: [ 20.836424] (ftrace buffer empty) [ 20.840103] Kernel Offset: disabled [ 20.843717] Rebooting in 86400 seconds..