[....] Starting enhanced syslogd: rsyslogd[ 14.716323] audit: type=1400 audit(1517304277.279:4): avc: denied { syslog } for pid=3912 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.224' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.226953] ================================================================== [ 27.234351] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.240989] Read of size 8 at addr ffff8801c4f66d38 by task syzkaller442989/4068 [ 27.248487] [ 27.250088] CPU: 1 PID: 4068 Comm: syzkaller442989 Not tainted 4.9.78-g7be1985 #33 [ 27.257761] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.267088] ffff8801d4167870 ffffffff81d94409 ffffea000713d980 ffff8801c4f66d38 [ 27.275053] 0000000000000000 ffff8801c4f66d38 ffff8801c4f66d38 ffff8801d41678a8 [ 27.283018] ffffffff8153dc73 ffff8801c4f66d38 0000000000000008 0000000000000000 [ 27.290979] Call Trace: [ 27.293541] [] dump_stack+0xc1/0x128 [ 27.298875] [] print_address_description+0x73/0x280 [ 27.305510] [] kasan_report+0x275/0x360 [ 27.311103] [] ? __lock_acquire+0x2eff/0x3640 [ 27.317217] [] __asan_report_load8_noabort+0x14/0x20 [ 27.323937] [] __lock_acquire+0x2eff/0x3640 [ 27.329875] [] ? __lock_acquire+0x629/0x3640 [ 27.335902] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.342885] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.349866] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.356845] [] ? mark_held_locks+0xaf/0x100 [ 27.362785] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.368982] [] lock_acquire+0x12e/0x410 [ 27.374572] [] ? remove_wait_queue+0x14/0x40 [ 27.380598] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.386884] [] ? remove_wait_queue+0x14/0x40 [ 27.392911] [] remove_wait_queue+0x14/0x40 [ 27.398764] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.405744] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.412993] [] ? ep_free+0x1b0/0x1b0 [ 27.418324] [] ep_free+0x96/0x1b0 [ 27.423395] [] ? ep_free+0x1b0/0x1b0 [ 27.428726] [] ep_eventpoll_release+0x44/0x60 [ 27.434839] [] __fput+0x28c/0x6e0 [ 27.439915] [] ____fput+0x15/0x20 [ 27.444997] [] task_work_run+0x115/0x190 [ 27.450678] [] do_exit+0x7e7/0x2a40 [ 27.455924] [] ? __pmd_alloc+0x410/0x410 [ 27.461602] [] ? release_task+0x1240/0x1240 [ 27.467543] [] ? __do_page_fault+0x5ec/0xd40 [ 27.473576] [] ? up_read+0x1a/0x40 [ 27.478736] [] ? __do_page_fault+0x3bd/0xd40 [ 27.484762] [] do_group_exit+0x108/0x320 [ 27.490439] [] ? do_group_exit+0x320/0x320 [ 27.496291] [] SyS_exit_group+0x1d/0x20 [ 27.501887] [] do_fast_syscall_32+0x2f7/0x890 [ 27.508000] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.514635] [] entry_SYSENTER_compat+0x74/0x83 [ 27.520833] [ 27.522433] Allocated by task 4068: [ 27.526033] save_stack_trace+0x16/0x20 [ 27.529975] save_stack+0x43/0xd0 [ 27.533393] kasan_kmalloc+0xad/0xe0 [ 27.537073] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.541622] binder_get_thread+0x15d/0x750 [ 27.545821] binder_poll+0x4a/0x210 [ 27.549442] SyS_epoll_ctl+0x11d7/0x2190 [ 27.553471] do_fast_syscall_32+0x2f7/0x890 [ 27.557767] entry_SYSENTER_compat+0x74/0x83 [ 27.562141] [ 27.563734] Freed by task 4068: [ 27.566978] save_stack_trace+0x16/0x20 [ 27.570921] save_stack+0x43/0xd0 [ 27.574343] kasan_slab_free+0x72/0xc0 [ 27.578196] kfree+0x103/0x300 [ 27.581357] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.586167] binder_thread_release+0x27d/0x540 [ 27.590719] binder_ioctl+0x9c0/0x11b0 [ 27.594576] compat_SyS_ioctl+0x15f/0x2050 [ 27.598781] do_fast_syscall_32+0x2f7/0x890 [ 27.603072] entry_SYSENTER_compat+0x74/0x83 [ 27.607445] [ 27.609043] The buggy address belongs to the object at ffff8801c4f66c80 [ 27.609043] which belongs to the cache kmalloc-512 of size 512 [ 27.621665] The buggy address is located 184 bytes inside of [ 27.621665] 512-byte region [ffff8801c4f66c80, ffff8801c4f66e80) [ 27.633503] The buggy address belongs to the page: [ 27.638400] page:ffffea000713d980 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.648562] flags: 0x8000000000004080(slab|head) [ 27.653281] page dumped because: kasan: bad access detected [ 27.658955] [ 27.660549] Memory state around the buggy address: [ 27.665444] ffff8801c4f66c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.672770] ffff8801c4f66c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.680098] >ffff8801c4f66d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.688104] ^ [ 27.693267] ffff8801c4f66d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.700593] ffff8801c4f66e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.707920] ================================================================== [ 27.715244] Disabling lock debugging due to kernel taint [ 27.720661] Kernel panic - not syncing: panic_on_warn set ... [ 27.720661] [ 27.727992] CPU: 1 PID: 4068 Comm: syzkaller442989 Tainted: G B 4.9.78-g7be1985 #33 [ 27.736882] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.746208] ffff8801d41677c8 ffffffff81d94409 ffffffff841971bf ffff8801d41678a0 [ 27.754173] 0000000000000000 ffff8801c4f66d38 ffff8801c4f66d38 ffff8801d4167890 [ 27.762134] ffffffff8142f4a1 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f2e5 [ 27.770095] Call Trace: [ 27.772659] [] dump_stack+0xc1/0x128 [ 27.777993] [] panic+0x1bc/0x3a8 [ 27.782980] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.791178] [] ? add_taint+0x40/0x50 [ 27.796511] [] kasan_end_report+0x50/0x50 [ 27.802278] [] kasan_report+0x167/0x360 [ 27.807893] [] ? __lock_acquire+0x2eff/0x3640 [ 27.814004] [] __asan_report_load8_noabort+0x14/0x20 [ 27.820730] [] __lock_acquire+0x2eff/0x3640 [ 27.826670] [] ? __lock_acquire+0x629/0x3640 [ 27.832699] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.839687] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.846666] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.853647] [] ? mark_held_locks+0xaf/0x100 [ 27.859591] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.865788] [] lock_acquire+0x12e/0x410 [ 27.871389] [] ? remove_wait_queue+0x14/0x40 [ 27.877418] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.883704] [] ? remove_wait_queue+0x14/0x40 [ 27.889729] [] remove_wait_queue+0x14/0x40 [ 27.895584] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.902573] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.909821] [] ? ep_free+0x1b0/0x1b0 [ 27.915149] [] ep_free+0x96/0x1b0 [ 27.920221] [] ? ep_free+0x1b0/0x1b0 [ 27.925553] [] ep_eventpoll_release+0x44/0x60 [ 27.931666] [] __fput+0x28c/0x6e0 [ 27.936735] [] ____fput+0x15/0x20 [ 27.941807] [] task_work_run+0x115/0x190 [ 27.947487] [] do_exit+0x7e7/0x2a40 [ 27.952733] [] ? __pmd_alloc+0x410/0x410 [ 27.958412] [] ? release_task+0x1240/0x1240 [ 27.964354] [] ? __do_page_fault+0x5ec/0xd40 [ 27.970385] [] ? up_read+0x1a/0x40 [ 27.975542] [] ? __do_page_fault+0x3bd/0xd40 [ 27.981588] [] do_group_exit+0x108/0x320 [ 27.987292] [] ? do_group_exit+0x320/0x320 [ 27.993167] [] SyS_exit_group+0x1d/0x20 [ 27.998780] [] do_fast_syscall_32+0x2f7/0x890 [ 28.004913] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.011564] [] entry_SYSENTER_compat+0x74/0x83 [ 28.018210] Dumping ftrace buffer: [ 28.021720] (ftrace buffer empty) [ 28.025399] Kernel Offset: disabled [ 28.028993] Rebooting in 86400 seconds..