amdkfd: properly free gang_ctx_bo when failed to init user queue
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.12.166.13.46.14In 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.
From the CVE record · Linux
The Linux kernel's amdkfd code passes a void* to a cleanup function that expects a void**, causing errors when user-queue initialization fails. The input does not establish whether an attacker can trigger this failure or specify any access or user-interaction requirements.
Engineers running the Linux kernel should check whether their version includes the amdkfd fix; affected versions are not specified.