CVE-2026-143329: vduse: avoid infinite loop when no affinity CPU is online
In the Linux kernel, the following vulnerability has been resolved:
vduse: avoid infinite loop when no affinity CPU is online
If all CPUs in vq->irqaffinity are offline, cpumasknext() walks to the end of the mask, and the loop then resets the cursor to IRQUNBOUND and restarts the scan. When VDUSEVQINJECTIRQ is issued, the intersection of vq->irqaffinity and cpuonlinemask is empty, so the caller busy-loops in kernel context on its current CPU (e.g. CPU2).
Replace the while loop in vdusevqupdateeffectivecpu() with cpumasknextandwrap() to find the intersection of vq->irqaffinity and cpuonlinemask in a single wrapped scan. If the intersection is empty, set currcpu to IRQUNBOUND and let the existing unbound workqueue handle injection, avoiding repeated rescans when all CPUs in the affinity are offline. Use cpusreadlock()/cpusreadunlock() to keep the selected CPU online.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In vduse_vq_update_effective_cpu(), replace the while loop with a single wrapped scan using cpumask_next_and_wrap() over the intersection of vq->irq_affinity and cpu_online_mask, protecting CPU selection with cpus_read_lock()/cpus_read_unlock(). If the intersection is empty, set curr_cpu to IRQ_UNBOUND so the existing unbound workqueue handles the IRQ injection.
Event History
Frequently Asked Questions
What conditions are required to trigger the issue?
A VDUSE virtual queue must have an IRQ affinity mask whose CPUs are all offline, and VDUSE_VQ_INJECT_IRQ must be issued. Under those conditions, the affinity mask has no intersection with the online CPU mask.
What is the operational impact when the condition occurs?
The caller can busy-loop in kernel context on its current CPU while repeatedly rescanning the affinity mask. This can consume that CPU rather than dispatching the interrupt injection through the unbound workqueue.
How does the resolved behavior handle a queue with no online affinity CPU?
It leaves the selected CPU as IRQ_UNBOUND and uses the existing unbound workqueue for injection. The CPU selection is performed while holding the CPU read lock so that a selected CPU remains online.