CVE 记录列出的受影响产品:Linux · Linuxnday 产品登记表中 Linux kernel 的产品类型
当前阶段
DIS
披露
CVSS
7.8 HIGH v3.1
# 生命周期
横轴 UTC;点=精确到分钟,宽条=仅日期,空心=未知或推定。
时间未知
DIS披露
PAT补丁
尚无记录
ANA分析
尚无记录
POCPoC
尚无记录
ITW在野
尚无记录
KEVKEV
尚无记录
# 摘要
In the Linux kernel, the following vulnerability has been resolved:
KVM: guest_memfd: Remove bindings on memslot deletion when gmem is dying
When unbinding a memslot from a guest_memfd instance, remove the bindings
even if the guest_memfd file is dying, i.e. even if its file refcount has
gone to zero. If the memslot is freed before the file is fully released,
nullifying the memslot side of the binding in kvm_gmem_release() will
write to freed memory, as detected by syzbot+KASAN:
==================================================================BUG: KASAN: slab-use-after-free in kvm_gmem_release+0x176/0x440virt/kvm/guest_memfd.c:353Write of size 8 at addr ffff88807befa508 by task syz.0.17/6022
CPU: 0 UID: 0 PID: 6022 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:<TASK>dump_stack_lvl+0x189/0x250lib/dump_stack.c:120print_address_descriptionmm/kasan/report.c:378[inline]print_report+0xca/0x240mm/kasan/report.c:482kasan_report+0x118/0x150mm/kasan/report.c:595kvm_gmem_release+0x176/0x440virt/kvm/guest_memfd.c:353__fput+0x44c/0xa70fs/file_table.c:468task_work_run+0x1d4/0x260kernel/task_work.c:227resume_user_mode_workinclude/linux/resume_user_mode.h:50[inline]exit_to_user_mode_loop+0xe9/0x130kernel/entry/common.c:43exit_to_user_mode_prepareinclude/linux/irq-entry-common.h:225[inline]syscall_exit_to_user_mode_workinclude/linux/entry-common.h:175[inline]syscall_exit_to_user_modeinclude/linux/entry-common.h:210[inline]do_syscall_64+0x2bd/0xfa0arch/x86/entry/syscall_64.c:100entry_SYSCALL_64_after_hwframe+0x77/0x7fRIP: 0033:0x7fbeeff8efc9</TASK>Allocated by task 6023:kasan_save_stackmm/kasan/common.c:56[inline]kasan_save_track+0x3e/0x80mm/kasan/common.c:77poison_kmalloc_redzonemm/kasan/common.c:397[inline]__kasan_kmalloc+0x93/0xb0mm/kasan/common.c:414kasan_kmallocinclude/linux/kasan.h:262[inline]__kmalloc_cache_noprof+0x3e2/0x700mm/slub.c:5758kmalloc_noprofinclude/linux/slab.h:957[inline]kzalloc_noprofinclude/linux/slab.h:1094[inline]kvm_set_memory_region+0x747/0xb90virt/kvm/kvm_main.c:2104kvm_vm_ioctl_set_memory_region+0x6f/0xd0virt/kvm/kvm_main.c:2154kvm_vm_ioctl+0x957/0xc60virt/kvm/kvm_main.c:5201vfs_ioctlfs/ioctl.c:51[inline]__do_sys_ioctlfs/ioctl.c:597[inline]__se_sys_ioctl+0xfc/0x170fs/ioctl.c:583do_syscall_x64arch/x86/entry/syscall_64.c:63[inline]do_syscall_64+0xfa/0xfa0arch/x86/entry/syscall_64.c:94entry_SYSCALL_64_after_hwframe+0x77/0x7fFreed by task 6023:kasan_save_stackmm/kasan/common.c:56[inline]kasan_save_track+0x3e/0x80mm/kasan/common.c:77kasan_save_free_info+0x46/0x50mm/kasan/generic.c:584poison_slab_objectmm/kasan/common.c:252[inline]__kasan_slab_free+0x5c/0x80mm/kasan/common.c:284kasan_slab_freeinclude/linux/kasan.h:234[inline]slab_free_hookmm/slub.c:2533[inline]slab_freemm/slub.c:6622[inline]kfree+0x19a/0x6d0mm/slub.c:6829kvm_set_memory_region+0x9c4/0xb90virt/kvm/kvm_main.c:2130kvm_vm_ioctl_set_memory_region+0x6f/0xd0virt/kvm/kvm_main.c:2154kvm_vm_ioctl+0x957/0xc60virt/kvm/kvm_main.c:5201vfs_ioctlfs/ioctl.c:51[inline]__do_sys_ioctlfs/ioctl.c:597[inline]__se_sys_ioctl+0xfc/0x170fs/ioctl.c:583do_syscall_x64arch/x86/entry/syscall_64.c:63[inline]do_syscall_64+0xfa/0xfa0arch/x86/entry/syscall_64.c:94entry_SYSCALL_64_after_hwframe+0x77/0x7f
Deliberately don't acquire filemap invalid lock when the file is dying as
the lifecycle of f_mapping is outside the purview of KVM. Dereferencing
the mapping is *probably* fine, but there's no need to invalidate anything
as memslot deletion is responsible for zapping SPTEs, and the only code
that can access the dying file is kvm_gmem_release(), whose core code is
mutual
---truncated---