{"id":58483,"date":"2026-05-30T07:58:06","date_gmt":"2026-05-30T07:58:06","guid":{"rendered":"https:\/\/zero.redgem.net\/?p=58483"},"modified":"2026-05-30T07:58:06","modified_gmt":"2026-05-30T07:58:06","slug":"kvm-x86-fix-shadow-paging-use-after-free-due-to-unexpected-gfn","status":"publish","type":"post","link":"https:\/\/zero.redgem.net\/?p=58483","title":{"rendered":"KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113"},"content":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;&#8221;,&#8221;description&#8221;:&#8221;In the Linux kernel, the following vulnerability has been resolved:\\n\\nKVM: x86: Fix shadow paging use-after-free due to unexpected GFN\\n\\nThe shadow MMU computes GFNs for direct shadow pages using sp-\\u003egfn plus\\nthe SPTE index. This assumption breaks for shadow paging if the guest\\npage tables are modified between VM entries (similar to commit\\naad885e77496, \\&#8221;KVM: x86\/mmu: Drop\/zap existing present SPTE even\\nwhen creating an MMIO SPTE\\&#8221;, 2026-03-27).  The flow is as follows:\\n\\n- a PDE is installed for a 2MB mapping, and a page in that area is\\n  accessed.  KVM creates a kvm_mmu_page consisting of 512 4KB pages;\\n  the kvm_mmu_page is marked by FNAME(fetch) as direct-mapped because\\n  the guest&#8217;s mapping is a huge page (and thus contiguous).\\n\\n- the PDE mapping is changed from outside the guest.\\n\\n- the guest accesses another page in the same 2MB area.  KVM installs\\n  a new leaf SPTE and rmap entry; the SPTE uses the \\&#8221;correct\\&#8221; GFN\\n  (i.e. based on the new mapping, as changed in the previous step) but\\n  that GFN is outside of the [sp-\\u003egfn, sp-\\u003egfn + 511] range; therefore\\n  the rmap entry cannot be found and removed when the kvm_mmu_page\\n  is zapped.\\n\\n- the memslot that covers the first 2MB mapping is deleted, and the\\n  kvm_mmu_page for the now-invalid GPA is zapped.  However, rmap_remove()\\n  only looks at the [sp-\\u003egfn, sp-\\u003egfn + 511] range established in step 1,\\n  and fails to find the rmap entry that was recorded by step 3.\\n\\n- any operation that causes an rmap walk for the same page accessed\\n  by step 3 then walks a stale rmap and dereferences a freed kvm_mmu_page.\\n  This includes dirty logging or MMU notifier invalidations (e.g., from\\n  MADV_DONTNEED).\\n\\nThe underlying issue is that KVM&#8217;s walking of shadow PTEs assumes that\\nif a SPTE is present when KVM wants to install a non-leaf SPTE, then the\\nexisting kvm_mmu_page must be for the correct gfn.  Because the only way\\nfor the gfn to be wrong is if KVM messed up and failed to zap a SPTE&#8230;\\nwhich shouldn&#8217;t happen, but *actually* only happens in response to a\\nguest write.\\n\\nThat bug dates back literally forever, as even the first version of KVM\\nassumes that the GFN matches and walks into the \\&#8221;wrong\\&#8221; shadow page.\\nHowever, that was only an imprecision until 2032a93d66fa (\\&#8221;KVM: MMU:\\nDon&#8217;t allocate gfns page for direct mmu pages\\&#8221;) came along.\\n\\nFix it by checking for a target gfn mismatch and zapping the existing\\nSPTE.  That way the old SP and rmap entries are gone, KVM installs\\nthe rmap in the right location, and everyone is happy.&#8221;,&#8221;published&#8221;:&#8221;2026-05-28T09:35:23.035Z&#8221;,&#8221;modified&#8221;:&#8221;2026-05-30T10:47:46.820Z&#8221;,&#8221;type&#8221;:&#8221;cve&#8221;,&#8221;title&#8221;:&#8221;KVM: x86: Fix shadow paging use-after-free due to unexpected GFN&#8221;,&#8221;source&#8221;:&#8221;Linux&#8221;,&#8221;references&#8221;:&#8221;https:\/\/git.kernel.org\/stable\/c\/488e386484ec8c0e558be6e156edf34ed9f4d5c8\\nhttps:\/\/git.kernel.org\/stable\/c\/06c19c967b845b63172601fe459667d973b7e6b7\\nhttps:\/\/git.kernel.org\/stable\/c\/738ec97b1855df6c08fe2369f798fa0b972e556b\\nhttps:\/\/git.kernel.org\/stable\/c\/14d1e55dfd2cf4711bff164a6aaaddb783552134\\nhttps:\/\/git.kernel.org\/stable\/c\/0cb2af2ea66ad8ff195c156ea690f11216285bdf&#8221;,&#8221;id&#8221;:&#8221;CVE-2026-46113&#8243;,&#8221;bulletinFamily&#8221;:&#8221;&#8221;,&#8221;cwe&#8221;:null,&#8221;cvelist&#8221;:null,&#8221;sourceData&#8221;:&#8221;Linux Linux 6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7\\nLinux Linux 6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7\\nLinux Linux 6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7\\nLinux Linux 6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7\\nLinux Linux 6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7\\nLinux Linux 2.6.20&#8243;,&#8221;sourceHref&#8221;:&#8221;&#8221;,&#8221;cvss&#8221;:{&#8220;score&#8221;:8.8,&#8221;severity&#8221;:&#8221;HIGH&#8221;,&#8221;vector&#8221;:&#8221;CVSS:3.1\/AV:L\/AC:L\/PR:L\/UI:N\/S:C\/C:H\/I:H\/A:H&#8221;,&#8221;version&#8221;:&#8221;3.1&#8243;},&#8221;cvss2&#8243;:{},&#8221;cvss3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;,&#8221;cvssV3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;}},&#8221;href&#8221;:&#8221;&#8221;,&#8221;category_name&#8221;:&#8221;CVE&#8221;,&#8221;post_link&#8221;:&#8221;&#8221;,&#8221;product&#8221;:&#8221;Linux&#8221;,&#8221;version&#8221;:&#8221;6aa8b732ca01c3d7a54e93f4d701b8aabbe60fb7&#8243;,&#8221;vendor&#8221;:&#8221;Linux&#8221;,&#8221;ai_description&#8221;:&#8221;&#8221;,&#8221;ai_severity&#8221;:&#8221;&#8221;,&#8221;ai_vendor&#8221;:&#8221;&#8221;,&#8221;ai_product&#8221;:&#8221;&#8221;,&#8221;ai_version&#8221;:&#8221;&#8221;,&#8221;ai_score&#8221;:0}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;&#8221;,&#8221;description&#8221;:&#8221;In the Linux kernel, the following vulnerability has been resolved:\\n\\nKVM: x86: Fix shadow paging use-after-free due to unexpected GFN\\n\\nThe shadow MMU computes GFNs for direct&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[6,8,41,12,15,13,7,11,5],"class_list":["post-58483","post","type-post","status-publish","format-standard","hentry","category-category_cve","tag-cve","tag-cvss","tag-cvss-88","tag-exploit","tag-high","tag-news","tag-security","tag-tapic","tag-vulnerability"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113 - zero redgem<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zero.redgem.net\/?p=58483\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113 - zero redgem\" \/>\n<meta property=\"og:description\" content=\"{&#8220;lastseen&#8221;:&#8221;&#8221;,&#8221;description&#8221;:&#8221;In the Linux kernel, the following vulnerability has been resolved:nnKVM: x86: Fix shadow paging use-after-free due to unexpected GFNnnThe shadow MMU computes GFNs for direct...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zero.redgem.net\/?p=58483\" \/>\n<meta property=\"og:site_name\" content=\"zero redgem\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-30T07:58:06+00:00\" \/>\n<meta name=\"author\" content=\"invoker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"invoker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=58483#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=58483\"},\"author\":{\"name\":\"invoker\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\"},\"headline\":\"KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113\",\"datePublished\":\"2026-05-30T07:58:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=58483\"},\"wordCount\":763,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"keywords\":[\"CVE\",\"CVSS\",\"CVSS-8.8\",\"exploit\",\"HIGH\",\"news\",\"Security\",\"tapic\",\"Vulnerability\"],\"articleSection\":[\"category_cve\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=58483#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=58483\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?p=58483\",\"name\":\"KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113 - zero redgem\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\"},\"datePublished\":\"2026-05-30T07:58:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=58483#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=58483\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=58483#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zero.redgem.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"name\":\"zero redgem\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/zero.redgem.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\",\"name\":\"zero redgem\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\",\"contentUrl\":\"\",\"width\":191,\"height\":188,\"caption\":\"zero redgem\"},\"image\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\",\"name\":\"invoker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"caption\":\"invoker\"},\"sameAs\":[\"https:\\\/\\\/zero.redgem.net\"],\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113 - zero redgem","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zero.redgem.net\/?p=58483","og_locale":"en_US","og_type":"article","og_title":"KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113 - zero redgem","og_description":"{&#8220;lastseen&#8221;:&#8221;&#8221;,&#8221;description&#8221;:&#8221;In the Linux kernel, the following vulnerability has been resolved:nnKVM: x86: Fix shadow paging use-after-free due to unexpected GFNnnThe shadow MMU computes GFNs for direct...","og_url":"https:\/\/zero.redgem.net\/?p=58483","og_site_name":"zero redgem","article_published_time":"2026-05-30T07:58:06+00:00","author":"invoker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"invoker","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zero.redgem.net\/?p=58483#article","isPartOf":{"@id":"https:\/\/zero.redgem.net\/?p=58483"},"author":{"name":"invoker","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca"},"headline":"KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113","datePublished":"2026-05-30T07:58:06+00:00","mainEntityOfPage":{"@id":"https:\/\/zero.redgem.net\/?p=58483"},"wordCount":763,"commentCount":0,"publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"keywords":["CVE","CVSS","CVSS-8.8","exploit","HIGH","news","Security","tapic","Vulnerability"],"articleSection":["category_cve"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zero.redgem.net\/?p=58483#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zero.redgem.net\/?p=58483","url":"https:\/\/zero.redgem.net\/?p=58483","name":"KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113 - zero redgem","isPartOf":{"@id":"https:\/\/zero.redgem.net\/#website"},"datePublished":"2026-05-30T07:58:06+00:00","breadcrumb":{"@id":"https:\/\/zero.redgem.net\/?p=58483#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zero.redgem.net\/?p=58483"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zero.redgem.net\/?p=58483#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zero.redgem.net\/"},{"@type":"ListItem","position":2,"name":"KVM: x86: Fix shadow paging use-after-free due to unexpected GFN_CVE-2026-46113"}]},{"@type":"WebSite","@id":"https:\/\/zero.redgem.net\/#website","url":"https:\/\/zero.redgem.net\/","name":"zero redgem","description":"","publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zero.redgem.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/zero.redgem.net\/#organization","name":"zero redgem","url":"https:\/\/zero.redgem.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/","url":"","contentUrl":"","width":191,"height":188,"caption":"zero redgem"},"image":{"@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca","name":"invoker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","caption":"invoker"},"sameAs":["https:\/\/zero.redgem.net"],"url":"https:\/\/zero.redgem.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/58483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=58483"}],"version-history":[{"count":0,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/58483\/revisions"}],"wp:attachment":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=58483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=58483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=58483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}