{"id":71293,"date":"2025-10-09T15:43:22","date_gmt":"2025-10-09T12:13:22","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-39961-iommu-amd-pgtbl-fix-possible-race-while-increase-page-table-level\/"},"modified":"2025-10-09T15:43:22","modified_gmt":"2025-10-09T12:13:22","slug":"cve-2025-39961-iommu-amd-pgtbl-fix-possible-race-while-increase-page-table-level","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-39961-iommu-amd-pgtbl-fix-possible-race-while-increase-page-table-level\/","title":{"rendered":"CVE-2025-39961 &#8211; iommu\/amd\/pgtbl: Fix possible race while increase page table level"},"content":{"rendered":"<p>CVE ID : CVE-2025-39961<\/p>\n<p>Published :  Oct. 9, 2025, 12:13 p.m. | 24\u00a0minutes ago<\/p>\n<p>Description : In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>iommu\/amd\/pgtbl: Fix possible race while increase page table level<\/p>\n<p>The AMD IOMMU host page table implementation supports dynamic page table levels<br \/>\n(up to 6 levels), starting with a 3-level configuration that expands based on<br \/>\nIOVA address. The kernel maintains a root pointer and current page table level<br \/>\nto enable proper page table walks in alloc_pte()\/fetch_pte() operations.<\/p>\n<p>The IOMMU IOVA allocator initially starts with 32-bit address and onces its<br \/>\nexhuasted it switches to 64-bit address (max address is determined based<br \/>\non IOMMU and device DMA capability). To support larger IOVA, AMD IOMMU<br \/>\ndriver increases page table level.<\/p>\n<p>But in unmap path (iommu_v1_unmap_pages()), fetch_pte() reads<br \/>\npgtable-&gt;[root\/mode] without lock. So its possible that in exteme corner case,<br \/>\nwhen increase_address_space() is updating pgtable-&gt;[root\/mode], fetch_pte()<br \/>\nreads wrong page table level (pgtable-&gt;mode). It does compare the value with<br \/>\nlevel encoded in page table and returns NULL. This will result is<br \/>\niommu_unmap ops to fail and upper layer may retry\/log WARN_ON.<\/p>\n<p>CPU 0                                         CPU 1<br \/>\n&#8212;&#8212;                                       &#8212;&#8212;<br \/>\nmap pages                                    unmap pages<br \/>\nalloc_pte() -&gt; increase_address_space()      iommu_v1_unmap_pages() -&gt; fetch_pte()<br \/>\n  pgtable-&gt;root = pte (new root value)<br \/>\n                                             READ pgtable-&gt;[mode\/root]\n\t\t\t\t\t       Reads new root, old mode<br \/>\n  Updates mode (pgtable-&gt;mode += 1)<\/p>\n<p>Since Page table level updates are infrequent and already synchronized with a<br \/>\nspinlock, implement seqcount to enable lock-free read operations on the read path.<\/p>\n<p>Severity: 0.0 | NA<\/p>\n<p>Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-39961 Published : Oct. 9, 2025, 12:13 p.m. | 24\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: iommu\/amd\/pgtbl: Fix possible race while increase page table level The AMD IOMMU host page table implementation supports dynamic page table levels (up to 6 levels), starting with a 3-level &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-71293","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/71293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=71293"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/71293\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=71293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=71293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=71293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}