Skip to contentSkip to conversation

CVE-2026-52904: drm/nouveau: fix nvkm_device leak on aperture removal failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jun 9

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/nouveau: fix nvkm_device leak on aperture removal failure

When aperture_remove_conflicting_pci_devices() fails during probe, the error path returns directly without unwinding the nvkm_device that was just allocated by nvkm_device_pci_new(). This leaks both the device wrapper and the pci_enable_device() reference taken inside it.

Jump to the existing fail_nvkm label so nvkm_device_del() runs and balances both. The leak was introduced when the intermediate nvkm_device_del() between detection and aperture removal was dropped in favor of creating the pci device once.

The Linux kernel CVE team has assigned CVE-2026-52904 to this issue.

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

	Issue introduced in 6.12 with commit c0bfe34330b5fafdbbc63a7124841711651b96b9 and fixed in 6.12.86 with commit 5edd564ccb002ffc830e7818c1c4a992db774678
	Issue introduced in 6.12 with commit c0bfe34330b5fafdbbc63a7124841711651b96b9 and fixed in 6.18.27 with commit 4404d7d2dda4f3cc84a8fb6ac5417a2afc3b22d6
	Issue introduced in 6.12 with commit c0bfe34330b5fafdbbc63a7124841711651b96b9 and fixed in 7.0.4 with commit 843c0247cf21364e33bb5a8ffc9af57107d04d05
	Issue introduced in 6.12 with commit c0bfe34330b5fafdbbc63a7124841711651b96b9 and fixed in 7.1-rc1 with commit 6597ff1d8de3f583be169587efeafd8af134e138

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-2026-52904

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/nouveau/nouveau_drm.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/5edd564ccb002ffc830e7818c1c4a992db774678
	https://git.kernel.org/stable/c/4404d7d2dda4f3cc84a8fb6ac5417a2afc3b22d6
	https://git.kernel.org/stable/c/843c0247cf21364e33bb5a8ffc9af57107d04d05
	https://git.kernel.org/stable/c/6597ff1d8de3f583be169587efeafd8af134e138