CVE-2023-54097

regulator: stm32-pwr: fix of_iomap leak

No CVSS score yet EPSS 0.23%

Published 24 Dec 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2023-54097

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-54097 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.23%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 14.7% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from dc62f951a6a8490bcccc7b6de36cd85bd57be740, before 824683dbec234a01bd49a0589ee3323594a6f4cf
affected from dc62f951a6a8490bcccc7b6de36cd85bd57be740, before dfce9bb3517a78507cf96f9b83948d0b81338afa
affected from dc62f951a6a8490bcccc7b6de36cd85bd57be740, before ad6481f49fb2c703efa3a929643934f24b666d6a
affected from dc62f951a6a8490bcccc7b6de36cd85bd57be740, before f25994f7a9ad53eb756bc4869497c3ebe281ad5e
affected from dc62f951a6a8490bcccc7b6de36cd85bd57be740, before c091bb49b3233307c7af73dae888f0799752af3d
affected from dc62f951a6a8490bcccc7b6de36cd85bd57be740, before 0ad07e02be0d3f0d554653382ffe53ae4879378d
affected from dc62f951a6a8490bcccc7b6de36cd85bd57be740, before c4a413e56d16a2ae84e6d8992f215c4dcc7fac20
Other versions: unaffected
Linux
affected 5.2
unaffected before 5.2
unaffected from 5.4.243 up to and including 5.4.*
unaffected from 5.10.180 up to and including 5.10.*
unaffected from 5.15.111 up to and including 5.15.*
unaffected from 6.1.28 up to and including 6.1.*
unaffected from 6.2.15 up to and including 6.2.*
unaffected from 6.3.2 up to and including 6.3.*
unaffected 6.4 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-54097 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-54097

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2023-54097
trivy image --scanners vuln IMAGE | grep CVE-2023-54097

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2023-54097 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.