
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-40274 is a use-after-free vulnerability in the Linux kernel's KVM subsystem, specifically in the guest_memfd (gmem) component. The flaw occurs when a memslot is freed before the associated guest_memfd file is fully released: the kvm_gmem_release() function subsequently writes to already-freed memory when attempting to nullify the memslot side of the binding. The vulnerability was disclosed on December 6, 2025, and affects the Linux kernel's KVM guest memory file descriptor implementation. It carries an estimated CVSS severity of Medium and an EPSS score of 0.017% (Red Hat CVE, Feedly).
The root cause is a use-after-free condition (CWE-416) in virt/kvm/guest_memfd.c. When a KVM memslot bound to a guest_memfd instance is deleted while the gmem file's reference count has already dropped to zero (i.e., the file is dying), the unbinding logic in kvm_gmem_release() at line 353 writes to the already-freed memslot memory. The fix ensures that bindings are removed during memslot deletion even when the guest_memfd file is in the process of being released, preventing the stale pointer dereference. The bug was detected by syzbot with KASAN instrumentation, which reported a slab-use-after-free write of 8 bytes at the affected address (Red Hat CVE).
Successful exploitation of this vulnerability could allow a local attacker or a privileged guest/host process to trigger a kernel crash (denial of service) or potentially corrupt kernel memory through the use-after-free write. In KVM-based virtualization environments, this could destabilize the hypervisor host, affecting all virtual machines running on the system. The scope is limited to systems using KVM with guest_memfd-backed memory slots, which is primarily relevant to confidential computing workloads (Red Hat CVE).
There is no public proof-of-concept exploit or evidence of in-the-wild exploitation for CVE-2025-40274. The vulnerability was discovered via automated fuzzing (syzbot) with KASAN, and exploitation would require local access to a KVM host or the ability to manipulate memslot and guest_memfd lifecycle operations. The EPSS score is 0.017%, indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog (Red Hat CVE).
The fix has been committed to the Linux kernel stable tree via patches at git.kernel.org (commits 393893693a52, a8ac2bd0f98e, and ae431059e75d). Users should update to a patched kernel version that includes these fixes. Linux distributions including Red Hat and SUSE have issued or are tracking advisories for this CVE; users should apply the relevant vendor kernel updates as they become available (Red Hat CVE, OpenSUSE Bugzilla).
Red Hat has published a CVE tracking page for this vulnerability. The OpenSUSE project has opened a bug tracker entry (bsc#1254830) to track the fix for their kernel packages. No significant public researcher commentary or media coverage has been identified beyond standard vulnerability database entries (Red Hat CVE, OpenSUSE Bugzilla).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."