All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-99982: drm/amdkfd: wait for a GPU reset before freeing a BO
@ 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: wait for a GPU reset before freeing a BO

When a GPU reset takes the reset domain, KFD eviction cannot unmap
user queues: execute_queues_cpsch() fails its trylock with -EIO, so
the queues keep running until the ASIC is reset. The TLB flush is also
skipped while the reset is in progress. If the process unmaps and frees
a BO in that window, its pages are released while a queue can still
access them through stale translations.

On MI300X, munmap() then crashes in free_swap_cache() on a small bogus
page pointer in its mmu_gather batch page:

  BUG: unable to handle page fault for address: 0000000000002900
  RIP: 0010:free_swap_cache+0x5/0xb0
  Call Trace:
   free_pages_and_swap_cache+0x3a/0x60
   tlb_batch_pages_flush+0x43/0x80
   tlb_flush_mmu+0x3d/0x110
   zap_pte_range+0x80d/0xcd0
   ...
   do_vmi_align_munmap+0x3e8/0x5b0
   do_vmi_munmap+0xdf/0x190
   __vm_munmap+0xad/0x180
   __x64_sys_munmap+0x1b/0x30

In a traced crash the bogus pointer was the read pointer value of an SDMA
queue the process had just destroyed, at the read pointer's page offset:
the queue's writeback landed in its freed rptr page after the page was
reused as the batch page.

commit f0b4440cdc18 ("drm/amdkfd: Fix mode1 reset crash issue") fixed
this race on process exit by waiting for the reset to complete before
freeing the process's BOs. Free through the ioctl has the same race.
Wait for the reset there too, using the same helper.

(cherry picked from commit 06ff8ce77726b15a98fcc285dd6005cb3f48558b)

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


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

	Issue introduced in 6.11 with commit 9c33e5fd4fb63b793d9a92bf35d190630d9bada4 and fixed in 6.12.117 with commit f917af6f91c12f5e3943e110cb9a2b5ca42909d1
	Issue introduced in 6.11 with commit 9c33e5fd4fb63b793d9a92bf35d190630d9bada4 and fixed in 6.18.63 with commit 2cbdce3fdf929ec5c13007611a37672720bcfb8e
	Issue introduced in 6.11 with commit 9c33e5fd4fb63b793d9a92bf35d190630d9bada4 and fixed in 7.3.4 with commit 96da420b053ba050e4e43c3e54d469043c35f73d
	Issue introduced in 6.11 with commit 9c33e5fd4fb63b793d9a92bf35d190630d9bada4 and fixed in 7.4-rc1 with commit 47d799a718439764432d8ef3a0952af45f025f76

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-99982
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_chardev.c
	drivers/gpu/drm/amd/amdkfd/kfd_priv.h
	drivers/gpu/drm/amd/amdkfd/kfd_process.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/f917af6f91c12f5e3943e110cb9a2b5ca42909d1
	https://git.kernel.org/stable/c/2cbdce3fdf929ec5c13007611a37672720bcfb8e
	https://git.kernel.org/stable/c/96da420b053ba050e4e43c3e54d469043c35f73d
	https://git.kernel.org/stable/c/47d799a718439764432d8ef3a0952af45f025f76

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

only message in thread, other threads:[~2026-11-30 13:34 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-99982: drm/amdkfd: wait for a GPU reset before freeing a BO 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.