{"id":14884,"date":"2026-09-04T19:02:16","date_gmt":"2026-09-04T11:02:16","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-63807"},"modified":"2026-09-04T19:02:16","modified_gmt":"2026-09-04T11:02:16","slug":"cve-2026-63807","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-63807","title":{"rendered":"CVE-2026-63807 [HIGH] &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86\/mmu: Ensure"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>KVM: x86\/mmu: Ensure hugepage is in by slot before checking max mapping level<\/p>\n<p>When recovering hugepages in the shadow MMU, verify that the base gfn of<br \/>\nthe shadow page is actually contained within the target memslot, *before*<br \/>\nquerying the max mapping level given the shadow page&#8217;s gfn.  Failure to<br \/>\npre-check the validity of the gfn can lead to an out-of-bounds access to<br \/>\nthe slot&#8217;s lpage_info (which typically manifests as a host #PF because the<br \/>\nlpage_info is vmalloc&#8217;d) if the guest creates a hugepage mapping (in its<br \/>\nPTEs) that extends &#8220;below&#8221; the bounds of a memslot.<\/p>\n<p>When faulting in memory for a guest, and the size of the guest mapping is<br \/>\ngreater than KVM&#8217;s (current) max mapping, then KVM will create a &#8220;direct&#8221;<br \/>\nshadow page (direct in that there are no gPTEs to shadow, and so the target<br \/>\ngfn is a direct calculation given the base gfn of the shadow page).  The<br \/>\nhugepage recovery flow looks for such direct shadow pages, as forcing 4KiB<br \/>\nmappings when dirty logging generates the guest &gt; host mapping size case.<br \/>\nWhen the 4KiB restriction is lifted, then KVM can replace the shadow page<br \/>\nwith a hugepage.<\/p>\n<p>But if KVM originally used a smaller mapping than the guest because the<br \/>\nrange of memory covered by the guest hugepage exceeds the bounds of a<br \/>\nmemslot, then KVM will link a direct shadow page with a gfn that is outside<br \/>\nthe bounds of the memslot being used to fault in memory.  The rmap entry<br \/>\nadded for the leaf mapping is correct and within bounds, but the gfn of the<br \/>\nleaf SPTE&#8217;s parent shadow page will be out of bounds.<\/p>\n<p>  BUG: unable to handle page fault for address: ffffc90000806ffc<br \/>\n  #PF: supervisor read access in kernel mode<br \/>\n  #PF: error_code(0x0000) &#8211; not-present page<br \/>\n  PGD 100000067 P4D 100000067 PUD 1002a7067 PMD 10612f067 PTE 0<br \/>\n  Oops: Oops: 0000 [#1] SMP<br \/>\n  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<br \/>\n  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02\/06\/2015<br \/>\n  RIP: 0010:kvm_mmu_max_mapping_level+0x79\/0x2b0 [kvm]<br \/>\n  Call Trace:<\/p>\n<p>   kvm_mmu_recover_huge_pages+0x21b\/0x320 [kvm]<br \/>\n   kvm_set_memslot+0x1ee\/0x590 [kvm]<br \/>\n   kvm_set_memory_region.part.0+0x3a1\/0x4d0 [kvm]<br \/>\n   kvm_vm_ioctl+0x9bf\/0x15d0 [kvm]<br \/>\n   __x64_sys_ioctl+0x8a\/0xd0<br \/>\n   do_syscall_64+0xb7\/0xbb0<br \/>\n   entry_SYSCALL_64_after_hwframe+0x4b\/0x53<br \/>\n  RIP: 0033:0x7f21c0f1a9bf<\/p>\n<p>Don&#8217;t bother pre-checking the bounds of the potential hugepage, i.e. don&#8217;t<br \/>\ncheck that e.g. sp-&gt;gfn + KVM_PAGES_PER_HPAGE(sp-&gt;role.level + 1) is also<br \/>\nwithin the memslot, as the checks performed by kvm_mmu_max_mapping_level()<br \/>\nare a superset of the basic bounds checks.  I.e. pre-checking the full<br \/>\nrange would be a dubious micro-optimization.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>KVM: x86\/mmu: Ensure hugepage is in by slot before checking max mapping level<\/p>\n<p>When recovering hugepages in the shadow MMU, verify <\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-14884","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/14884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}