# CVE-2026-63807: KVM: x86/mmu: Ensure hugepage is in by slot before checking max mapping level

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 4, 2026-11-26)
- **CWE:** CWE-125, CWE-787
- **Published:** 2026-07-19T12:02:10.759Z
- **Modified:** 2026-10-19T20:19:21.260Z

## Who should check

- Anyone running Linux \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 7b52008023b7facf40fba3ebe92449bda8ea53b9; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 5cab1c989f938f5e1b9a0de66486f1fc2c28479b; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 48b91ed7e22bb82571c34f8b80b6ecdc90a6fab8; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< c5c29b3c268332afe67d598a034c58344540ed92; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 18587f9831612e24cd8f24be1ec15478feff7abc; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< b2ae3245ea44dccaa9af676b6747476951883318; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< ef057cbf825e03b63f6edf5980f96abf3c53089d
- Anyone running Linux 5.12

## Description

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.

## Affected and fixed versions

- Linux: \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 7b52008023b7facf40fba3ebe92449bda8ea53b9; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 5cab1c989f938f5e1b9a0de66486f1fc2c28479b; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 48b91ed7e22bb82571c34f8b80b6ecdc90a6fab8; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< c5c29b3c268332afe67d598a034c58344540ed92; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 18587f9831612e24cd8f24be1ec15478feff7abc; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< b2ae3245ea44dccaa9af676b6747476951883318; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< ef057cbf825e03b63f6edf5980f96abf3c53089d (cvelist)
- Linux: 5.12 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-63807. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-63807.md
Affected: Linux >= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, < 7b52008023b7facf40fba3ebe92449bda8ea53b9; >= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, < 5cab1c989f938f5e1b9a0de66486f1fc2c28479b; >= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, < 48b91ed7e22bb82571c34f8b80b6ecdc90a6fab8; >= 9eba50f8d7fcb61774f1608…
Fixed in: Linux 7b52008023b7facf40fba3ebe92449bda8ea53b9, Linux 5cab1c989f938f5e1b9a0de66486f1fc2c28479b, Linux 48b91ed7e22bb82571c34f8b80b6ecdc90a6fab8, Linux 18587f9831612e24cd8f24be1ec15478feff7abc

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-63807 being exploited?

There is no confirmed exploitation: CVE-2026-63807 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-63807?

High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-63807?

Linux \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 7b52008023b7facf40fba3ebe92449bda8ea53b9; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 5cab1c989f938f5e1b9a0de66486f1fc2c28479b; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 48b91ed7e22bb82571c34f8b80b6ecdc90a6fab8; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< c5c29b3c268332afe67d598a034c58344540ed92; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< 18587f9831612e24cd8f24be1ec15478feff7abc; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< b2ae3245ea44dccaa9af676b6747476951883318; \>= 9eba50f8d7fcb61774f160890f98239fa3ab68a6, \< ef057cbf825e03b63f6edf5980f96abf3c53089d; Linux 5.12.

### Is there a fix for CVE-2026-63807?

Yes. Fixed in Linux 7b52008023b7facf40fba3ebe92449bda8ea53b9, Linux 5cab1c989f938f5e1b9a0de66486f1fc2c28479b, Linux 48b91ed7e22bb82571c34f8b80b6ecdc90a6fab8, Linux 18587f9831612e24cd8f24be1ec15478feff7abc. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-63807?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/7b52008023b7facf40fba3ebe92449bda8ea53b9>
- patch: <https://git.kernel.org/stable/c/5cab1c989f938f5e1b9a0de66486f1fc2c28479b>
- patch: <https://git.kernel.org/stable/c/48b91ed7e22bb82571c34f8b80b6ecdc90a6fab8>
- patch: <https://git.kernel.org/stable/c/c5c29b3c268332afe67d598a034c58344540ed92>
- patch: <https://git.kernel.org/stable/c/18587f9831612e24cd8f24be1ec15478feff7abc>
- patch: <https://git.kernel.org/stable/c/b2ae3245ea44dccaa9af676b6747476951883318>
- patch: <https://git.kernel.org/stable/c/ef057cbf825e03b63f6edf5980f96abf3c53089d>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-63807>

HTML: <https://flawdb.com/CVE-2026-63807> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-63807>
