Skip to main content
EPSS 0.1%top 96%

In the Linux kernel, the following vulnerability has been resolved: KVM: guest_memfd: Remove bindings on memslot deletion when gmem is dying When… (CVE-2025-40274)

0
High
Published: 12/07/2025 (12/07/2025, 00:30:56 UTC)
Source: GCVE Database

Description

A use-after-free vulnerability in the Linux kernel's KVM guest_memfd component was resolved. The issue occurs when unbinding a memslot from a guest_memfd instance while the guest_memfd file is in the process of being released, leading to a write operation on freed memory. This was detected by KASAN as a slab-use-after-free bug. The vulnerability could allow an attacker with local privileges to cause memory corruption with high impact on confidentiality, integrity, and availability.

CVSS v3.1

Score 7.8high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/30/2026, 17:38:25 UTC

Technical Analysis

The vulnerability (CVE-2025-40274) in the Linux kernel's KVM subsystem involves improper handling of memslot bindings during memslot deletion when the guest_memfd file reference count has dropped to zero (file is dying). Specifically, the bindings were not removed correctly, causing kvm_gmem_release() to write to freed memory, resulting in a use-after-free condition. This was identified by KASAN instrumentation. The root cause is that the lifecycle of the file mapping is outside KVM's control, and the code did not properly handle the memslot unbinding in this edge case. The fix involves removing bindings even if the guest_memfd file is dying to prevent use-after-free.

Potential Impact

This vulnerability allows local attackers with the ability to manipulate KVM guest memory regions to trigger a use-after-free condition, potentially leading to memory corruption. The CVSS vector indicates high impact on confidentiality, integrity, and availability. Exploitation could result in privilege escalation or denial of service within the affected Linux kernel environment.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no explicit patch or official fix link is provided, users should monitor Linux kernel updates and apply relevant patches once available. Until then, avoid untrusted manipulation of KVM guest memory regions involving guest_memfd. No vendor advisory states 'no action required' or 'already mitigated'.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-h3qw-rx4w-h8fj
Osv Schema Version
1.4.0
Aliases
["CVE-2025-40274"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a6b72d59c2644c7f847990f

Added to database: 07/30/2026, 15:50:45 UTC

Last enriched: 07/30/2026, 17:38:25 UTC

Last updated: 09/10/2026, 19:26:50 UTC

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses