{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-68810","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-12-24T10:30:51.047Z","datePublished":"2026-01-13T15:29:16.475Z","dateUpdated":"2026-08-05T12:11:41.602Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T12:11:41.602Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: Disallow toggling KVM_MEM_GUEST_MEMFD on an existing memslot\n\nReject attempts to disable KVM_MEM_GUEST_MEMFD on a memslot that was\ninitially created with a guest_memfd binding, as KVM doesn't support\ntoggling KVM_MEM_GUEST_MEMFD on existing memslots.  KVM prevents enabling\nKVM_MEM_GUEST_MEMFD, but doesn't prevent clearing the flag.\n\nFailure to reject the new memslot results in a use-after-free due to KVM\nnot unbinding from the guest_memfd instance.  Unbinding on a FLAGS_ONLY\nchange is easy enough, and can/will be done as a hardening measure (in\nanticipation of KVM supporting dirty logging on guest_memfd at some point),\nbut fixing the use-after-free would only address the immediate symptom.\n\n  ==================================================================\n  BUG: KASAN: slab-use-after-free in kvm_gmem_release+0x362/0x400 [kvm]\n  Write of size 8 at addr ffff8881111ae908 by task repro/745\n\n  CPU: 7 UID: 1000 PID: 745 Comm: repro Not tainted 6.18.0-rc6-115d5de2eef3-next-kasan #3 NONE\n  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015\n  Call Trace:\n   <TASK>\n   dump_stack_lvl+0x51/0x60\n   print_report+0xcb/0x5c0\n   kasan_report+0xb4/0xe0\n   kvm_gmem_release+0x362/0x400 [kvm]\n   __fput+0x2fa/0x9d0\n   task_work_run+0x12c/0x200\n   do_exit+0x6ae/0x2100\n   do_group_exit+0xa8/0x230\n   __x64_sys_exit_group+0x3a/0x50\n   x64_sys_call+0x737/0x740\n   do_syscall_64+0x5b/0x900\n   entry_SYSCALL_64_after_hwframe+0x4b/0x53\n  RIP: 0033:0x7f581f2eac31\n   </TASK>\n\n  Allocated by task 745 on cpu 6 at 9.746971s:\n   kasan_save_stack+0x20/0x40\n   kasan_save_track+0x13/0x50\n   __kasan_kmalloc+0x77/0x90\n   kvm_set_memory_region.part.0+0x652/0x1110 [kvm]\n   kvm_vm_ioctl+0x14b0/0x3290 [kvm]\n   __x64_sys_ioctl+0x129/0x1a0\n   do_syscall_64+0x5b/0x900\n   entry_SYSCALL_64_after_hwframe+0x4b/0x53\n\n  Freed by task 745 on cpu 6 at 9.747467s:\n   kasan_save_stack+0x20/0x40\n   kasan_save_track+0x13/0x50\n   __kasan_save_free_info+0x37/0x50\n   __kasan_slab_free+0x3b/0x60\n   kfree+0xf5/0x440\n   kvm_set_memslot+0x3c2/0x1160 [kvm]\n   kvm_set_memory_region.part.0+0x86a/0x1110 [kvm]\n   kvm_vm_ioctl+0x14b0/0x3290 [kvm]\n   __x64_sys_ioctl+0x129/0x1a0\n   do_syscall_64+0x5b/0x900\n   entry_SYSCALL_64_after_hwframe+0x4b/0x53"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Exploitation requires local ioctl operations on a KVM VM file descriptor followed by closing the guest_memfd; no guest or network path reaches the flaw.\nAC:L - The attacker deterministically creates and binds a guest_memfd slot, clears its flag, reclaims the freed allocation, and closes the file. No race or condition outside the attacker’s control is required.\nPR:L - The attacker needs access to /dev/kvm and an attacker-owned VM descriptor, typically granted through the kvm group or a device ACL. None of the relevant ioctls requires a capability or init-namespace root.\nUI:N - The attacker performs the complete ioctl and file-release sequence without any victim action.\nS:U - The vulnerable interface is invoked by host userspace rather than a guest, and the resulting host-kernel compromise remains within the host OS security authority.\nC:H - The reclaimable stale memslot is subsequently read during MMU invalidation, including attacker-influenceable bounds and architecture pointers. Exploiting this kernel UAF can expose arbitrary host kernel or VM memory.\nI:H - Release performs an attacker-timed eight-byte NULL write into a reclaimed allocation and subsequently follows stale MMU metadata. Heap shaping can turn this into arbitrary kernel-state corruption or host code execution.\nA:H - The flaw demonstrably causes a slab use-after-free write, and the x86 path can also issue a warning before release. Repeated triggering can corrupt MMU state, oops, or panic the host kernel."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["virt/kvm/kvm_main.c"],"versions":[{"version":"a7800aa80ea4d5356b8474c2302812e9d4926fa6","lessThan":"89dbbe6ff323fc34659621a577fe0af913f47386","status":"affected","versionType":"git"},{"version":"a7800aa80ea4d5356b8474c2302812e9d4926fa6","lessThan":"cb51bef465d8ec60a968507330e01020e35dc127","status":"affected","versionType":"git"},{"version":"a7800aa80ea4d5356b8474c2302812e9d4926fa6","lessThan":"9935df5333aa503a18de5071f53762b65c783c4c","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["virt/kvm/kvm_main.c"],"versions":[{"version":"6.8","status":"affected"},{"version":"0","lessThan":"6.8","status":"unaffected","versionType":"semver"},{"version":"6.12.64","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.3","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"6.19","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.12.64"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.18.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.19"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/89dbbe6ff323fc34659621a577fe0af913f47386"},{"url":"https://git.kernel.org/stable/c/cb51bef465d8ec60a968507330e01020e35dc127"},{"url":"https://git.kernel.org/stable/c/9935df5333aa503a18de5071f53762b65c783c4c"}],"title":"KVM: Disallow toggling KVM_MEM_GUEST_MEMFD on an existing memslot","x_generator":{"engine":"bippy-1.2.0"}}}}