CVE-2026-74381: gpu: host1x: Allow entries in BO caches to be freed

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

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

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

gpu: host1x: Allow entries in BO caches to be freed

When a buffer object is pinned via host1x_bo_pin() with a cache, the
resulting mapping is kept in the cache so it can be reused on subsequent
pins. Each mapping held a reference to the underlying host1x_bo (taken
in tegra_bo_pin / gather_bo_pin), so as long as a mapping was cached,
the bo itself could not be freed.

However, the only way to remove the cached mapping was through the free
path of the buffer object. This meant that if a bo got cached, it could
never get freed again.

Resolve the circularity by holding a weak reference to the bo from the
cache side. This is done by having the .pin callbacks not bump the bo's
refcount -- instead the common Host1x bo code does so, except for the
cache reference.

Also move the remove-cache-mapping-on-free code into a common function
inside Host1x code. This is only called from the TegraDRM GEM buffers
since those are the only ones that can be cached at the moment.

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


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

	Issue introduced in 5.17 with commit 1f39b1dfa53c84b56d7ad37fed44afda7004959d and fixed in 6.1.178 with commit af755456299d44e4ed6af3b7c70a7f03ea37fdf1
	Issue introduced in 5.17 with commit 1f39b1dfa53c84b56d7ad37fed44afda7004959d and fixed in 6.6.145 with commit 71c017b3f83ff72638f2a1b1d6d4e7bc61d30231
	Issue introduced in 5.17 with commit 1f39b1dfa53c84b56d7ad37fed44afda7004959d and fixed in 6.12.97 with commit 0e9dd7cfb9986b78cc81eca126ccfbf57f4c0602
	Issue introduced in 5.17 with commit 1f39b1dfa53c84b56d7ad37fed44afda7004959d and fixed in 6.18.40 with commit 8c0d3cf0d5108c96317e0eca92b60dd368867cef
	Issue introduced in 5.17 with commit 1f39b1dfa53c84b56d7ad37fed44afda7004959d and fixed in 7.1.5 with commit df63c76f9c8d881ca7bce1aecfba512328d0527d
	Issue introduced in 5.17 with commit 1f39b1dfa53c84b56d7ad37fed44afda7004959d and fixed in 7.2-rc1 with commit 3cbf5e3c46e66d9b3b6b91099bb720c6cb1be3bc

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-74381
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/tegra/gem.c
	drivers/gpu/drm/tegra/submit.c
	drivers/gpu/host1x/bus.c
	include/linux/host1x.h


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/af755456299d44e4ed6af3b7c70a7f03ea37fdf1
	https://git.kernel.org/stable/c/71c017b3f83ff72638f2a1b1d6d4e7bc61d30231
	https://git.kernel.org/stable/c/0e9dd7cfb9986b78cc81eca126ccfbf57f4c0602
	https://git.kernel.org/stable/c/8c0d3cf0d5108c96317e0eca92b60dd368867cef
	https://git.kernel.org/stable/c/df63c76f9c8d881ca7bce1aecfba512328d0527d
	https://git.kernel.org/stable/c/3cbf5e3c46e66d9b3b6b91099bb720c6cb1be3bc
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.