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 => need_sync = true<br />
CPU1: queue CWAIT(N); need_sync = false; then wait_on_sem(N)<br />
CPU2: read need_sync == false => 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->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.
Impact
Base Score 3.x
8.80
Severity 3.x
HIGH
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/02f8cefa2ad95ea3754f0cfd6fbae7f866202ccb
- https://git.kernel.org/stable/c/1e75a8255f11c81fb07e81e5029cfd75804350a0
- https://git.kernel.org/stable/c/82c9a749d44efaaa1a1c781f8a6cf1747718f228
- https://git.kernel.org/stable/c/93494bd446396c257fb589f59894577e96e406e2
- https://git.kernel.org/stable/c/ab7faf5a172ebfdc423ebb3eea4d472740de82f9
- https://git.kernel.org/stable/c/d053eb7e09e10cbdca3fca8b35c1017d438091b2


