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 E9F89279DC8 for ; Sat, 4 Oct 2025 15:54:48 +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=1759593289; cv=none; b=b18JN+X/EVoz2VQUU0l2P6RQ9b39Eu/qA5qBw7MFuowZ3tUbwl9/Pgc0V2Es/tRKzFDaqbOq6Mp26QHUtZvRP46Yd2I1/krTSFy4Az/IvJ4hjawFJ/McjDQbYqXEsFF2fupLghtMo2do8m1M72phBbaE2K9N+aj9+EJF1flVHiU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759593289; c=relaxed/simple; bh=RUmud6d4didJK497XaUu+bzJ+OdVwHCkUM5EYtgVdQk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=s+KMvy86yNi8B2T7+NbJcRIgx61tmR4ZU027AEumqedvsYDY9zxWHSQ7BuwrzgP5zDSEfIF/CqjI0jepVvuZbEhiCECMzoRtOmLDDhGY7pV+TmoBY1CTE4wp9PrO2kFnBafDHIgh31s6/QH/lokuhNZGZ3hv3XAmLUSfsdW14qA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Z8WvkyN2; 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="Z8WvkyN2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EBC9C4CEF1; Sat, 4 Oct 2025 15:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759593288; bh=RUmud6d4didJK497XaUu+bzJ+OdVwHCkUM5EYtgVdQk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Z8WvkyN2WHdqKrCtBBu7Nd/KGGlOMutjsu9doXdMfEI6iLw8GY9p3nhYiHlPuKjDi gzk7t2emMCb9wpuderge5Iu9TnBDzJWZNKMH7tg07LI0/nN8Fty50pLcuTc7Osse+P OlYFPYm4VXsIQXAdt1vHB8IWzTF/ce9ULzJUMbi4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53612: hwmon: (coretemp) Simplify platform device handling Date: Sat, 4 Oct 2025 17:52:06 +0200 Message-ID: <2025100434-CVE-2023-53612-b146@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=3641; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=jo6GjqkjD6DJGGDOr0HXymPXSiKxPq8tT/2f6QWozjQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPndrOC0/21Li25Ndl40lnmioPdnhzZVpkH315nPVr5 8Pvrz7u7YhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJvJrFsGCt3/1//J6GF2f0 /trlp63I+cVz73OGudK+0s6yinkbX0193CDzVMfmhY/2fwA= 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: hwmon: (coretemp) Simplify platform device handling Coretemp's platform driver is unconventional. All the real work is done globally by the initcall and CPU hotplug notifiers, while the "driver" effectively just wraps an allocation and the registration of the hwmon interface in a long-winded round-trip through the driver core. The whole logic of dynamically creating and destroying platform devices to bring the interfaces up and down is error prone, since it assumes platform_device_add() will synchronously bind the driver and set drvdata before it returns, thus results in a NULL dereference if drivers_autoprobe is turned off for the platform bus. Furthermore, the unusual approach of doing that from within a CPU hotplug notifier, already commented in the code that it deadlocks suspend, also causes lockdep issues for other drivers or subsystems which may want to legitimately register a CPU hotplug notifier from a platform bus notifier. All of these issues can be solved by ripping this unusual behaviour out completely, simply tying the platform devices to the lifetime of the module itself, and directly managing the hwmon interfaces from the hotplug notifiers. There is a slight user-visible change in that /sys/bus/platform/drivers/coretemp will no longer appear, and /sys/devices/platform/coretemp.n will remain present if package n is hotplugged off, but hwmon users should really only be looking for the presence of the hwmon interfaces, whose behaviour remains unchanged. The Linux kernel CVE team has assigned CVE-2023-53612 to this issue. Affected and fixed versions =========================== Fixed in 5.4.235 with commit 4000384684f612b3645a944f6acde0e65ac370b8 Fixed in 5.10.173 with commit 5735878a7b7db7e9ce731cb36cec298a9de67549 Fixed in 5.15.99 with commit 52ea47a0ddfbc5fe05e873d3f5a59db4ba3e03fe Fixed in 6.1.16 with commit 8fcdbc4bc01365f4b10fed7db544a3149e3054fd Fixed in 6.2.3 with commit c57a8d14d7880521150ee801d53a0a64fdffd9c8 Fixed in 6.3 with commit 6d03bbff456befeccdd4d663177c4d6c75d0c4ff 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-2023-53612 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/hwmon/coretemp.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/4000384684f612b3645a944f6acde0e65ac370b8 https://git.kernel.org/stable/c/5735878a7b7db7e9ce731cb36cec298a9de67549 https://git.kernel.org/stable/c/52ea47a0ddfbc5fe05e873d3f5a59db4ba3e03fe https://git.kernel.org/stable/c/8fcdbc4bc01365f4b10fed7db544a3149e3054fd https://git.kernel.org/stable/c/c57a8d14d7880521150ee801d53a0a64fdffd9c8 https://git.kernel.org/stable/c/6d03bbff456befeccdd4d663177c4d6c75d0c4ff