{"id":"CVE-2025-21842","summary":"amdkfd: properly free gang_ctx_bo when failed to init user queue","details":"In the Linux kernel, the following vulnerability has been resolved:\n\namdkfd: properly free gang_ctx_bo when failed to init user queue\n\nThe destructor of a gtt bo is declared as\nvoid amdgpu_amdkfd_free_gtt_mem(struct amdgpu_device *adev, void **mem_obj);\nWhich takes void** as the second parameter.\n\nGCC allows passing void* to the function because void* can be implicitly\ncasted to any other types, so it can pass compiling.\n\nHowever, passing this void* parameter into the function's\nexecution process(which expects void** and dereferencing void**)\nwill result in errors.","modified":"2026-04-02T12:45:15.061457Z","published":"2025-03-07T09:10:00.298Z","related":["SUSE-SU-2025:02254-1","SUSE-SU-2025:02307-1","SUSE-SU-2025:02333-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21842.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/091a68c58c1bbd2ab7d05d1b32c1306394ec691d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a33f7f9660705fb2ecf3467b2c48965564f392ce"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ae5ab1c1ae504f622cc1ff48830a9ed48428146d"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21842.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21842"},{"type":"PACKAGE","url":"https://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/cve-osv-conversion/osv-output/CVE-2025-21842.json"}}],"schema_version":"1.7.5"}