[....] Starting enhanced syslogd: rsyslogd[ 12.402843] audit: type=1400 audit(1514791044.898:4): avc: denied { syslog } for pid=3175 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.17' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.819317] ================================================================== [ 28.826715] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 28.833361] Read of size 8 at addr ffff8801cd502fb8 by task syzkaller513535/3332 [ 28.840859] [ 28.842455] CPU: 0 PID: 3332 Comm: syzkaller513535 Not tainted 4.9.73-gf3f3457 #1 [ 28.850039] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.859362] ffff8801c9b578e0 ffffffff81d922b9 ffffea0007354080 ffff8801cd502fb8 [ 28.867312] 0000000000000000 ffff8801cd502fb8 ffff8801cd502fb8 ffff8801c9b57918 [ 28.875259] ffffffff8153bab3 ffff8801cd502fb8 0000000000000008 0000000000000000 [ 28.883208] Call Trace: [ 28.885765] [] dump_stack+0xc1/0x128 [ 28.891098] [] print_address_description+0x73/0x280 [ 28.897730] [] kasan_report+0x275/0x360 [ 28.903321] [] ? __lock_acquire+0x2eff/0x3640 [ 28.909430] [] __asan_report_load8_noabort+0x14/0x20 [ 28.916147] [] __lock_acquire+0x2eff/0x3640 [ 28.922082] [] ? __lock_acquire+0x629/0x3640 [ 28.928105] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.935084] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.942060] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.949039] [] ? mark_held_locks+0xaf/0x100 [ 28.954976] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.961172] [] lock_acquire+0x12e/0x410 [ 28.966758] [] ? remove_wait_queue+0x14/0x40 [ 28.972786] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.979069] [] ? remove_wait_queue+0x14/0x40 [ 28.985089] [] remove_wait_queue+0x14/0x40 [ 28.990941] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.997920] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 29.005159] [] ? ep_free+0x1b0/0x1b0 [ 29.010486] [] ep_free+0x96/0x1b0 [ 29.015559] [] ? ep_free+0x1b0/0x1b0 [ 29.020889] [] ep_eventpoll_release+0x44/0x60 [ 29.027001] [] __fput+0x28c/0x6e0 [ 29.032488] [] ____fput+0x15/0x20 [ 29.037559] [] task_work_run+0x115/0x190 [ 29.043237] [] do_exit+0x7e7/0x2a40 [ 29.048480] [] ? selinux_file_ioctl+0x355/0x530 [ 29.054762] [] ? release_task+0x1240/0x1240 [ 29.060700] [] ? SyS_epoll_create+0x190/0x190 [ 29.066809] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 29.073438] [] do_group_exit+0x108/0x320 [ 29.079114] [] SyS_exit_group+0x1d/0x20 [ 29.084699] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 29.091238] [ 29.092831] Allocated by task 3332: [ 29.096425] save_stack_trace+0x16/0x20 [ 29.100367] save_stack+0x43/0xd0 [ 29.103782] kasan_kmalloc+0xad/0xe0 [ 29.107457] kmem_cache_alloc_trace+0xfb/0x2a0 [ 29.112004] binder_get_thread+0x15d/0x750 [ 29.116202] binder_poll+0x4a/0x210 [ 29.119792] SyS_epoll_ctl+0x11d7/0x2190 [ 29.123818] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 29.128532] [ 29.130123] Freed by task 3332: [ 29.133367] save_stack_trace+0x16/0x20 [ 29.137304] save_stack+0x43/0xd0 [ 29.140720] kasan_slab_free+0x72/0xc0 [ 29.144569] kfree+0x103/0x300 [ 29.147727] binder_thread_dec_tmpref+0x1cc/0x240 [ 29.152532] binder_thread_release+0x27d/0x540 [ 29.157076] binder_ioctl+0x9c0/0x11b0 [ 29.160926] do_vfs_ioctl+0x1aa/0x1140 [ 29.164775] SyS_ioctl+0x8f/0xc0 [ 29.168103] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 29.172818] [ 29.174409] The buggy address belongs to the object at ffff8801cd502f00 [ 29.174409] which belongs to the cache kmalloc-512 of size 512 [ 29.187025] The buggy address is located 184 bytes inside of [ 29.187025] 512-byte region [ffff8801cd502f00, ffff8801cd503100) [ 29.198859] The buggy address belongs to the page: [ 29.203751] page:ffffea0007354080 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 29.213902] flags: 0x8000000000004080(slab|head) [ 29.218617] page dumped because: kasan: bad access detected [ 29.224286] [ 29.225875] Memory state around the buggy address: [ 29.230764] ffff8801cd502e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.238084] ffff8801cd502f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.245405] >ffff8801cd502f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.252725] ^ [ 29.257878] ffff8801cd503000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.265199] ffff8801cd503080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.272528] ================================================================== [ 29.279847] Disabling lock debugging due to kernel taint [ 29.285257] Kernel panic - not syncing: panic_on_warn set ... [ 29.285257] [ 29.292588] CPU: 0 PID: 3332 Comm: syzkaller513535 Tainted: G B 4.9.73-gf3f3457 #1 [ 29.301386] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.310710] ffff8801c9b57838 ffffffff81d922b9 ffffffff841955bf ffff8801c9b57910 [ 29.318675] 0000000000000000 ffff8801cd502fb8 ffff8801cd502fb8 ffff8801c9b57900 [ 29.326625] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 29.334573] Call Trace: [ 29.337125] [] dump_stack+0xc1/0x128 [ 29.342464] [] panic+0x1bc/0x3a8 [ 29.347446] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 29.355638] [] ? add_taint+0x40/0x50 [ 29.360966] [] kasan_end_report+0x50/0x50 [ 29.366727] [] kasan_report+0x167/0x360 [ 29.372315] [] ? __lock_acquire+0x2eff/0x3640 [ 29.378428] [] __asan_report_load8_noabort+0x14/0x20 [ 29.385145] [] __lock_acquire+0x2eff/0x3640 [ 29.391086] [] ? __lock_acquire+0x629/0x3640 [ 29.397107] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.404082] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.411057] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.418033] [] ? mark_held_locks+0xaf/0x100 [ 29.423968] [] ? mutex_lock_nested+0x5e3/0x870 [ 29.430164] [] lock_acquire+0x12e/0x410 [ 29.435748] [] ? remove_wait_queue+0x14/0x40 [ 29.441772] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 29.448054] [] ? remove_wait_queue+0x14/0x40 [ 29.454076] [] remove_wait_queue+0x14/0x40 [ 29.459933] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 29.466910] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 29.474153] [] ? ep_free+0x1b0/0x1b0 [ 29.479480] [] ep_free+0x96/0x1b0 [ 29.484544] [] ? ep_free+0x1b0/0x1b0 [ 29.489876] [] ep_eventpoll_release+0x44/0x60 [ 29.495983] [] __fput+0x28c/0x6e0 [ 29.501047] [] ____fput+0x15/0x20 [ 29.506114] [] task_work_run+0x115/0x190 [ 29.511787] [] do_exit+0x7e7/0x2a40 [ 29.517030] [] ? selinux_file_ioctl+0x355/0x530 [ 29.523312] [] ? release_task+0x1240/0x1240 [ 29.529254] [] ? SyS_epoll_create+0x190/0x190 [ 29.535368] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 29.541999] [] do_group_exit+0x108/0x320 [ 29.547673] [] SyS_exit_group+0x1d/0x20 [ 29.553262] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 29.559857] Dumping ftrace buffer: [ 29.563365] (ftrace buffer empty) [ 29.567043] Kernel Offset: disabled [ 29.570634] Rebooting in 86400 seconds..