Description
In the Linux kernel, the following vulnerability has been resolved:

KVM: x86: Fix shadow paging use-after-free due to unexpected role

Commit 0cb2af2ea66ad ("KVM: x86: Fix shadow paging use-after-free due
to unexpected GFN") fixed a shadow paging mismatch between stored and
computed GFNs; the bug could be triggered by changing a PDE mapping from
outside the guest, and then deleting a memslot. The rmap_remove()
call would miss entries created after the PDE change because the GFN
of the leaf SPTE does not match the GFN of the struct kvm_mmu_page.

A similar hole however remains if the modified PDE points to a non-leaf
page. In this case the gfn can be made to match, but the role does not
match: the original large 2MB page creates a kvm_mmu_page with direct=1,
while the new 4KB needs a kvm_mmu_page with direct=0. However,
kvm_mmu_get_child_sp() does not compare the role, and therefore reuses
the page.

The next step is installing a leaf (4KB) SPTE on the new path which
records an rmap entry under the gfn resolved by the walk. But when
that child is zapped its parent kvm_mmu_page has direct=1 and
kvm_mmu_page_get_gfn() computes the gfn for the 4KB page as
sp->gfn + index instead of using sp->shadowed_translation[] (or sp->gfns[]
in older kernels). It therefore fails to remove the recorded entry.

When the memslot is dropped the shadow page is freed but the rmap
entry survives, as in the scenario that was already fixed. Code that
later walks that gfn (dirty logging, MMU notifier invalidation, and
so on) dereferences an sptep that lies in the freed page, causing the
use-after-free.
Published: 2026-07-04
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is a CWE‑825 use‑after‑free flaw in the Linux KVM x86 shadow‑paging subsystem. An external change to a PDE mapping can cause the RMAP entry to retain a reference to a page that has been freed, leading to memory accesses to the stale page. This exposes the host kernel to potential crash or, if exploitable, privilege escalation.

Affected Systems

All Linux kernels running on x86 that use KVM and contain the unpatched shadow paging logic are affected. The affected product is the generic Linux kernel as listed in the CPE—no specific distribution or version range is enumerated by the CNA, so any distribution on the impacted kernel version should be considered vulnerable.

Risk and Exploitability

The CVSS score is 8.8, indicating a high severity. The EPSS score is less than 1 % and the vulnerability is not listed in CISA KEV, implying a low likelihood of widespread exploitation. Based on the description, it is inferred that an attacker must be able to modify host PDE mappings from outside the guest, which typically requires privileged access within the KVM environment or host administrator rights. If an attacker can trigger the vulnerable memory‑slot removal sequence, the resulting use‑after‑free could cause a kernel crash or be harnessed for privilege escalation.

Generated by OpenCVE AI on July 22, 2026 at 13:07 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the host kernel to a version that includes commit 0cb2af2.
  • Reboot the system to activate the patched kernel and load the updated KVM module.
  • Restrict guest creation and access to /dev/kvm: grant the device only to trusted users, configure the kvm group and untrusted users from launching virtual machines.

Generated by OpenCVE AI on July 22, 2026 at 13:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4688-1 linux security update
Debian DSA Debian DSA DSA-6381-1 linux security update
History

Sat, 18 Jul 2026 08:00:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'}


Mon, 06 Jul 2026 13:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Mon, 06 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Important


Sun, 05 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Sun, 05 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Sun, 05 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Sat, 04 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Fix shadow paging use-after-free due to unexpected role Commit 0cb2af2ea66ad ("KVM: x86: Fix shadow paging use-after-free due to unexpected GFN") fixed a shadow paging mismatch between stored and computed GFNs; the bug could be triggered by changing a PDE mapping from outside the guest, and then deleting a memslot. The rmap_remove() call would miss entries created after the PDE change because the GFN of the leaf SPTE does not match the GFN of the struct kvm_mmu_page. A similar hole however remains if the modified PDE points to a non-leaf page. In this case the gfn can be made to match, but the role does not match: the original large 2MB page creates a kvm_mmu_page with direct=1, while the new 4KB needs a kvm_mmu_page with direct=0. However, kvm_mmu_get_child_sp() does not compare the role, and therefore reuses the page. The next step is installing a leaf (4KB) SPTE on the new path which records an rmap entry under the gfn resolved by the walk. But when that child is zapped its parent kvm_mmu_page has direct=1 and kvm_mmu_page_get_gfn() computes the gfn for the 4KB page as sp->gfn + index instead of using sp->shadowed_translation[] (or sp->gfns[] in older kernels). It therefore fails to remove the recorded entry. When the memslot is dropped the shadow page is freed but the rmap entry survives, as in the scenario that was already fixed. Code that later walks that gfn (dirty logging, MMU notifier invalidation, and so on) dereferences an sptep that lies in the freed page, causing the use-after-free.
Title KVM: x86: Fix shadow paging use-after-free due to unexpected role
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-07-18T07:33:28.132Z

Reserved: 2026-06-09T07:44:35.400Z

Link: CVE-2026-53359

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-04T00:00:00Z

Links: CVE-2026-53359 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-22T13:15:12Z

Weaknesses
  • CWE-825

    Expired Pointer Dereference