CVE-2025-40274
Linux Kernel vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Exploitability

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).

Mitigation and workarounds

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).

Community reactions

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).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-74573CRITICAL9.3
  • Linux Kernel logoLinux Kernel
  • kernel-64k-debug-devel-matched
NoYesAug 15, 2026
CVE-2026-74562HIGH8.8
  • Linux Kernel logoLinux Kernel
  • kernel-64k-debug-devel-matched
NoYesAug 15, 2026
CVE-2026-74565HIGH7.8
  • Linux Kernel logoLinux Kernel
  • kernel-uki-virt
NoYesAug 15, 2026
CVE-2026-74578HIGH7.1
  • Linux Kernel logoLinux Kernel
  • linux-nvidia-tegra
NoYesAug 16, 2026
CVE-2026-74579NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-xilinx-zynqmp
NoYesAug 17, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management