[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025030708-CVE-2025-21842-2ddd@gregkh>
Date: Fri, 7 Mar 2025 10:10:12 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: CVE-2025-21842: amdkfd: properly free gang_ctx_bo when failed to init user queue
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.
The Linux kernel CVE team has assigned CVE-2025-21842 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.12 with commit fb91065851cd5f2735348c5f3eddeeca3d7c2973 and fixed in 6.12.16 with commit ae5ab1c1ae504f622cc1ff48830a9ed48428146d
Issue introduced in 6.12 with commit fb91065851cd5f2735348c5f3eddeeca3d7c2973 and fixed in 6.13.4 with commit 091a68c58c1bbd2ab7d05d1b32c1306394ec691d
Issue introduced in 6.12 with commit fb91065851cd5f2735348c5f3eddeeca3d7c2973 and fixed in 6.14-rc3 with commit a33f7f9660705fb2ecf3467b2c48965564f392ce
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-21842
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/ae5ab1c1ae504f622cc1ff48830a9ed48428146d
https://git.kernel.org/stable/c/091a68c58c1bbd2ab7d05d1b32c1306394ec691d
https://git.kernel.org/stable/c/a33f7f9660705fb2ecf3467b2c48965564f392ce
Powered by blists - more mailing lists