CVE-2026-68234: drm/amdgpu: fix bo->pin leaking in amdgpu_bo_create_reserved

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081017-CVE-2026-68234-c71a@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

drm/amdgpu: fix bo->pin leaking in amdgpu_bo_create_reserved

amdgpu_bo_create_reserved() only allocates a new BO when
*bo_ptr (struct amdgpu_bo **bo_ptr as input parameter) is
NULL, it simply skips creation when *bo_ptr is non-NULL.
But it unconditionally reserves, pins, gart allocates
and maps the BO afterwards.

When the same non-NULL BO pointer is passed in again,
for example firmware buffers that live in adev and are
re-loaded on every resume / cp_resume / start
under AMDGPU_FW_LOAD_DIRECT, amdgpu_bo_pin() just increases
pin_count unconditionally, however the matching teardown only unpins
once, so pin_count never drops to zero, so TTM is not able
to move, swap or evict a BO, causing BO leaks.

This commit fixes this issue by only pinning the bo
once at creation, and repeated calls no longer
take additional pin references.

(cherry picked from commit 3ddc0ae76202c447b6aec61e907b852bc94671cf)

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


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

	Fixed in 6.6.148 with commit 51eeef1949c11d3dcb5f422a5d9b3f09ebe8a1bc
	Fixed in 6.12.101 with commit 2f390b4c83011452753fd84972f657d2b00a952b
	Fixed in 6.18.42 with commit ba7b6444097a73ccd3d3ac9e2be4ebb73d226460
	Fixed in 7.1.6 with commit 9743f60013273987abf415dc47474683d22aaee9
	Fixed in 7.2-rc4 with commit a2f895f3c852063258d62e9f74b081de07ca95df

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-68234
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_object.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/51eeef1949c11d3dcb5f422a5d9b3f09ebe8a1bc
	https://git.kernel.org/stable/c/2f390b4c83011452753fd84972f657d2b00a952b
	https://git.kernel.org/stable/c/ba7b6444097a73ccd3d3ac9e2be4ebb73d226460
	https://git.kernel.org/stable/c/9743f60013273987abf415dc47474683d22aaee9
	https://git.kernel.org/stable/c/a2f895f3c852063258d62e9f74b081de07ca95df
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.