CVE-2026-68329

Severity CVSS v4.0:
Pending analysis
Type:
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Publication date:
10/08/2026
Last modified:
30/10/2026

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> iommu/amd: Wait for completion instead of returning early in iommu_completion_wait()<br /> <br /> need_sync is a per-IOMMU flag shared by all domains and devices behind<br /> that IOMMU. It is set whenever a command is queued with sync == true and<br /> cleared when a completion-wait (CWAIT) command is queued. However, a<br /> cleared need_sync only means that a covering CWAIT has been queued, not<br /> that all previously queued commands have actually completed in hardware.<br /> <br /> iommu_completion_wait() read need_sync locklessly and returned early<br /> when it was false. This breaks the "block until all previously queued<br /> commands have completed" contract in a multi-CPU scenario:<br /> <br /> CPU2: queue inv-B =&gt; need_sync = true<br /> CPU1: queue CWAIT(N); need_sync = false; then wait_on_sem(N)<br /> CPU2: read need_sync == false =&gt; return 0 (no wait!)<br /> <br /> CPU2 returns without waiting for any sequence number even though its<br /> inv-B may not have completed yet (CWAIT(N), queued after inv-B, has not<br /> been signaled). CPU2 then proceeds to, for example, free page-table<br /> pages while the IOMMU can still walk stale translations, opening a<br /> use-after-free window. This is a logical race in the meaning of the<br /> flag, not a memory-visibility issue, so barriers alone do not help.<br /> <br /> Fix it without losing the optimization of avoiding redundant CWAIT<br /> commands: take iommu-&gt;lock before testing need_sync, and when it is<br /> false do not return early but wait for the last allocated sequence<br /> number (cmd_sem_val). Since need_sync == false implies no sync command<br /> was queued after the last CWAIT, that CWAIT is FIFO-ordered after every<br /> not-yet-completed command, so waiting for its sequence number guarantees<br /> all prior commands (possibly queued by another CPU) have completed. The<br /> common path with pending work is unchanged and no extra hardware command<br /> is issued.