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 C30DC314B64 for ; Thu, 18 Sep 2025 16:05:08 +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=1758211508; cv=none; b=A8myvHAamFzOMhJd0ADiiU/tf8A864EUODERs5JShj9DBJkHe8lTNnolwgcH0K4KFSgzJ7q7W9w9tGXEkCoOJbxn9mQjf2oe/I+BOJUT9CQHTsUNUGNGTwFxEDrpjWJM/bflEOwnG4asTjrKGuU7f+k5OmF+3wIE16oeNNoYtl4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758211508; c=relaxed/simple; bh=nP/u/K2wxJDLsa60iqDfS9nNv2bC8vT39mwHbj2PH0Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n80FgMMA2Nd+wrQh4HmHJxgeQFHmFmXfHY/oco0qlBvlinnm0mDNrYzMLNEDjFMqlAXJfV24r9JTCr0nopP6iE65mA9AhAIeNWIVOSbbvXkiQFwium2INci8ZIFuOP4WvHkR8tOUqneNTCtKfAbCJMBOFRpBiorZ0vefMhJs9qk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BSkq1xsK; 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="BSkq1xsK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D8D4C4CEE7; Thu, 18 Sep 2025 16:05:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758211508; bh=nP/u/K2wxJDLsa60iqDfS9nNv2bC8vT39mwHbj2PH0Y=; h=From:To:Cc:Subject:Date:Reply-to:From; b=BSkq1xsKIZA2oalwsvzx4cZPZ1TqPytAJHguqYQnpunsnNGQf9gq8b1XT1T1tEtky AW4HavE570KVwkwMNWb9uxSChoU3lAnR/5OZGVU9tniqO9rqNq892QDCnEn6OGHagM zo6hePWOlvcs/CLQAz5ovCI++i6dlHy24/+3agos= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53428: powercap: arm_scmi: Remove recursion while parsing zones Date: Thu, 18 Sep 2025 18:04:19 +0200 Message-ID: <2025091857-CVE-2023-53428-1448@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=3173; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=13JnBoUxws8s48KsKFSCWuR7InF2ibu/bNK+X9unWRY=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlndHOf/fr5x9E/0bHzarx84NITdef2qrxqKP/vq/LZ9 Pm3uSFzOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiMzYzLJgjdPHyRLsZ15b4 bXld+VPutzR/Ki/DPCXGh6EdJ5Y0sHV4F7mlWO5IqjGyBQA= 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: arm_scmi: Remove recursion while parsing zones Powercap zones can be defined as arranged in a hierarchy of trees and when registering a zone with powercap_register_zone(), the kernel powercap subsystem expects this to happen starting from the root zones down to the leaves; on the other side, de-registration by powercap_deregister_zone() must begin from the leaf zones. Available SCMI powercap zones are retrieved dynamically from the platform at probe time and, while any defined hierarchy between the zones is described properly in the zones descriptor, the platform returns the availables zones with no particular well-defined order: as a consequence, the trees possibly composing the hierarchy of zones have to be somehow walked properly to register the retrieved zones from the root. Currently the ARM SCMI Powercap driver walks the zones using a recursive algorithm; this approach, even though correct and tested can lead to kernel stack overflow when processing a returned hierarchy of zones composed by particularly high trees. Avoid possible kernel stack overflow by substituting the recursive approach with an iterative one supported by a dynamically allocated stack-like data structure. The Linux kernel CVE team has assigned CVE-2023-53428 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit b55eef5226b71edf5422de246bc189da1fdc9000 and fixed in 6.4.16 with commit b427c23cebc5c926516f20304bf1acc05a33d147 Issue introduced in 6.2 with commit b55eef5226b71edf5422de246bc189da1fdc9000 and fixed in 6.5.3 with commit 8022b64fb7daa6135d9f7b0e2f7b5b8e9e5179c9 Issue introduced in 6.2 with commit b55eef5226b71edf5422de246bc189da1fdc9000 and fixed in 6.6 with commit 3e767d6850f867cc33ac16ca097350a1d2417982 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-53428 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/arm_scmi_powercap.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/b427c23cebc5c926516f20304bf1acc05a33d147 https://git.kernel.org/stable/c/8022b64fb7daa6135d9f7b0e2f7b5b8e9e5179c9 https://git.kernel.org/stable/c/3e767d6850f867cc33ac16ca097350a1d2417982