7.8high
amdkfd: properly free gang_ctx_bo when failed to init user queue
- Severity
- 7.8high CVSS:3.1 by Linux
- Exploit likelihood
- 0.24% (higher than 15% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from fb91065851cd5f2735348c5f3eddeeca3d7c2973 before ae5ab1c1ae504f622cc1ff48830a9ed48428146d, from fb91065851cd5f2735348c5f3eddeeca3d7c2973 before 091a68c58c1bbd2ab7d05d1b32c1306394ec691d, from fb91065851cd5f2735348c5f3eddeeca3d7c2973 before a33f7f9660705fb2ecf3467b2c48965564f392ce, 6.12 Not affected: before 6.12, from 6.12.16 up to 6.12.*, from 6.13.4 up to 6.13.*, from 6.14 up to * | CVE List |
| linux linux_kernel | from 6.12 before 6.12.16, from 6.13 before 6.13.4, 6.14 | NVD |
All scores
| Linux | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: amdkfd: libera correctamente gang_ctx_bo cuando no se puede inicializar la cola de usuarios El destructor de un bo gtt se declara como void amdgpu_amdkfd_free_gtt_mem(struct amdgpu_device *adev, void **mem_obj); que toma void** como segundo parámetro. GCC permite pasar void* a la función porque void* se puede convertir implícitamente a cualquier otro tipo, por lo que puede pasar la compilación. Sin embargo, pasar este parámetro void* al proceso de ejecución de la función (que espera void** y desreferenciar void**) dará como resultado errores.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-21842 changed 2026-08-05 | CVE Terms of Use |
| NVD | CVE-2025-21842 changed 2026-07-30 | Public domain |