[....] Starting enhanced syslogd: rsyslogd[ 12.202424] audit: type=1400 audit(1516984224.966:4): avc: denied { syslog } for pid=3162 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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.28' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.764751] ================================================================== [ 19.772131] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.778765] Read of size 8 at addr ffff8801cd006838 by task syzkaller284393/3317 [ 19.786269] [ 19.787867] CPU: 1 PID: 3317 Comm: syzkaller284393 Not tainted 4.9.78-gf518fe4 #22 [ 19.795539] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.804865] ffff8801c99e78e0 ffffffff81d943a9 ffffea0007340180 ffff8801cd006838 [ 19.812824] 0000000000000000 ffff8801cd006838 ffff8801cd006838 ffff8801c99e7918 [ 19.820787] ffffffff8153dc23 ffff8801cd006838 0000000000000008 0000000000000000 [ 19.828761] Call Trace: [ 19.831328] [] dump_stack+0xc1/0x128 [ 19.836660] [] print_address_description+0x73/0x280 [ 19.843299] [] kasan_report+0x275/0x360 [ 19.848895] [] ? __lock_acquire+0x2eff/0x3640 [ 19.855012] [] __asan_report_load8_noabort+0x14/0x20 [ 19.861737] [] __lock_acquire+0x2eff/0x3640 [ 19.867766] [] ? __lock_acquire+0x629/0x3640 [ 19.873804] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.880799] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.887783] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.894763] [] ? mark_held_locks+0xaf/0x100 [ 19.900707] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.906907] [] lock_acquire+0x12e/0x410 [ 19.912501] [] ? remove_wait_queue+0x14/0x40 [ 19.918532] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.924820] [] ? remove_wait_queue+0x14/0x40 [ 19.930853] [] remove_wait_queue+0x14/0x40 [ 19.936719] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.943703] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.950948] [] ? ep_free+0x1b0/0x1b0 [ 19.956278] [] ep_free+0x96/0x1b0 [ 19.961352] [] ? ep_free+0x1b0/0x1b0 [ 19.966683] [] ep_eventpoll_release+0x44/0x60 [ 19.972795] [] __fput+0x28c/0x6e0 [ 19.977872] [] ____fput+0x15/0x20 [ 19.983031] [] task_work_run+0x115/0x190 [ 19.988719] [] do_exit+0x7e7/0x2a40 [ 19.993966] [] ? selinux_file_ioctl+0x355/0x530 [ 20.000260] [] ? release_task+0x1240/0x1240 [ 20.006202] [] ? SyS_epoll_create+0x190/0x190 [ 20.012318] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 20.018956] [] do_group_exit+0x108/0x320 [ 20.024637] [] SyS_exit_group+0x1d/0x20 [ 20.030232] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 20.036778] [ 20.038378] Allocated by task 3317: [ 20.041980] save_stack_trace+0x16/0x20 [ 20.045925] save_stack+0x43/0xd0 [ 20.049347] kasan_kmalloc+0xad/0xe0 [ 20.053034] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.057592] binder_get_thread+0x15d/0x750 [ 20.061792] binder_poll+0x4a/0x210 [ 20.065387] SyS_epoll_ctl+0x11d7/0x2190 [ 20.069417] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 20.074137] [ 20.075732] Freed by task 3317: [ 20.078982] save_stack_trace+0x16/0x20 [ 20.082927] save_stack+0x43/0xd0 [ 20.086354] kasan_slab_free+0x72/0xc0 [ 20.090215] kfree+0x103/0x300 [ 20.093375] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.098187] binder_thread_release+0x27d/0x540 [ 20.102735] binder_ioctl+0x9c0/0x11b0 [ 20.106592] do_vfs_ioctl+0x1aa/0x1140 [ 20.110451] SyS_ioctl+0x8f/0xc0 [ 20.113791] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 20.118511] [ 20.120109] The buggy address belongs to the object at ffff8801cd006780 [ 20.120109] which belongs to the cache kmalloc-512 of size 512 [ 20.132732] The buggy address is located 184 bytes inside of [ 20.132732] 512-byte region [ffff8801cd006780, ffff8801cd006980) [ 20.144572] The buggy address belongs to the page: [ 20.149469] page:ffffea0007340180 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.159632] flags: 0x8000000000004080(slab|head) [ 20.164351] page dumped because: kasan: bad access detected [ 20.170026] [ 20.171623] Memory state around the buggy address: [ 20.176518] ffff8801cd006700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.183847] ffff8801cd006780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.191177] >ffff8801cd006800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.198504] ^ [ 20.203669] ffff8801cd006880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.210996] ffff8801cd006900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.218320] ================================================================== [ 20.225647] Disabling lock debugging due to kernel taint [ 20.231065] Kernel panic - not syncing: panic_on_warn set ... [ 20.231065] [ 20.238398] CPU: 1 PID: 3317 Comm: syzkaller284393 Tainted: G B 4.9.78-gf518fe4 #22 [ 20.247287] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.256613] ffff8801c99e7838 ffffffff81d943a9 ffffffff841971bf ffff8801c99e7910 [ 20.264575] 0000000000000000 ffff8801cd006838 ffff8801cd006838 ffff8801c99e7900 [ 20.272537] ffffffff8142f451 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f295 [ 20.280498] Call Trace: [ 20.283062] [] dump_stack+0xc1/0x128 [ 20.288394] [] panic+0x1bc/0x3a8 [ 20.293378] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.301576] [] ? add_taint+0x40/0x50 [ 20.306914] [] kasan_end_report+0x50/0x50 [ 20.312681] [] kasan_report+0x167/0x360 [ 20.318277] [] ? __lock_acquire+0x2eff/0x3640 [ 20.324391] [] __asan_report_load8_noabort+0x14/0x20 [ 20.331117] [] __lock_acquire+0x2eff/0x3640 [ 20.337059] [] ? __lock_acquire+0x629/0x3640 [ 20.343091] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.350077] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.357061] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.364043] [] ? mark_held_locks+0xaf/0x100 [ 20.369991] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.376204] [] lock_acquire+0x12e/0x410 [ 20.381809] [] ? remove_wait_queue+0x14/0x40 [ 20.387838] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.394130] [] ? remove_wait_queue+0x14/0x40 [ 20.400158] [] remove_wait_queue+0x14/0x40 [ 20.406035] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.413023] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.420269] [] ? ep_free+0x1b0/0x1b0 [ 20.425604] [] ep_free+0x96/0x1b0 [ 20.430679] [] ? ep_free+0x1b0/0x1b0 [ 20.436013] [] ep_eventpoll_release+0x44/0x60 [ 20.442127] [] __fput+0x28c/0x6e0 [ 20.447205] [] ____fput+0x15/0x20 [ 20.452280] [] task_work_run+0x115/0x190 [ 20.457967] [] do_exit+0x7e7/0x2a40 [ 20.463215] [] ? selinux_file_ioctl+0x355/0x530 [ 20.469506] [] ? release_task+0x1240/0x1240 [ 20.475447] [] ? SyS_epoll_create+0x190/0x190 [ 20.481561] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 20.488195] [] do_group_exit+0x108/0x320 [ 20.493877] [] SyS_exit_group+0x1d/0x20 [ 20.499471] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 20.506454] Dumping ftrace buffer: [ 20.509968] (ftrace buffer empty) [ 20.513652] Kernel Offset: disabled [ 20.517249] Rebooting in 86400 seconds..