CVE-2025-21842

Source
https://cve.org/CVERecord?id=CVE-2025-21842
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21842.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-21842
Downstream
Related
Published
2025-03-07T09:10:00.298Z
Modified
2026-03-11T07:53:36.290433Z
Summary
amdkfd: properly free gang_ctx_bo when failed to init user queue
Details

In the Linux kernel, the following vulnerability has been resolved:

amdkfd: properly free gangctxbo when failed to init user queue

The destructor of a gtt bo is declared as void amdgpuamdkfdfreegttmem(struct amdgpudevice *adev, void **memobj); 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21842.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
fb91065851cd5f2735348c5f3eddeeca3d7c2973
Fixed
ae5ab1c1ae504f622cc1ff48830a9ed48428146d
Fixed
091a68c58c1bbd2ab7d05d1b32c1306394ec691d
Fixed
a33f7f9660705fb2ecf3467b2c48965564f392ce

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21842.json"