Skip to contentSkip to conversation

CVE-2025-39679: drm/nouveau/nvif: Fix potential memory leak in nvif_vmm_ctor().

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 5, 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/nouveau/nvif: Fix potential memory leak in nvif_vmm_ctor().

When the nvif_vmm_type is invalid, we will return error directly without freeing the args in nvif_vmm_ctor(), which leading a memory leak. Fix it by setting the ret -EINVAL and goto done.

The Linux kernel CVE team has assigned CVE-2025-39679 to this issue.

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

	Issue introduced in 6.6 with commit 6b252cf42281045a9f803d2198023500cfa6ebd2 and fixed in 6.6.103 with commit 72553fe19317fe93cb8591c83095c446bc7fe292
	Issue introduced in 6.6 with commit 6b252cf42281045a9f803d2198023500cfa6ebd2 and fixed in 6.12.44 with commit cabcb52d76d3d42f16c344a96e098dd9d18602f8
	Issue introduced in 6.6 with commit 6b252cf42281045a9f803d2198023500cfa6ebd2 and fixed in 6.16.4 with commit 7d9110e3b35d08832661da1a1fc2d24455981a04
	Issue introduced in 6.6 with commit 6b252cf42281045a9f803d2198023500cfa6ebd2 and fixed in 6.17-rc3 with commit bb8aeaa3191b617c6faf8ae937252e059673b7ea

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-2025-39679

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/nvif/vmm.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/72553fe19317fe93cb8591c83095c446bc7fe292
	https://git.kernel.org/stable/c/cabcb52d76d3d42f16c344a96e098dd9d18602f8
	https://git.kernel.org/stable/c/7d9110e3b35d08832661da1a1fc2d24455981a04
	https://git.kernel.org/stable/c/bb8aeaa3191b617c6faf8ae937252e059673b7ea