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 07E8C43AD9 for ; Wed, 1 May 2024 05:23:49 +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=1714541029; cv=none; b=ZGts6uS9DzYgL+QYH08jXGvXMYflLOdiKHbMh/wl6fH5P7NK3hG+mj8goN79UvU5NPYPp1eZPkx3wS9URV8WTItqsY2uFQaenIKzqSJlaLJ1LEUso3ydX76Mg8DjbVhPN3XikyHCcc1hpu2L/RsHT4kDzja+6OhcqUTbxfFYmvU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714541029; c=relaxed/simple; bh=ZpNMbL5Egbe0h9X0RKT2339X0wdxwIJhXfXHOZZBpT0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Y77qJ8E4tJugsZW8PNs2Zd6Gf4f0u7+Ma5aPi5QxHLr3VWY6fo7Q12Qjb+a03KtNaPAKBxnMm7eAwV0ppY04/vPRSpSKA9pJsyezv/OM0kKuASWRL9ewhuFu67fGFaHUSyOt3Lnm3pWKttlIcGvyx3Ng8If8TCmO67iCLyqZsxk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SXefF7Ye; 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="SXefF7Ye" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86165C113CC; Wed, 1 May 2024 05:23:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714541028; bh=ZpNMbL5Egbe0h9X0RKT2339X0wdxwIJhXfXHOZZBpT0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=SXefF7YeQxu72Fawm7YeTkVdmzMcd8eOKA8hP2uKPWyeVMLKL7gBPC7JBLM4eImH+ OBfgNOGvxWNvG+4pp7C3liBTIEhtF89DNuZgP12KIUP+aO2tPSqsl4rZ4XZtrk5Nrg AZKdOccs8WLyzsvQzu2oQSjeBPmnoGNycBqU4QhE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26975: powercap: intel_rapl: Fix a NULL pointer dereference Date: Wed, 1 May 2024 07:22:05 +0200 Message-ID: <2024050133-CVE-2024-26975-d184@gregkh> X-Mailer: git-send-email 2.44.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=2529; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ZpNMbL5Egbe0h9X0RKT2339X0wdxwIJhXfXHOZZBpT0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmGF2PfvmfvkGVorOxw4lLebCVl43aoZLHgg60ZUbq7l GfUzmbtiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlMFWKYw6vz+bjNwiUhz+22 zTbQtV91V+j1QoYFF3PuO/4wO/Ff8sYEtTnrX2woN002AwA= 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: powercap: intel_rapl: Fix a NULL pointer dereference A NULL pointer dereference is triggered when probing the MMIO RAPL driver on platforms with CPU ID not listed in intel_rapl_common CPU model list. This is because the intel_rapl_common module still probes on such platforms even if 'defaults_msr' is not set after commit 1488ac990ac8 ("powercap: intel_rapl: Allow probing without CPUID match"). Thus the MMIO RAPL rp->priv->defaults is NULL when registering to RAPL framework. Fix the problem by adding sanity check to ensure rp->priv->rapl_defaults is always valid. The Linux kernel CVE team has assigned CVE-2024-26975 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit 1488ac990ac8 and fixed in 6.6.24 with commit 0641908b906a Issue introduced in 6.5 with commit 1488ac990ac8 and fixed in 6.7.12 with commit 9b254feb2499 Issue introduced in 6.5 with commit 1488ac990ac8 and fixed in 6.8.3 with commit 2f73cf2ae5e0 Issue introduced in 6.5 with commit 1488ac990ac8 and fixed in 6.9-rc1 with commit 2d1f5006ff95 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-2024-26975 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/intel_rapl_common.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/0641908b906a133f1494c312a71f9fecbe2b6c78 https://git.kernel.org/stable/c/9b254feb249981b66ccdb1dae54e757789a15ba1 https://git.kernel.org/stable/c/2f73cf2ae5e0f4e629db5be3a4380ff7807148e6 https://git.kernel.org/stable/c/2d1f5006ff95770da502f8cee2a224a1ff83866e