CVE-2025-21842: amdkfd: properly free gang_ctx_bo when failed to init user queue
In the Linux kernel, the following vulnerability has been resolved:
amdkfd: properly free gang_ctx_bo when failed to init user queue
The destructor of a gtt bo is declared as
void amdgpu_amdkfd_free_gtt_mem(struct amdgpu_device *adev, void **mem_obj);
Which takes void** as the second parameter.
GCC allows passing void* to the function because void* can be implicitly
casted to any other types, so it can pass compiling.
However, passing this void* parameter into the function's
execution process(which expects void** and dereferencing void**)
will result in errors.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel AMD GPU driver cleanup bug. When creating a user queue fails, the driver can pass the wrong pointer type while freeing GPU memory, causing errors. The published sources do not state a business impact such as data theft, privilege escalation, or denial of service.
Executive priority
Treat this as a patch-tracking item rather than an emergency based on current evidence. Prioritize kernel maintenance for AMD GPU compute servers and shared Linux systems, but do not claim active exploitation or confirmed severe impact from the supplied sources.
Technical view
The flaw is in amdkfd error handling for failed user queue initialization. amdgpu_amdkfd_free_gtt_mem expects a void ** memory object, but the vulnerable path passes a void *, which compiles under GCC but can fail when the function dereferences it.
Likely exposure
Exposure appears limited to systems running affected Linux kernel versions with the AMDGPU/AMDKFD driver path present, especially hosts using AMD GPU compute. The source bundle lists Linux kernel 6.12, 6.12.16, 6.13.4, and 6.14 as affected, but distribution backport status is not provided.
Exploitation context
No active exploitation is cited, and CISA KEV status is false in the supplied bundle. The issue is described as an error-handling bug during failed user queue initialization, but the sources do not explain attacker prerequisites or reliable security consequences.
Researcher notes
The CVE description supports a pointer type mismatch in an amdkfd cleanup path, not a complete exploit narrative. Security impact, CWE, CVSS, attacker requirements, and practical exploitability are absent from the provided record, so validation should focus on code lineage and fixed kernel provenance.
Mitigation direction
Apply a kernel update containing the referenced stable fixes when available from your vendor.
Check your Linux distribution advisory for backported fixes before relying on upstream version numbers.
Prioritize AMD GPU compute hosts and shared systems that allow local users to access GPU queues.
Until patched, reduce unnecessary untrusted local access to affected GPU compute systems.
Validation and detection
Inventory Linux systems running affected kernel versions or vendor kernels derived from those versions.
Confirm whether the kernel package includes one of the referenced stable commits or a vendor backport.
Identify hosts using AMDGPU or AMDKFD functionality, especially GPU compute workloads.
Review vendor advisories for exact fixed package versions and reboot requirements.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-21842 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
0ADP providers
4Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Mar 7, 2025, 09:10 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.