iommu/vt-d: Flush context cache with correct SID when tearing down aliases
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.12.114, 6.18.52, 7.2.6
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Flush context cache with correct SID when tearing down aliases domain_context_clear_one() and device_pasid_table_teardown() are both invoked once per DMA alias of a device. Each function locates the context entry using the bus/devfn pair provided by the pci_for_each_dma_alias() callback, then calls intel_context_flush_no_pasid(), which constructs a device-selective context-cache invalidation from info->bus and info->devfn (that is, always the requester ID of the device itself). As a result, for every alias other than the device’s own RID, the context entry that was just cleared in memory is never invalidated in the context cache. Hardware may continue using that stale cached entry. In the scalable-mode teardown path, intel_pasid_free_table() can then free the PASID directory still referenced by that stale entry, allowing the IOMMU to walk freed memory. Fix this by passing the source ID of the entry being torn down to intel_context_flush_no_pasid(), instead of deriving it from @info.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From f90584f4beb84211c4d21b319cc13f391fe9f3c2 · fixed in 3eb6ad14ef359e426cff14942e220de101cdbe84; From f90584f4beb84211c4d21b319cc13f391fe9f3c2 · fixed in a803141597d61dc0511f7cd849625e17d042ca8a; From f90584f4beb84211c4d21b319cc13f391fe9f3c2 · fixed in 5baddf100b3be730912485648cbaae5e3a251923; From f90584f4beb84211c4d21b319cc13f391fe9f3c2 · fixed in c54e4ae971b98e8d650400137d332cee56c03f55
- Linux Linux
6.11
- KernelLinux
From 6.11.0 · fixed in 6.12.114; From 6.13.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6