CVE-2022-48973 gpio: amd8111: Fix PCI device reference count leak

Medium 5.5 Published Updated

A missing PCI device reference count decrement in the AMD8111 GPIO driver can lead to resource leaks and potential denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-48973?

CVE-2022-48973 is a medium-severity vulnerability in Linux kernel, published on 21 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

gpio: amd8111: Fix PCI device reference count leak

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() after the 'out' label. Since pci_dev_put() can handle NULL input parameter, there is no problem for the 'Device not found' branch. For the normal path, add pci_dev_put() in amd_gpio_exit().

Which versions are affected by CVE-2022-48973?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-48973?

Apply the vendor's patch.

Is CVE-2022-48973 being exploited?

There is no known exploitation of CVE-2022-48973 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-48973, GHSA-xv88-66vv-vx9g, UBUNTU-CVE-2022-48973.

Is CVE-2022-48973 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free