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 A94B1346782 for ; Wed, 24 Dec 2025 13:09:43 +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=1766581783; cv=none; b=PafGUDF95EvbBKn0/1mZuGcaftTNPzvNcGl3t/8E9f7hP7IBLbOli6J7pGiQOnoar4ZF5P8io0yYBOEUPj8xODjL5Kom15+KLPJy4eutZZxM74fx492vSNHX/WfEE09V1WOlH2siJTPg7oy3YgYF6jSZJX5KH62Sip5aDuf14dk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581783; c=relaxed/simple; bh=kUPRn1Mqv8wWFgcwQQGUgjv1m8ajbLhiBA7epl2ynyw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=I2x9JkzMORB5CLJ1GlUeCfbi06Om3cphI/ouIPCiX7DhPtyQQhFaS1CJgIG9Xihww/jXtOaaBxwcGSfaRSM1lqv0yqc0WXdAJiyKSBA6yUC1U93Ixs4/813WuYrCg7KQQ0CpaQsksToPBquGo+EwY/PVDlI+2N2QKBZ2kAlupHY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WpH/Lh6b; 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="WpH/Lh6b" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30945C4CEFB; Wed, 24 Dec 2025 13:09:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766581783; bh=kUPRn1Mqv8wWFgcwQQGUgjv1m8ajbLhiBA7epl2ynyw=; h=From:To:Cc:Subject:Date:Reply-To:From; b=WpH/Lh6bXU19h1uYn+oJ7Uj3J8zNoUUdkjNIOhJVpMGCkfs1jUWKMKeA9RiajLlUT N5bAGFRfeHC2sc4PME5ay3M5wpN1C9UMqoPQfsuOJStILdqnIX7pHW8ugDh19f2yYs eGlYZYkQkKrLM1DONC6wbUD/6jrPHJVpGqDztZ40= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54097: regulator: stm32-pwr: fix of_iomap leak Date: Wed, 24 Dec 2025 14:06:54 +0100 Message-ID: <2025122409-CVE-2023-54097-3fb1@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3695; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=46sKgpEtrl/jMhE+yCjetVfx3IzryrcRm26kO4nWF0c=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneTx1Vn/+buifiQnFBh+phN/E7OvZGhcetH6h1ek9Zw 2DtYMvZEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPx+cYwTzW1z8Pfet57jYvM XZU3f26OFvzgy7Bg4pFn2oGcGny9n89HHPeynXn61fE8AA== 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: regulator: stm32-pwr: fix of_iomap leak Smatch reports: drivers/regulator/stm32-pwr.c:166 stm32_pwr_regulator_probe() warn: 'base' from of_iomap() not released on lines: 151,166. In stm32_pwr_regulator_probe(), base is not released when devm_kzalloc() fails to allocate memory or devm_regulator_register() fails to register a new regulator device, which may cause a leak. To fix this issue, replace of_iomap() with devm_platform_ioremap_resource(). devm_platform_ioremap_resource() is a specialized function for platform devices. It allows 'base' to be automatically released whether the probe function succeeds or fails. Besides, use IS_ERR(base) instead of !base as the return value of devm_platform_ioremap_resource() can either be a pointer to the remapped memory or an ERR_PTR() encoded error code if the operation fails. The Linux kernel CVE team has assigned CVE-2023-54097 to this issue. Affected and fixed versions =========================== Issue introduced in 5.2 with commit dc62f951a6a8490bcccc7b6de36cd85bd57be740 and fixed in 5.4.243 with commit 824683dbec234a01bd49a0589ee3323594a6f4cf Issue introduced in 5.2 with commit dc62f951a6a8490bcccc7b6de36cd85bd57be740 and fixed in 5.10.180 with commit dfce9bb3517a78507cf96f9b83948d0b81338afa Issue introduced in 5.2 with commit dc62f951a6a8490bcccc7b6de36cd85bd57be740 and fixed in 5.15.111 with commit ad6481f49fb2c703efa3a929643934f24b666d6a Issue introduced in 5.2 with commit dc62f951a6a8490bcccc7b6de36cd85bd57be740 and fixed in 6.1.28 with commit f25994f7a9ad53eb756bc4869497c3ebe281ad5e Issue introduced in 5.2 with commit dc62f951a6a8490bcccc7b6de36cd85bd57be740 and fixed in 6.2.15 with commit c091bb49b3233307c7af73dae888f0799752af3d Issue introduced in 5.2 with commit dc62f951a6a8490bcccc7b6de36cd85bd57be740 and fixed in 6.3.2 with commit 0ad07e02be0d3f0d554653382ffe53ae4879378d Issue introduced in 5.2 with commit dc62f951a6a8490bcccc7b6de36cd85bd57be740 and fixed in 6.4 with commit c4a413e56d16a2ae84e6d8992f215c4dcc7fac20 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-54097 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/regulator/stm32-pwr.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/824683dbec234a01bd49a0589ee3323594a6f4cf https://git.kernel.org/stable/c/dfce9bb3517a78507cf96f9b83948d0b81338afa https://git.kernel.org/stable/c/ad6481f49fb2c703efa3a929643934f24b666d6a https://git.kernel.org/stable/c/f25994f7a9ad53eb756bc4869497c3ebe281ad5e https://git.kernel.org/stable/c/c091bb49b3233307c7af73dae888f0799752af3d https://git.kernel.org/stable/c/0ad07e02be0d3f0d554653382ffe53ae4879378d https://git.kernel.org/stable/c/c4a413e56d16a2ae84e6d8992f215c4dcc7fac20