[PATCH 5.10.y 00/17] KVM: fixes for CVE-2026-46113 and related issues

From: Paolo Bonzini

Date: Fri Jun 26 2026 - 07:31:07 EST


Sasha, Greg,

this is the backport to 5.10 for the above CVE. Similar to 5.15, the
fix was relatively simple upstream but only due to years of refactoring
and cleaning up of the code; fixing from scratch is not really feasible
so start by applying the patches that are needed.

Paolo

David Matlack (2):
KVM: x86/mmu: Use a bool for direct
KVM: x86/mmu: Stop passing "direct" to mmu_alloc_root()

Lai Jiangshan (2):
KVM: X86: Fix missed remote tlb flush in rmap_write_protect()
KVM: X86: Synchronize the shadow pagetable before link it

Paolo Bonzini (5):
KVM: x86/mmu: Derive shadow MMU page role from parent
KVM: x86/mmu: Always pass 0 for @quadrant when gptes are 8 bytes
KVM: x86/mmu: pull call to drop_large_spte() into __link_shadow_page()
KVM: x86: Fix shadow paging use-after-free due to unexpected role

Sean Christopherson (9):
KVM: x86/mmu: Capture 'mmu' in a local variable when allocating roots
KVM: x86/mmu: Allocate the lm_root before allocating PAE roots
KVM: x86/mmu: Allocate pae_root and lm_root pages in dedicated helper
KVM: x86/mmu: Ensure MMU pages are available when allocating roots
KVM: x86/mmu: Refactor shadow walk in __direct_map() to reduce
indentation
KVM: x86/mmu: Check PDPTRs before allocating PAE roots
KVM: x86: Fix shadow paging use-after-free due to unexpected GFN
KVM: x86/mmu: Pass the memslot to the rmap callbacks
KVM: x86/mmu: Ensure hugepage is in by slot before checking max
mapping level

arch/x86/kvm/mmu/mmu.c | 431 ++++++++++++++++++++-------------
arch/x86/kvm/mmu/paging_tmpl.h | 72 +++---
arch/x86/kvm/mmu/spte.h | 5 +
arch/x86/kvm/mmu/tdp_mmu.c | 23 +-
arch/x86/kvm/vmx/vmx_ops.h | 3 +-
include/linux/kvm_host.h | 5 +
6 files changed, 308 insertions(+), 231 deletions(-)

--
2.54.0