{"id":11257,"date":"2026-09-04T18:53:07","date_gmt":"2026-09-04T10:53:07","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-74674"},"modified":"2026-09-04T18:53:07","modified_gmt":"2026-09-04T10:53:07","slug":"cve-2026-74674","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-74674","title":{"rendered":"CVE-2026-74674 [HIGH] &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nmm: fix incorrect flu"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm: fix incorrect flush address in direct page table reclaim<\/p>\n<p>When zap_pte_range reclaims a page table, it does:<\/p>\n<p>    pte_free_tlb(tlb, pmd_pgtable(pmdval), addr);<\/p>\n<p>and this is unconditionally wrong: if this code executes, addr *always*<br \/>\npoints one past the end of the range covered by the table.  The addr<br \/>\nparameter is used to flush the TLB (really the paging-structure-cache)<br \/>\nto drop references to the to-be-freed table, and any architecture that<br \/>\ncares about the parameter will flush the wrong address.  (But they&#8217;ll<br \/>\nstill free the correct page).<\/p>\n<p>I think it&#8217;s worth contemplating why the kernel works at all.<\/p>\n<p>If we hit the offending line of code, we will first clear the PMD entry<br \/>\n(line 1954, zap_empty_pte_table), then we will issue pending flushes if<br \/>\nforce_flush is set (tlb_flush_mmu_tlbonly(tlb)), then we will skip the<br \/>\nretry on line 1979 (phew!), and then we will do the offending<br \/>\npte_free_tlb call.  *Or* we will clear the PMD entry immediately before<br \/>\npte_free_tlb (line 1983, zap_pte_table_if_empty).<\/p>\n<p>If we have any pending flushes (i.e. we actually zapped any last-level<br \/>\nentries) at the time we clear the PMD entry, then the flush really ought<br \/>\nto flush all references to the table (Linus certainly seems to think it<br \/>\nwill on all architectures [0]).<\/p>\n<p>The condition under which we have no accumulated flushes at the time of<br \/>\nthe clear is very complex (the whole zap_pte_range function has absurdly<br \/>\ncomplex control flow).  If we do hit the bad case, then we will end up<br \/>\nclearing the PMD entry after the last time the range is flushed, and any<br \/>\nCPU is free to cache a reference to the (empty) page table.  If this<br \/>\nhappens due to an ordinary read or write, it would segfault, so it would<br \/>\nbe rare.  But the cache could be speculatively filled as well.  Then<br \/>\nwe&#8217;ll flush the wrong address and then free and possibly reuse the<br \/>\ntable.<\/p>\n<p>On x86, even flushing the wrong address works on non-KPTI Intel systems<br \/>\nbecause INVLPG flushes *all* paging-structure-caches, not just the ones<br \/>\nfor the target address.  But INVPCID does not, and flush_tlb_one_user<br \/>\nwill use INVPCID if it&#8217;s available.  And then we&#8217;re toast.  AMD systems<br \/>\nare more susceptible: we set the EFER.TCE bit, which makes even INVLPG<br \/>\nonly flush the target address.<\/p>\n<p>I think this might fix an issue in ripgrep reported here:<br \/>\nhttps:\/\/github.com\/BurntSushi\/ripgrep\/issues\/3494<\/p>\n<p>[0] https:\/\/lore.kernel.org\/all\/CA+55aFzBggoXtNXQeng5d_mRoDnaMBE5Y+URs+PHR67nUpMtaw@mail.gmail.com\/T\/#u<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm: fix incorrect flush address in direct page table reclaim<\/p>\n<p>When zap_pte_range reclaims a page table, it does:<\/p>\n<p>    pte_free_tlb(<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-11257","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/11257","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=11257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}