CVE-2026-143335: vdpa: invalidate DMA mappings before releasing memory
In the Linux kernel, the following vulnerability has been resolved:
vdpa: invalidate DMA mappings before releasing memory
vdpa can release pinned pages and file references before the device stops using the corresponding mappings, allowing stale DMA to corrupt memory.
Invalidate mappings before dropping their backing references. For setmap backends, publish an IOTLB without the invalidated range and keep the old references if that fails. Do this immediately even within a batch.
Serialize vdpasim setmap updates with its worker so publishing a new map cannot race an active transfer. Abort mlx5 map replacement when resumable virtqueues cannot be suspended, since changing the memory region while those queues remain active would preserve the same stale DMA window. Reject zero-sized and wrapping invalidations before calculating their inclusive range end.
I found this bug myself, though the patch was written with AI assistance.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7 - Compensating control
For mlx5 map replacement, abort the replacement when the device is resumable, including when processing a batch.
- Compensating control
For vdpa set_map updates, serialize vdpa_sim updates with its worker; reject memory-region changes while virtqueues remain active; invalidate DMA mappings before releasing pinned-page or file references; and retain the old references if publishing an IOTLB without the invalidated range fails. Reject zero-sized or wrapping invalidations before calculating their inclusive range end.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel vDPA subsystem are exposed when pinned pages or file references backing DMA mappings can be released or replaced while a device may still use those mappings. The description specifically discusses set_map backends, vdpa_sim, and mlx5 map replacement.
What condition allows memory corruption to occur?
The issue occurs when backing pages or file references are released before the device has stopped using the corresponding DMA mappings. The device can then perform stale DMA through mappings whose backing memory is no longer valid.
What mitigations are described if the fix cannot be applied immediately?
The provided information does not describe an operational workaround. The required safety property is to invalidate DMA mappings before releasing their backing references and to avoid replacing a memory region while resumable virtqueues remain active.
How does the fix handle failures while updating mappings?
For set_map backends, the fix publishes an IOTLB that excludes the invalidated range and retains the old references if publishing fails. For mlx5, map replacement is aborted when resumable virtqueues cannot be suspended.