iommu/sva: Set handle->dev before the SVA handle is visible
- 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.6.160, 6.12.109, 6.18.50, 7.2.4
- 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/sva: Set handle->dev before the SVA handle is visible iommu_attach_device_pasid() installs the new SVA attach handle in the group PASID lookup before iommu_sva_bind_device() returns. A concurrent bind can therefore find and reuse the same handle after iommu_sva_lock is dropped. handle->dev was initialized after dropping iommu_sva_lock. This leaves a window where a racing bind can return a handle whose dev pointer is still NULL. A subsequent iommu_sva_unbind_device() can then dereference it via handle->dev->iommu_group. Initialize handle->dev before releasing iommu_sva_lock so any visible SVA handle is fully initialized.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From be51b1d6bbff48c7d1943a8ff1e5a55777807f6e · fixed in c4c71368bc5c5b3840590d39b4cfa12d733cadf4; From be51b1d6bbff48c7d1943a8ff1e5a55777807f6e · fixed in bcffb1c75da8fc9d51168ff9f09d471c26507912; From be51b1d6bbff48c7d1943a8ff1e5a55777807f6e · fixed in 968e9a1f71140c86dc4092f6b361e997923f3813; From be51b1d6bbff48c7d1943a8ff1e5a55777807f6e · fixed in 37a96a30617a4c96f048a5874c00509bc4fe4d85; From be51b1d6bbff48c7d1943a8ff1e5a55777807f6e · fixed in 530f8f9c3546cb3ebee1b135375aaee08a073ebb
- Linux Linux
6.2
- KernelLinux
From 6.2.0 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.109; From 6.13.0 · fixed in 6.18.50; From 6.19.0 · fixed in 7.2.4