iommu/amd: Put PCI device after handling PPR faults
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iommu/amd: Put PCI device after handling PPR faults
iommu_call_iopf_notifier() looks up the requester with pci_get_domain_bus_and_slot(), which returns a PCI device with its reference count incremented.
Neither the successful iommu_report_device_fault() path nor the abort path drops that reference, so every handled PPR request leaks a PCI device reference.
This is the same ownership rule that was fixed for the old iommu_v2 ppr_notifier() path by commit 6cf0981c2233 ("iommu/amd: Fix pci device refcount leak in ppr_notifier()"), but iommu_call_iopf_notifier() was added later as a separate PPR/IOPF notifier path.
Drop the PCI device reference after handling the PPR entry.
From the CVE record · Linux
The Linux kernel’s AMD IOMMU PPR/IOPF notifier path fails to release a PCI device reference after handling a PPR request. Each handled request leaks a reference; the input does not specify how an attacker could trigger requests or whether authentication or user interaction is required.
Engineers running Linux kernels with the AMD IOMMU PPR/IOPF notifier path should check their versions against the vendor advisory; affected versions are not specified.