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 BECADCA6F for ; Sun, 25 Feb 2024 08:17:06 +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=1708849026; cv=none; b=QOHiGuO+Bp8hFtmGRXxWwhQL1rPgZBzs2oDe+nwuE+v8Re4RuzeIDyipC90RiIsN9Qw0LOtvoQAqZv1PYjYFM1XkbEoiP3pcz6mGKQkwiPhBWY6Q3qUZXswQq/c52l6zNIJj0yjLUHhqDrTc65qmm6BQTmrK4iG8TsFr+VRa+Jo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708849026; c=relaxed/simple; bh=koImgdBGWXMTpPrgcrMab45YPwN0a2deJCg4hW5dmk0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cQxqOPOhyKAxHDK81QxsPcd3HMbv9GD7G6s0tcHnE5IDDJcXKhi/mTBf02cCs5KdkUlkIhFJ7tdk7JBPXLK6j28bOP/OrT6gIWD9ENt6yszTv/DnhiSAf5x2EJBrTDIDlCjN9gYeCH8dQb/W6RKqeujeayZEGDFzM4EbAD2YQqk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tn33AcMb; 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="tn33AcMb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6A91C433F1; Sun, 25 Feb 2024 08:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708849026; bh=koImgdBGWXMTpPrgcrMab45YPwN0a2deJCg4hW5dmk0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=tn33AcMbbWiv5d1wGIyAyyevq3tSsHRAQXMgSQiq5nLaH9SL9bp4/RJr4/uR1/Ggn P2PBdi9Cq9P7F9/uDO8p2S6aYAMz+I4s5v5XGxzNcPWNUDeeTxekGSGqiplS6eSAYJ DxWUj7w+i1DN+mXeSUAIRAEcfZyx9H4RYTZ2guaM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52473: thermal: core: Fix NULL pointer dereference in zone registration error path Date: Sun, 25 Feb 2024 09:16:48 +0100 Message-ID: <2024022547-CVE-2023-52473-c3cc@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=2552; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=koImgdBGWXMTpPrgcrMab45YPwN0a2deJCg4hW5dmk0=; b=owGbwMvMwCRo6H6F97bub03G02pJDKm3vuev6GuTPLX0ZcaB4+dF3qT1qB533G4reuLwwo35u upX63S/dsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEGlkZ5gp8kI0KPpGSeZ6J szXdKObfrjXTPRkW7JTJXO3/6Wl68hPDmS28Zz6tPCazAgA= 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: thermal: core: Fix NULL pointer dereference in zone registration error path If device_register() in thermal_zone_device_register_with_trips() returns an error, the tz variable is set to NULL and subsequently dereferenced in kfree(tz->tzp). Commit adc8749b150c ("thermal/drivers/core: Use put_device() if device_register() fails") added the tz = NULL assignment in question to avoid a possible double-free after dropping the reference to the zone device. However, after commit 4649620d9404 ("thermal: core: Make thermal_zone_device_unregister() return after freeing the zone"), that assignment has become redundant, because dropping the reference to the zone device does not cause the zone object to be freed any more. Drop it to address the NULL pointer dereference. The Linux kernel CVE team has assigned CVE-2023-52473 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 3d439b1a2ad3 and fixed in 6.6.14 with commit 335176dd8eba Issue introduced in 6.4 with commit 3d439b1a2ad3 and fixed in 6.7.2 with commit 02871710b930 Issue introduced in 6.4 with commit 3d439b1a2ad3 and fixed in 6.8-rc1 with commit 04e6ccfc93c5 Please see https://www.kernel.org or 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-2023-52473 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/thermal/thermal_core.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/335176dd8ebaca6493807dceea33c478305667fa https://git.kernel.org/stable/c/02871710b93058eb1249d5847c0b2d1c2c3c98ae https://git.kernel.org/stable/c/04e6ccfc93c5a1aa1d75a537cf27e418895e20ea