[....] Starting enhanced syslogd: rsyslogd[ 10.067514] audit: type=1400 audit(1515324382.703:4): avc: denied { syslog } for pid=3176 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 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.34' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.339342] ================================================================== [ 18.340385] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 18.341272] Read of size 8 at addr ffff8801c8a34338 by task syzkaller822369/3324 [ 18.342254] [ 18.342484] CPU: 1 PID: 3324 Comm: syzkaller822369 Not tainted 4.9.75-g5f5e5d4 #7 [ 18.343583] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.344831] ffff8801c81278e0 ffffffff81d93049 ffffea0007228d00 ffff8801c8a34338 [ 18.346022] 0000000000000000 ffff8801c8a34338 ffff8801c8a34338 ffff8801c8127918 [ 18.347184] ffffffff8153ca53 ffff8801c8a34338 0000000000000008 0000000000000000 [ 18.348310] Call Trace: [ 18.348668] [] dump_stack+0xc1/0x128 [ 18.349380] [] print_address_description+0x73/0x280 [ 18.350254] [] kasan_report+0x275/0x360 [ 18.350998] [] ? __lock_acquire+0x2eff/0x3640 [ 18.351817] [] __asan_report_load8_noabort+0x14/0x20 [ 18.352708] [] __lock_acquire+0x2eff/0x3640 [ 18.353577] [] ? __lock_acquire+0x629/0x3640 [ 18.354426] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.355345] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.356263] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.357198] [] ? mark_held_locks+0xaf/0x100 [ 18.358054] [] ? mutex_lock_nested+0x5e3/0x870 [ 18.358895] [] lock_acquire+0x12e/0x410 [ 18.360957] [] ? remove_wait_queue+0x14/0x40 [ 18.366985] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 18.373270] [] ? remove_wait_queue+0x14/0x40 [ 18.379293] [] remove_wait_queue+0x14/0x40 [ 18.385146] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 18.392131] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 18.399370] [] ? ep_free+0x1b0/0x1b0 [ 18.404699] [] ep_free+0x96/0x1b0 [ 18.409776] [] ? ep_free+0x1b0/0x1b0 [ 18.415108] [] ep_eventpoll_release+0x44/0x60 [ 18.421219] [] __fput+0x28c/0x6e0 [ 18.426286] [] ____fput+0x15/0x20 [ 18.431352] [] task_work_run+0x115/0x190 [ 18.437027] [] do_exit+0x7e7/0x2a40 [ 18.442269] [] ? selinux_file_ioctl+0x355/0x530 [ 18.448552] [] ? release_task+0x1240/0x1240 [ 18.454510] [] ? SyS_epoll_create+0x190/0x190 [ 18.460627] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 18.467258] [] do_group_exit+0x108/0x320 [ 18.472939] [] SyS_exit_group+0x1d/0x20 [ 18.478532] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 18.485073] [ 18.486667] Allocated by task 3324: [ 18.490258] save_stack_trace+0x16/0x20 [ 18.494199] save_stack+0x43/0xd0 [ 18.497614] kasan_kmalloc+0xad/0xe0 [ 18.501295] kmem_cache_alloc_trace+0xfb/0x2a0 [ 18.505843] binder_get_thread+0x15d/0x750 [ 18.510049] binder_poll+0x4a/0x210 [ 18.513642] SyS_epoll_ctl+0x11d7/0x2190 [ 18.517667] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 18.522392] [ 18.523989] Freed by task 3324: [ 18.527233] save_stack_trace+0x16/0x20 [ 18.531172] save_stack+0x43/0xd0 [ 18.534590] kasan_slab_free+0x72/0xc0 [ 18.538441] kfree+0x103/0x300 [ 18.541598] binder_thread_dec_tmpref+0x1cc/0x240 [ 18.546406] binder_thread_release+0x27d/0x540 [ 18.550953] binder_ioctl+0x9c0/0x11b0 [ 18.554805] do_vfs_ioctl+0x1aa/0x1140 [ 18.558656] SyS_ioctl+0x8f/0xc0 [ 18.561989] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 18.566704] [ 18.568300] The buggy address belongs to the object at ffff8801c8a34280 [ 18.568300] which belongs to the cache kmalloc-512 of size 512 [ 18.580928] The buggy address is located 184 bytes inside of [ 18.580928] 512-byte region [ffff8801c8a34280, ffff8801c8a34480) [ 18.592771] The buggy address belongs to the page: [ 18.597683] page:ffffea0007228d00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 18.607855] flags: 0x8000000000004080(slab|head) [ 18.612574] page dumped because: kasan: bad access detected [ 18.618245] [ 18.619835] Memory state around the buggy address: [ 18.624728] ffff8801c8a34200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.632056] ffff8801c8a34280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.639377] >ffff8801c8a34300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.646702] ^ [ 18.651857] ffff8801c8a34380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.659190] ffff8801c8a34400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.666521] ================================================================== [ 18.673842] Disabling lock debugging due to kernel taint [ 18.679255] Kernel panic - not syncing: panic_on_warn set ... [ 18.679255] [ 18.686583] CPU: 1 PID: 3324 Comm: syzkaller822369 Tainted: G B 4.9.75-g5f5e5d4 #7 [ 18.695382] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.704707] ffff8801c8127838 ffffffff81d93049 ffffffff84195be7 ffff8801c8127910 [ 18.712650] 0000000000000000 ffff8801c8a34338 ffff8801c8a34338 ffff8801c8127900 [ 18.720598] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 18.728539] Call Trace: [ 18.731095] [] dump_stack+0xc1/0x128 [ 18.736425] [] panic+0x1bc/0x3a8 [ 18.741413] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 18.749608] [] ? add_taint+0x40/0x50 [ 18.754953] [] kasan_end_report+0x50/0x50 [ 18.760716] [] kasan_report+0x167/0x360 [ 18.766305] [] ? __lock_acquire+0x2eff/0x3640 [ 18.772420] [] __asan_report_load8_noabort+0x14/0x20 [ 18.779148] [] __lock_acquire+0x2eff/0x3640 [ 18.785086] [] ? __lock_acquire+0x629/0x3640 [ 18.791119] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.798096] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.805079] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.812057] [] ? mark_held_locks+0xaf/0x100 [ 18.818001] [] ? mutex_lock_nested+0x5e3/0x870 [ 18.824200] [] lock_acquire+0x12e/0x410 [ 18.829793] [] ? remove_wait_queue+0x14/0x40 [ 18.835815] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 18.842097] [] ? remove_wait_queue+0x14/0x40 [ 18.848973] [] remove_wait_queue+0x14/0x40 [ 18.854831] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 18.861811] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 18.869051] [] ? ep_free+0x1b0/0x1b0 [ 18.874380] [] ep_free+0x96/0x1b0 [ 18.879447] [] ? ep_free+0x1b0/0x1b0 [ 18.884775] [] ep_eventpoll_release+0x44/0x60 [ 18.890896] [] __fput+0x28c/0x6e0 [ 18.895962] [] ____fput+0x15/0x20 [ 18.901040] [] task_work_run+0x115/0x190 [ 18.906718] [] do_exit+0x7e7/0x2a40 [ 18.911965] [] ? selinux_file_ioctl+0x355/0x530 [ 18.918274] [] ? release_task+0x1240/0x1240 [ 18.924220] [] ? SyS_epoll_create+0x190/0x190 [ 18.930343] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 18.936983] [] do_group_exit+0x108/0x320 [ 18.942659] [] SyS_exit_group+0x1d/0x20 [ 18.948249] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 18.955317] Dumping ftrace buffer: [ 18.958838] (ftrace buffer empty) [ 18.962513] Kernel Offset: disabled [ 18.966102] Rebooting in 86400 seconds..