All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-99985: drm/amdkfd: don't drop an SVM CWSR reference that was never taken
@ 2026-11-30 13:20 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-11-30 13:20 UTC (permalink / raw)
  To: linux-cve-announce; +Cc: Greg Kroah-Hartman

From: Greg Kroah-Hartman <gregkh@kernel.org>

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

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

drm/amdkfd: don't drop an SVM CWSR reference that was never taken

When kfd_queue_acquire_buffers() fails, its error path calls
kfd_queue_release_buffers(), which also drops a queue_refcount on the
SVM range at ctx_save_restore_area_address. The SVM range is the last
buffer acquired, and kfd_queue_buffer_svm_get() takes no reference when
it fails, so on every error path this reference was never taken. If
another queue of the process uses that CWSR range, its reference is
dropped instead, and unmapping the range no longer evicts that queue
while its CWSR area is unmapped from the GPU.

On navi31, with queue A using an SVM CWSR range: munmap() of the range
logs

  Freeing queue vital buffer 0x..., queue evicted

but after a CREATE_QUEUE that reuses A's CWSR address with an unmapped
write pointer (-EINVAL), the same munmap() leaves A running without the
message.

Only put the BOs on the acquire error path. The warning and the eviction
are back after the failed CREATE_QUEUE.

(cherry picked from commit 9a08122e6361ef73f4b512d5db9596d561305519)

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


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

	Issue introduced in 6.12 with commit b049504e211e8f4dbcd40434f2dcab2215ea1039 and fixed in 6.12.117 with commit 25ee77d64ae14e1f4c3035fd867364537a0f3690
	Issue introduced in 6.12 with commit b049504e211e8f4dbcd40434f2dcab2215ea1039 and fixed in 6.18.63 with commit 1436e441ad19a475ce3fdaacee7efe670405cae9
	Issue introduced in 6.12 with commit b049504e211e8f4dbcd40434f2dcab2215ea1039 and fixed in 7.3.4 with commit 861337bf1a6a0fb64daffdfbc5bb165c1d6ce3aa
	Issue introduced in 6.12 with commit b049504e211e8f4dbcd40434f2dcab2215ea1039 and fixed in 7.4-rc1 with commit 030d47cc6720e0f07b502876cdbd266e309f9461

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-99985
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/amdkfd/kfd_queue.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/25ee77d64ae14e1f4c3035fd867364537a0f3690
	https://git.kernel.org/stable/c/1436e441ad19a475ce3fdaacee7efe670405cae9
	https://git.kernel.org/stable/c/861337bf1a6a0fb64daffdfbc5bb165c1d6ce3aa
	https://git.kernel.org/stable/c/030d47cc6720e0f07b502876cdbd266e309f9461

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-30 13:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 13:20 CVE-2026-99985: drm/amdkfd: don't drop an SVM CWSR reference that was never taken Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.