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 4DADA30148F for ; Tue, 19 Aug 2025 17:22:25 +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=1755624145; cv=none; b=RDyQREkkqFM1voZeOHwqNbLKv+1GW2RlLzLaBht+kUjfHSAt9iLbuZjNrD+foO3LSl+jpqeehEwklCAOX/mxs5UWqCboAi+tNZwcYRjig6rRfw/C6qhp1XHBoLhKxsAbAaw1jeaRfc0CCiBh/2h0XN9qzjDL6eOFfihSUz/yYNA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755624145; c=relaxed/simple; bh=/YTTNq7FR2d8hCbFWlWaWTmVYUxtTofVhtqeEiC2wNM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dJbc5sEZdX88KJNBsGsGvUisMWKiOQHjpEtTPG7XLkXg3zHx1xbnH3CSQieQm4gHPVCdB2cxRh0sFEi3ANKayOR/1DFiEz0kXFH+SfhyMDIY99okGvgq5bEUjWO0XSGykp6ISejPzZRKJKBD9YKvEuhP8SmOF2g71QThM76VRKc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RTfRVM2A; 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="RTfRVM2A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BC5FC113D0; Tue, 19 Aug 2025 17:22:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755624145; bh=/YTTNq7FR2d8hCbFWlWaWTmVYUxtTofVhtqeEiC2wNM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=RTfRVM2AoTkE1bvLzOVBcdBTMChCKKsG0Ym+mnxWGnsXC7kT8SuS8yZ+ZUQzD+Z8n bPM3rnw3to2lX7p3xUSnJ9p7EzTXo3mJALvDaAzsqcHh0wg+DkRrxInqmy9n6mgeze upOP+LVpkB4g6ryfwIcAy1/sCvT39dZosj7MEMQU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38610: powercap: dtpm_cpu: Fix NULL pointer dereference in get_pd_power_uw() Date: Tue, 19 Aug 2025 19:18:56 +0200 Message-ID: <2025081923-CVE-2025-38610-9b4f@gregkh> X-Mailer: git-send-email 2.50.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=3192; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=38GVNuuLfndIYu2/doKa4/krcr2vZ0NbRkYM6wVk6m4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlLNt5/7ni6oWoX61rvV8v01Dg9Jv7UNupZGLhsdlxqV stkoZrcjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIq10MCw58LYrZXzQx2vNU lvniF6wPd59kVmSYK9a4L1x88o602bHV/6XkovzWqFrMAwA= 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: powercap: dtpm_cpu: Fix NULL pointer dereference in get_pd_power_uw() The get_pd_power_uw() function can crash with a NULL pointer dereference when em_cpu_get() returns NULL. This occurs when a CPU becomes impossible during runtime, causing get_cpu_device() to return NULL, which propagates through em_cpu_get() and leads to a crash when em_span_cpus() dereferences the NULL pointer. Add a NULL check after em_cpu_get() and return 0 if unavailable, matching the existing fallback behavior in __dtpm_cpu_setup(). [ rjw: Drop an excess empty code line ] The Linux kernel CVE team has assigned CVE-2025-38610 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit eb82bace893169b319c563b7f813c58a0a5a9f76 and fixed in 6.1.148 with commit 27914f2b795e2b58e9506f281dcdd98fef09d3c2 Issue introduced in 5.16 with commit eb82bace893169b319c563b7f813c58a0a5a9f76 and fixed in 6.6.102 with commit c6ec27091cf5ac05094c1fe3a6ce914cf711a37c Issue introduced in 5.16 with commit eb82bace893169b319c563b7f813c58a0a5a9f76 and fixed in 6.12.42 with commit 8374ac7d69a57d737e701a851ffe980a0d27d3ad Issue introduced in 5.16 with commit eb82bace893169b319c563b7f813c58a0a5a9f76 and fixed in 6.15.10 with commit 27e0318f0ea69fcfa32228847debc384ade14578 Issue introduced in 5.16 with commit eb82bace893169b319c563b7f813c58a0a5a9f76 and fixed in 6.16.1 with commit 2fd001a0075ac01dc64a28a8e21226b3d989a91d Issue introduced in 5.16 with commit eb82bace893169b319c563b7f813c58a0a5a9f76 and fixed in 6.17-rc1 with commit 46dc57406887dd02565cb264224194a6776d882b 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-38610 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/powercap/dtpm_cpu.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/27914f2b795e2b58e9506f281dcdd98fef09d3c2 https://git.kernel.org/stable/c/c6ec27091cf5ac05094c1fe3a6ce914cf711a37c https://git.kernel.org/stable/c/8374ac7d69a57d737e701a851ffe980a0d27d3ad https://git.kernel.org/stable/c/27e0318f0ea69fcfa32228847debc384ade14578 https://git.kernel.org/stable/c/2fd001a0075ac01dc64a28a8e21226b3d989a91d https://git.kernel.org/stable/c/46dc57406887dd02565cb264224194a6776d882b