CVE-2026-99982: drm/amdkfd: wait for a GPU reset before freeing a BO
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: executequeuescpsch() 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 freeswapcache() on a small bogus page pointer in its mmugather batch page:
BUG: unable to handle page fault for address: 0000000000002900 RIP: 0010:freeswapcache+0x5/0xb0 Call Trace: freepagesandswapcache+0x3a/0x60 tlbbatchpagesflush+0x43/0x80 tlbflushmmu+0x3d/0x110 zappterange+0x80d/0xcd0 ... dovmialignmunmap+0x3e8/0x5b0 dovmimunmap+0xdf/0x190 vmmunmap+0xad/0x180 x64sysmunmap+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)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 06ff8ce77726b15a98fcc285dd6005cb3f48558b
Event History
Frequently Asked Questions
Which systems are exposed to this condition?
The affected path involves Linux KFD GPU queues, buffer objects, and GPU reset handling. The reported crash was observed on MI300X; the provided information does not identify other hardware as affected or unaffected.
What sequence is required to trigger the failure?
A GPU reset must be in progress while a process unmaps and frees a buffer object. During that window, KFD eviction cannot unmap user queues and the TLB flush is skipped, allowing a still-running queue to access stale translations to freed pages.
How might an already-affected system appear?
A system may crash during munmap() with a page fault in free_swap_cache(), with a call trace including free_pages_and_swap_cache, tlb_batch_pages_flush, tlb_flush_mmu, and zap_pte_range. The reported case involved a small bogus page pointer corresponding to an SDMA queue read-pointer page that had been freed and reused.