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 BED381A8F63 for ; Thu, 27 Mar 2025 16:47:53 +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=1743094073; cv=none; b=QXJvCvb/5iH67rRJN0FwFqrvzyaXUqKAtr4HYRGgE1EtM3CeJi0uaSEwIChuhAl+C99nxA7ybpEw2HkiTmkSmnXDYiGNScvlyMhXeVdEB21GRclHi2JgdPoiZBmraLLdj/pknbBZeHDPW+W2IyUSgAMp+YgAyJNscy44GPyOA9k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743094073; c=relaxed/simple; bh=gcgVXOLWkOI6rec9wT54qkzXv9n+tt8SRFJfMr3kj8Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KJ5qU42u3cWF4LcRrrN70hd+oNevQ07g3mJI5V1UfINA5tHeXl/o4RcW2FSWRx5w+PXXYDvmiT+jasU4jL8SemVEilW9vpPOBHfAeOrYoXZXOi8dSuBGi1lzv7+whoIq7E3nO4aR7slhW5dsg7n6nsHt8Yla/AaEsb9qWHbvuzk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Tggbc1po; 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="Tggbc1po" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE89FC4CEDD; Thu, 27 Mar 2025 16:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743094073; bh=gcgVXOLWkOI6rec9wT54qkzXv9n+tt8SRFJfMr3kj8Q=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Tggbc1pokom+8sHOKHUZwQtJN/ZRVoxh68svZLOuKuhhC5ts9F4KxWLYbsWDqj7Ud q3Kjx1DNxPNbGRAju8HU6xk9PXp0lhfmNQSUJ6FrGV4+UwenNDyO07hCvPrE2H895l F8yf/PSaVu4Bni5bTusl01HhLcfZ9lhZqtlKnxFY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53012: thermal: core: call put_device() only after device_register() fails Date: Thu, 27 Mar 2025 17:43:59 +0100 Message-ID: <2025032715-CVE-2023-53012-597c@gregkh> X-Mailer: git-send-email 2.49.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=2161; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=gcgVXOLWkOI6rec9wT54qkzXv9n+tt8SRFJfMr3kj8Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlPG5T5t//Iam3TPds9d+7Kb7emuSns/MPlq286Z2vel g65JOYTHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR9nqGBbv1N7XuK21OOiJ+ sSp9gjTL6ivzHRnmik3bcVN645mNHHf/Bzo0L6uI/q2lAwA= 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: call put_device() only after device_register() fails put_device() shouldn't be called before a prior call to device_register(). __thermal_cooling_device_register() doesn't follow that properly and needs fixing. Also thermal_cooling_device_destroy_sysfs() is getting called unnecessarily on few error paths. Fix all this by placing the calls at the right place. Based on initial work done by Caleb Connolly. The Linux kernel CVE team has assigned CVE-2023-53012 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15.86 with commit 5139cbc0c6e4bf2fcffc9a7ed4350bf6985bc561 Issue introduced in 6.0.16 with commit c4c435d3637b5d0abaa6447c7366c3674364968a Issue introduced in 6.1.2 with commit e0d8b51bbe84d6a98c162e06344de2d773d9e722 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-53012 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/a7d736cc3c6cb0d7498bbfb56515d414e35e9510 https://git.kernel.org/stable/c/2846a7412f6246fd5171f51011bf76dfebcec0ee https://git.kernel.org/stable/c/6c54b7bc8a31ce0f7cc7f8deef05067df414f1d8