iommu: Fix NULL group->domain dereference in pci_dev_reset_iommu_done()
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: Fix NULL group->domain dereference in pci_dev_reset_iommu_done()
Local sashiko review pointed it out that group->domain could be NULL when a default domain fails to allocate during the first probe, which can crash at domain->ops->attach_dev dereference in __iommu_attach_device() invoked by pci_dev_reset_iommu_done().
pci_dev_reset_iommu_prepare() is fine as an old_domain pointer can be NULL.
Skip the re-attach in pci_dev_reset_iommu_done() to fix the bug.
From the CVE record · Linux
The Linux kernel can dereference a NULL IOMMU domain during PCI device reset if default domain allocation fails during the first probe. This can crash the kernel; the input does not establish whether an attacker can trigger it or specify authentication or user-interaction requirements.
Engineers running Linux kernels should check whether their kernel includes the IOMMU fix; affected versions were not provided.