Skip to contentSkip to conversation

CVE-2022-50718: drm/amdgpu: fix pci device refcount leak

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 24, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

drm/amdgpu: fix pci device refcount leak

As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, when finish using it, the caller must decrement the reference count by calling pci_dev_put().

So before returning from amdgpu_device_resume|suspend_display_audio(), pci_dev_put() is called to avoid refcount leak.

The Linux kernel CVE team has assigned CVE-2022-50718 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.8 with commit 3f12acc8d6d4b2e62fab8f652d7075a859d80b42 and fixed in 5.10.163 with commit 3725a8f26bdbc38dfdf545836117f1e069277c91
	Issue introduced in 5.8 with commit 3f12acc8d6d4b2e62fab8f652d7075a859d80b42 and fixed in 5.15.86 with commit 02105f0b3021ee5853b2fa50853c42f35fc01cfd
	Issue introduced in 5.8 with commit 3f12acc8d6d4b2e62fab8f652d7075a859d80b42 and fixed in 6.0.16 with commit f13661b72a61708cecb06562f8acff068a4f31f7
	Issue introduced in 5.8 with commit 3f12acc8d6d4b2e62fab8f652d7075a859d80b42 and fixed in 6.1.2 with commit d7352b410471cbebf6350b2990bae82bb0d59a76
	Issue introduced in 5.8 with commit 3f12acc8d6d4b2e62fab8f652d7075a859d80b42 and fixed in 6.2 with commit b85e285e3d6352b02947fc1b72303673dfacb0aa

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2022-50718

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/3725a8f26bdbc38dfdf545836117f1e069277c91
	https://git.kernel.org/stable/c/02105f0b3021ee5853b2fa50853c42f35fc01cfd
	https://git.kernel.org/stable/c/f13661b72a61708cecb06562f8acff068a4f31f7
	https://git.kernel.org/stable/c/d7352b410471cbebf6350b2990bae82bb0d59a76
	https://git.kernel.org/stable/c/b85e285e3d6352b02947fc1b72303673dfacb0aa