In the Linux kernel, the following vulnerability has been resolved:
KVM: x86/mmu: Ensure hugepage is in by slot before checking max mapping level
When recovering hugepages in the shadow MMU, verify that the base gfn of the shadow page is actually contained within the target memslot, *before* querying the max mapping level given the shadow page's gfn. Failure to pre-check the validity of the gfn can lead to an out-of-bounds access to the slot's lpage_info (which typically manifests as a host #PF because the lpage_info is vmalloc'd) if the guest creates a hugepage mapping (in its PTEs) that extends "below" the bounds of a memslot.
When faulting in memory for a guest, and the size of the guest mapping is greater than KVM's (current) max mapping, then KVM will create a "direct" shadow page (direct in that there are no gPTEs to shadow, and so the target gfn is a direct calculation given the base gfn of the shadow page). The hugepage recovery flow looks for such direct shadow pages, as forcing 4KiB mappings when dirty logging generates the guest > host mapping size case. When the 4KiB restriction is lifted, then KVM can replace the shadow page with a hugepage.
But if KVM originally used a smaller mapping than the guest because the range of memory covered by the guest hugepage exceeds the bounds of a memslot, then KVM will link a direct shadow page with a gfn that is outside the bounds of the memslot being used to fault in memory. The rmap entry added for the leaf mapping is correct and within bounds, but the gfn of the leaf SPTE's parent shadow page will be out of bounds.
BUG: unable to handle page fault for address: ffffc90000806ffc #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 100000067 P4D 100000067 PUD 1002a7067 PMD 10612f067 PTE 0 Oops: Oops: 0000 [#1] SMP CPU: 13 UID: 1000 PID: 757 Comm: mmu_stress_test Not tainted 7.1.0-rc1-48ce1e26eace-x86_pir_to_irr_comments-vm #341 PREEMPT Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kvm_mmu_max_mapping_level+0x79/0x2b0 [kvm] Call Trace: <TASK> kvm_mmu_recover_huge_pages+0x21b/0x320 [kvm] kvm_set_memslot+0x1ee/0x590 [kvm] kvm_set_memory_region.part.0+0x3a1/0x4d0 [kvm] kvm_vm_ioctl+0x9bf/0x15d0 [kvm] __x64_sys_ioctl+0x8a/0xd0 do_syscall_64+0xb7/0xbb0 entry_SYSCALL_64_after_hwframe+0x4b/0x53 RIP: 0033:0x7f21c0f1a9bf </TASK>
Don't bother pre-checking the bounds of the potential hugepage, i.e. don't check that e.g. sp->gfn + KVM_PAGES_PER_HPAGE(sp->role.level + 1) is also within the memslot, as the checks performed by kvm_mmu_max_mapping_level() are a superset of the basic bounds checks. I.e. pre-checking the full range would be a dubious micro-optimization.
CVSS Details
- CVSS 3.1 Base Score: 8.8
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon Linux Ami 2 | — | Upgrade python-perf-debuginfoUpgrade bpftool-debuginfoUpgrade kernel-debuginfo-common-x86_64Upgrade python-perfUpgrade kernel-livepatch-5.15.211-149.249Upgrade kernel-headersUpgrade kernelUpgrade kernel-develUpgrade kernel-tools-debuginfoUpgrade kernel-debuginfoUpgrade perf-debuginfoUpgrade perfUpgrade kernel-toolsUpgrade kernel-tools-develUpgrade bpftoolUpgrade kernel-debuginfo-common-aarch64 | Aug 2, 2026 | Aug 2, 2026 |
| Amazon_linux_2023 | — | Upgrade bpftool6.18Upgrade perf6.18Upgrade perf6.18-debuginfoUpgrade python3-perf6.18Upgrade kernel6.18-debuginfoUpgrade bpftool6.18-debuginfoUpgrade kernel6.18-debuginfo-common-x86_64Upgrade kernel6.18-tools-debuginfoUpgrade python3-perf6.18-debuginfoUpgrade kernel6.18-develUpgrade kernel6.18-tools-develUpgrade kernel6.18-modules-extraUpgrade kernel6.18-modules-extra-commonUpgrade kernel6.18-headersUpgrade kernel-livepatch-6.18.38-73.137Upgrade kernel6.18-toolsUpgrade kernel6.18-debuginfo-common-aarch64Upgrade kernel6.18Upgrade microvm-kernel6.18 | Aug 10, 2026 | Jul 19, 2026 |
| Debian | — | Upgrade linuxUpgrade linux-6.1 | Jul 20, 2026 | Jul 20, 2026 |
| Redhat_linux | — | Upgrade kernel-rtNo solution existsUpgrade kernel | Jul 22, 2026 | Jul 19, 2026 |
| Ubuntu | — | Upgrade linux-image-virtual-7.0Upgrade linux-image-7.0.0-1011-oracle-64kUpgrade linux-image-generic-64k-7.0Upgrade linux-image-nvidia-tegra-6.8Upgrade linux-image-nvidia-bos-64kUpgrade linux-image-7.0.0-1019-raspi-realtimeUpgrade linux-image-genericUpgrade linux-image-aws-7.0Upgrade linux-image-7.0.0-2018-nvidia-bosUpgrade linux-image-gkeUpgrade linux-image-realtime-64k-7.0Upgrade linux-image-gcp-64k-7.0Upgrade linux-image-7.0.0-1019-raspiUpgrade linux-image-oem-7.0Upgrade linux-image-nvidiaUpgrade linux-image-7.0.0-31-realtime-64kUpgrade linux-image-nvidia-64k-hwe-26.04Upgrade linux-image-aws-64k-7.0Upgrade linux-image-azure-lts-26.04Upgrade linux-image-7.0.0-1006-gke-64kUpgrade linux-image-gcpUpgrade linux-image-ibmUpgrade linux-image-generic-64kUpgrade linux-image-7.0.0-1011-gcpUpgrade linux-image-7.0.0-31-genericUpgrade linux-image-nvidia-bos-7.0Upgrade linux-image-azureUpgrade linux-image-raspi-realtime-7.0Upgrade linux-image-generic-64k-hwe-26.04Upgrade linux-image-gke-64k-hwe-26.04Upgrade linux-image-realtime-7.0Upgrade linux-image-realtime-hwe-26.04Upgrade linux-image-7.0.0-1013-oemUpgrade linux-image-aws-64kUpgrade linux-image-gke-hwe-26.04Upgrade linux-image-nvidia-64kUpgrade linux-image-nvidia-64k-7.0Upgrade linux-image-6.8.0-1035-nvidia-tegra-rtUpgrade linux-image-nvidia-hwe-26.04Upgrade linux-image-virtual-hwe-24.04Upgrade linux-image-7.0.0-31-generic-64kUpgrade linux-image-raspi-realtimeUpgrade linux-image-virtualUpgrade linux-image-oracle-64kUpgrade linux-image-oracle-64k-7.0Upgrade linux-image-7.0.0-1014-azureUpgrade linux-image-nvidia-tegraUpgrade linux-image-ibm-7.0Upgrade linux-image-realtime-64k-hwe-26.04Upgrade linux-image-generic-7.0Upgrade linux-image-gcp-64kUpgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-gke-64k-7.0Upgrade linux-image-nvidia-tegra-rtUpgrade linux-image-gke-7.0Upgrade linux-image-7.0.0-1012-aws-64kUpgrade linux-image-realtimeUpgrade linux-image-awsUpgrade linux-image-raspiUpgrade linux-image-7.0.0-1006-gkeUpgrade linux-image-oracle-7.0Upgrade linux-image-gcp-7.0Upgrade linux-image-nvidia-bos-64k-7.0Upgrade linux-image-7.0.0-2018-nvidia-bos-64kUpgrade linux-image-virtual-hwe-26.04Upgrade linux-image-realtime-64kUpgrade linux-image-generic-hwe-24.04Upgrade linux-image-7.0.0-1018-nvidiaUpgrade linux-image-7.0.0-1011-gcp-64kUpgrade linux-image-6.8.0-1035-nvidia-tegraUpgrade linux-image-gke-64kUpgrade linux-image-7.0.0-31-realtimeUpgrade linux-image-nvidia-tegra-rt-6.8Upgrade linux-image-nvidia-7.0Upgrade linux-image-7.0.0-1013-ibmUpgrade linux-image-raspi-7.0Upgrade linux-image-oracleUpgrade linux-image-oem-26.04bUpgrade linux-image-generic-hwe-26.04Upgrade linux-image-azure-7.0Upgrade linux-image-nvidia-bosUpgrade linux-image-7.0.0-1018-nvidia-64kUpgrade linux-image-7.0.0-1012-awsUpgrade linux-image-7.0.0-1011-oracleUpgrade linux-image-oem-26.04aUpgrade linux-image-oem-26.04 | Sep 14, 2026 | Sep 7, 2026 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jul 27, 2026 | Jul 19, 2026 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub