Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5136A1F4164 for ; Fri, 7 Mar 2025 09:10:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741338637; cv=none; b=GoxbDNLrYMYF/7up+2FNwSefUdETq8VERuRYszCeul82dKjAUPB/KKPrPyNns/YNbLQ4dpHABFBsgIAmHG2KJHhEJiph0h1j5qkGarqdsItcHL1xqBBX73aGAr5bJAmmJan87If6D7VspUnr4y7kfK8cQPNi58UDXSr4B6N04hQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741338637; c=relaxed/simple; bh=dPCjFjnNrmMJ+oto4UnsiiXUeV24XJUn/HFpNR+/Hqc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=f/cIo1ag+CyRB+uzKcWhiM5xqz9b3XLoyVxod1sgqGxxIUMWnV0XvrefCGLKfE9RTpHj/gY1qKUKbFFotwVztmrgT6y+CBjKT3IlXSeTGq3OeQpO6N3xnflrAZiZKe9OZVNfTKwWHi3Om6HBtIDLnNtanmMrCAYf5BJ7nFnuPYc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JHHf/O+b; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JHHf/O+b" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50BD4C4CED1; Fri, 7 Mar 2025 09:10:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741338636; bh=dPCjFjnNrmMJ+oto4UnsiiXUeV24XJUn/HFpNR+/Hqc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JHHf/O+b7Ibx0VjYsYlZQWua4LQav46+HUDLVguWJzJKtRGfUh/3jEmAe5Y541LKK fGMNaInVqvq2Qmr5UOjfJysUNfJqvCtwTyIX3CMoZ3/njb5Hh3YEqsbMHhpxVtFX0t 4ZtjZNv0XKct49jKjf4+TT0WKCNYplr26gkWVdCs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21842: amdkfd: properly free gang_ctx_bo when failed to init user queue Date: Fri, 7 Mar 2025 10:10:12 +0100 Message-ID: <2025030708-CVE-2025-21842-2ddd@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2480; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dPCjFjnNrmMJ+oto4UnsiiXUeV24XJUn/HFpNR+/Hqc=; b=owGbwMvMwCRo6H6F97bub03G02pJDOmntn8Q/THBuOTwRMn930sPas1t/bORvXHOnJseC9cmT H/36PIZjo5YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYyP25DHNFt5yXfzAj5c7d /Xw1P7nbZzmzz//GsOCUxJI7ShdM1wjfs1nWU1KSsCb8xF4A X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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