iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2e45528930388658603ea24d49cf52867b928d3e · < bdb613ef179ad4bb9d56a2533e9b30e434f1dfb7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init()
for_each_pci_dev() is implemented by pci_get_device(). The comment of pci_get_device() says that it will increase the reference count for the returned pci_dev and also decrease the reference count for the input pci_dev @from if it is not NULL.
If we break for_each_pci_dev() loop with pdev not NULL, we need to call pci_dev_put() to decrease the reference count. Add the missing pci_dev_put() for the error path to avoid reference count leak.
From the CVE record · Linux
The Linux kernel's dmar_dev_scope_init() can leak a PCI device reference count on an error path. The input does not describe an attacker action, exploitation conditions, or whether authentication or user interaction is required.
Engineers running the Linux kernel should check whether their kernel includes the iommu/vt-d fix; affected versions are not specified.