[....] Starting enhanced syslogd: rsyslogd[ 10.364623] audit: type=1400 audit(1516332303.833:4): avc: denied { syslog } for pid=3170 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.225' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.590375] ================================================================== [ 19.591559] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.592540] Read of size 8 at addr ffff8801cc99f4b8 by task syzkaller582090/3319 [ 19.593552] [ 19.593896] CPU: 0 PID: 3319 Comm: syzkaller582090 Not tainted 4.9.77-g8788313 #25 [ 19.594926] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.596179] ffff8801c8f17870 ffffffff81d941c9 ffffea0007326780 ffff8801cc99f4b8 [ 19.597465] 0000000000000000 ffff8801cc99f4b8 ffff8801cc99f4b8 ffff8801c8f178a8 [ 19.598744] ffffffff8153db93 ffff8801cc99f4b8 0000000000000008 0000000000000000 [ 19.599961] Call Trace: [ 19.600322] [] dump_stack+0xc1/0x128 [ 19.601074] [] print_address_description+0x73/0x280 [ 19.602007] [] kasan_report+0x275/0x360 [ 19.602767] [] ? __lock_acquire+0x2eff/0x3640 [ 19.603626] [] __asan_report_load8_noabort+0x14/0x20 [ 19.604646] [] __lock_acquire+0x2eff/0x3640 [ 19.605510] [] ? __lock_acquire+0x629/0x3640 [ 19.606346] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.607270] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.608257] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.609183] [] ? mark_held_locks+0xaf/0x100 [ 19.610014] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.613387] [] lock_acquire+0x12e/0x410 [ 19.618979] [] ? remove_wait_queue+0x14/0x40 [ 19.625007] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.631304] [] ? remove_wait_queue+0x14/0x40 [ 19.637330] [] remove_wait_queue+0x14/0x40 [ 19.643205] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.650190] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.657431] [] ? ep_free+0x1b0/0x1b0 [ 19.662764] [] ep_free+0x96/0x1b0 [ 19.667835] [] ? ep_free+0x1b0/0x1b0 [ 19.673167] [] ep_eventpoll_release+0x44/0x60 [ 19.679289] [] __fput+0x28c/0x6e0 [ 19.684364] [] ____fput+0x15/0x20 [ 19.689438] [] task_work_run+0x115/0x190 [ 19.695119] [] do_exit+0x7e7/0x2a40 [ 19.700378] [] ? __pmd_alloc+0x410/0x410 [ 19.706058] [] ? release_task+0x1240/0x1240 [ 19.712001] [] ? __do_page_fault+0x5ec/0xd40 [ 19.718028] [] ? up_read+0x1a/0x40 [ 19.723187] [] ? __do_page_fault+0x3bd/0xd40 [ 19.729214] [] do_group_exit+0x108/0x320 [ 19.734894] [] ? do_group_exit+0x320/0x320 [ 19.740748] [] SyS_exit_group+0x1d/0x20 [ 19.746351] [] do_fast_syscall_32+0x2f7/0x890 [ 19.752463] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 19.759100] [] entry_SYSENTER_compat+0x74/0x83 [ 19.765306] [ 19.766905] Allocated by task 3319: [ 19.770503] save_stack_trace+0x16/0x20 [ 19.774445] save_stack+0x43/0xd0 [ 19.777865] kasan_kmalloc+0xad/0xe0 [ 19.781546] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.786106] binder_get_thread+0x15d/0x750 [ 19.790310] binder_poll+0x4a/0x210 [ 19.793906] SyS_epoll_ctl+0x11d7/0x2190 [ 19.797935] do_fast_syscall_32+0x2f7/0x890 [ 19.802225] entry_SYSENTER_compat+0x74/0x83 [ 19.806596] [ 19.808202] Freed by task 3319: [ 19.811455] save_stack_trace+0x16/0x20 [ 19.815407] save_stack+0x43/0xd0 [ 19.818829] kasan_slab_free+0x72/0xc0 [ 19.822691] kfree+0x103/0x300 [ 19.825867] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.830678] binder_thread_release+0x27d/0x540 [ 19.835227] binder_ioctl+0x9c0/0x11b0 [ 19.839082] compat_SyS_ioctl+0x15f/0x2050 [ 19.843284] do_fast_syscall_32+0x2f7/0x890 [ 19.847574] entry_SYSENTER_compat+0x74/0x83 [ 19.851947] [ 19.853544] The buggy address belongs to the object at ffff8801cc99f400 [ 19.853544] which belongs to the cache kmalloc-512 of size 512 [ 19.866179] The buggy address is located 184 bytes inside of [ 19.866179] 512-byte region [ffff8801cc99f400, ffff8801cc99f600) [ 19.878031] The buggy address belongs to the page: [ 19.882931] page:ffffea0007326780 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.893100] flags: 0x8000000000004080(slab|head) [ 19.897822] page dumped because: kasan: bad access detected [ 19.903497] [ 19.905095] Memory state around the buggy address: [ 19.909992] ffff8801cc99f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.917328] ffff8801cc99f400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.924661] >ffff8801cc99f480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.931988] ^ [ 19.937144] ffff8801cc99f500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.944471] ffff8801cc99f580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.951797] ================================================================== [ 19.959122] Disabling lock debugging due to kernel taint [ 19.964548] Kernel panic - not syncing: panic_on_warn set ... [ 19.964548] [ 19.971879] CPU: 0 PID: 3319 Comm: syzkaller582090 Tainted: G B 4.9.77-g8788313 #25 [ 19.980770] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.990102] ffff8801c8f177c8 ffffffff81d941c9 ffffffff841970ff ffff8801c8f178a0 [ 19.998088] 0000000000000000 ffff8801cc99f4b8 ffff8801cc99f4b8 ffff8801c8f17890 [ 20.006079] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 20.014060] Call Trace: [ 20.016620] [] dump_stack+0xc1/0x128 [ 20.021952] [] panic+0x1bc/0x3a8 [ 20.026937] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.035133] [] ? add_taint+0x40/0x50 [ 20.040475] [] kasan_end_report+0x50/0x50 [ 20.046240] [] kasan_report+0x167/0x360 [ 20.051833] [] ? __lock_acquire+0x2eff/0x3640 [ 20.057947] [] __asan_report_load8_noabort+0x14/0x20 [ 20.064678] [] __lock_acquire+0x2eff/0x3640 [ 20.070623] [] ? __lock_acquire+0x629/0x3640 [ 20.076658] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.083641] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.090627] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.097621] [] ? mark_held_locks+0xaf/0x100 [ 20.103572] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.109772] [] lock_acquire+0x12e/0x410 [ 20.115365] [] ? remove_wait_queue+0x14/0x40 [ 20.121389] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.127683] [] ? remove_wait_queue+0x14/0x40 [ 20.133711] [] remove_wait_queue+0x14/0x40 [ 20.139569] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.146549] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.154194] [] ? ep_free+0x1b0/0x1b0 [ 20.159525] [] ep_free+0x96/0x1b0 [ 20.164597] [] ? ep_free+0x1b0/0x1b0 [ 20.169930] [] ep_eventpoll_release+0x44/0x60 [ 20.176043] [] __fput+0x28c/0x6e0 [ 20.181114] [] ____fput+0x15/0x20 [ 20.186186] [] task_work_run+0x115/0x190 [ 20.191867] [] do_exit+0x7e7/0x2a40 [ 20.197113] [] ? __pmd_alloc+0x410/0x410 [ 20.202804] [] ? release_task+0x1240/0x1240 [ 20.208756] [] ? __do_page_fault+0x5ec/0xd40 [ 20.214795] [] ? up_read+0x1a/0x40 [ 20.219963] [] ? __do_page_fault+0x3bd/0xd40 [ 20.225994] [] do_group_exit+0x108/0x320 [ 20.231683] [] ? do_group_exit+0x320/0x320 [ 20.237538] [] SyS_exit_group+0x1d/0x20 [ 20.243132] [] do_fast_syscall_32+0x2f7/0x890 [ 20.249244] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.255881] [] entry_SYSENTER_compat+0x74/0x83 [ 20.262553] Dumping ftrace buffer: [ 20.266078] (ftrace buffer empty) [ 20.269760] Kernel Offset: disabled [ 20.273355] Rebooting in 86400 seconds..