Bug 2577653 (CVE-2026-99621)

Summary: CVE-2026-99621 kernel: kernel: amdgpu: Denial of Service via improper lock cleanup in kfd_mem_attach()
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: akhatavk, aos-team-art-private, asdas, dpaolell, jdelft, jupierce, lgarciaa, mbiarnes, ppalepu, ppostler, prdhamdh, rhel-process-autobot, sghai, sidsharm, suppawar, vlaad, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in the Linux kernel's AMD GPU (amdgpu) driver. When mapping memory for GPU compute operations, failing to lock resources due to an interruption does not properly finalize the transaction or release acquired locks before returning. A local user can exploit this vulnerability during concurrent memory operations, leaving internal lock state referencing expired stack memory. This flaw can cause system processes to hang indefinitely or crash the kernel, resulting in a Denial of Service (DoS).
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-11-20 06:06:28 UTC
In the Linux kernel, the following vulnerability has been resolved:

drm/amdgpu: unlock the VM and BO when attaching a KFD BO fails

kfd_mem_attach() locks the page directory and the BO with a drm_exec
transaction on its stack, but leaves through the unwind label without
drm_exec_fini() when locking fails, e.g. when MAP_MEMORY_TO_GPU gets a
signal while the page directory or the BO is busy. Reservations already
acquired then remain locked with their ww_acquire_ctx pointing into the
expired stack frame.

With one thread doing GEM_VA map/unmap on the KFD VM and
another one mapping KFD BOs while getting SIGUSR1 every 20 us:

  BUG: KASAN: stack-out-of-bounds in __ww_mutex_lock.constprop.0+0x34f5/0x3da0
   ww_mutex_lock_interruptible+0x2f/0x150
   drm_exec_lock_obj+0x107/0x2d0 [drm_exec]
   kfd_mem_attach+0x4dd/0x1b60 [amdgpu]

and the process ends up in D state.

Finish the transaction before unwinding.

(cherry picked from commit 7b885fa27e4b9fa5cbdc64e66fc35872aee296f5)