CVE-2022-49002 iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init()

Medium 5.5 Published Updated

A missing reference count decrement in the Linux kernel IOMMU driver can lead to resource leaks, potentially causing 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-49002?

CVE-2022-49002 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:

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.

Which versions are affected by CVE-2022-49002?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-49002?

Apply the vendor's patch.

Is CVE-2022-49002 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-49002, GHSA-wp5m-wvhw-w3c5, UBUNTU-CVE-2022-49002.

Is CVE-2022-49002 in your software?

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

Check your SBOMs for free