drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d38ceaf99ed015f2a0b9af3499791bd3a3daae21 · < 8f2d2badf8ca5e7e7c30d88840b695c8af7286f3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios()
As comment of pci_get_class() says, it returns a pci_device with its refcount increased and decreased the refcount for the input parameter @from if it is not NULL.
If we break the loop in amdgpu_atrm_get_bios() with 'pdev' not NULL, we need to call pci_dev_put() to decrease the refcount. Add the missing pci_dev_put() to avoid refcount leak.
From the CVE record · Linux
The Linux kernel's amdgpu_atrm_get_bios() function can leak a PCI device reference when it exits a loop with a device still referenced. The input does not describe an attacker action or specify network access, authentication, or user-interaction conditions.
Engineers running the Linux kernel should check whether their kernel includes the affected amdgpu code; affected versions are not specified.