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 5BEA92741C3 for ; Fri, 5 Sep 2025 17:23:27 +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=1757093007; cv=none; b=obH6XnvpC72Wd6Tg2wL9JwMi7q+1d/8Nbwhdd9DLUw8WVjIht7vai4QdWZLzVE+wWshE1SFVzY0E0fS75E3GDJpxbv+IRfq+x2bFMc9IQFl+7gFP9EPvlmAYp91DrvIYcRWShca4YwJRI14qx/cQI53llRtMh0RqxNWFiSEt1OY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757093007; c=relaxed/simple; bh=uimXybUM0IfeHk7XqhqrOvIzAAiqQn6wyI9EU/ic72s=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=k2RiiA8ELvaHCM4Q0gljhoMGQVQiL6R0bMDQKEbcTnpYuMf+6riOdSF9XfW+y4kLybUpMjO6YNRASN4OreQiwrgsoikHPizXIPnO1Z0Be/Qypcst/Zx4L4yf+JsPJJ7Me905d99WtZWgE6459jHBpkuN97FAzaAjhlQ0OSZMCl0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oIboqxD5; 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="oIboqxD5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72020C4CEF1; Fri, 5 Sep 2025 17:23:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757093007; bh=uimXybUM0IfeHk7XqhqrOvIzAAiqQn6wyI9EU/ic72s=; h=From:To:Cc:Subject:Date:Reply-to:From; b=oIboqxD5fxDiZCL2IRLEkoP7J7muoKdSZ8VLIyu3P4JxW+7le21Km4zwutpQ2K/BU KUxhOjvLmtuSZobLqroNgma9IPt8yzOQsC48D0d97wVGq95GUGUmmVUv1+GbzJQ1I4 XkvHz2xBY0CRP/EZIMgrudTCs6NdfQmWQ4oweEAA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39706: drm/amdkfd: Destroy KFD debugfs after destroy KFD wq Date: Fri, 5 Sep 2025 19:21:19 +0200 Message-ID: <2025090549-CVE-2025-39706-087c@gregkh> X-Mailer: git-send-email 2.51.0 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=2678; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=waa5UPO8O45er7yGdziPQ/+8QRiDoIFy/nW2mPMY0v4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBm7pT9GXdVy/iMT3pu7qlCsUmPO2dVzXyR+uKa7+5rI1 pfOsxcXdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE3pkyLDj3UVn2Nf+tJ+7m f4XP7emMuBH/IIhhfknrgU/737T4xLb7X5hlIpxyPVvyPQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: Destroy KFD debugfs after destroy KFD wq Since KFD proc content was moved to kernel debugfs, we can't destroy KFD debugfs before kfd_process_destroy_wq. Move kfd_process_destroy_wq prior to kfd_debugfs_fini to fix a kernel NULL pointer problem. It happens when /sys/kernel/debug/kfd was already destroyed in kfd_debugfs_fini but kfd_process_destroy_wq calls kfd_debugfs_remove_process. This line debugfs_remove_recursive(entry->proc_dentry); tries to remove /sys/kernel/debug/kfd/proc/ while /sys/kernel/debug/kfd is already gone. It hangs the kernel by kernel NULL pointer. (cherry picked from commit 0333052d90683d88531558dcfdbf2525cc37c233) The Linux kernel CVE team has assigned CVE-2025-39706 to this issue. Affected and fixed versions =========================== Fixed in 6.1.149 with commit fc35c955da799ba62f6f977d58e0866d0251e3f8 Fixed in 6.6.103 with commit 74ee7445c3b61c3bd899a54bd82c1982cb3a8206 Fixed in 6.12.44 with commit 96609a51e6134542bf90e053c2cd2fe4f61ebce3 Fixed in 6.16.4 with commit 910735ded17cc306625e7e1cdcc8102f7ac60994 Fixed in 6.17-rc1 with commit 2e58401a24e7b2d4ec619104e1a76590c1284a4c 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-39706 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_module.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/fc35c955da799ba62f6f977d58e0866d0251e3f8 https://git.kernel.org/stable/c/74ee7445c3b61c3bd899a54bd82c1982cb3a8206 https://git.kernel.org/stable/c/96609a51e6134542bf90e053c2cd2fe4f61ebce3 https://git.kernel.org/stable/c/910735ded17cc306625e7e1cdcc8102f7ac60994 https://git.kernel.org/stable/c/2e58401a24e7b2d4ec619104e1a76590c1284a4c