regulator: stm32-pwr: fix of_iomap leak
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.180, 5.15.111, 5.4.243, 6.1.28, 6.2.15, 6.3.2
- CVEs
- CVE-2023-54097
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 04:00 UTC · Revision 1
Source evidence
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.
osv:CVE-2023-54097
Kernel
Fixed versions: 5.4.243, 5.10.180, 5.15.111, 6.1.28, 6.2.15, 6.3.2
Complete source record
{
"id": "0f586d12811b98b16e1c0390a8b0adc10cfdef89051db365f38df446401c8f61",
"url": "https://osv.dev/vulnerability/CVE-2023-54097",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "regulator: stm32-pwr: fix of_iomap leak",
"summary": "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.",
"evidence": "osv:CVE-2023-54097",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.4.243",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.180",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.111",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.28",
"evidence": "/affected/1/ranges"
},
{
"value": "6.2.15",
"evidence": "/affected/1/ranges"
},
{
"value": "6.3.2",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2023-54097",
"aliases": [
"CVE-2023-54097"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "dc62f951a6a8490bcccc7b6de36cd85bd57be740"
},
{
"fixed": "824683dbec234a01bd49a0589ee3323594a6f4cf"
},
{
"fixed": "dfce9bb3517a78507cf96f9b83948d0b81338afa"
},
{
"fixed": "ad6481f49fb2c703efa3a929643934f24b666d6a"
},
{
"fixed": "f25994f7a9ad53eb756bc4869497c3ebe281ad5e"
},
{
"fixed": "c091bb49b3233307c7af73dae888f0799752af3d"
},
{
"fixed": "0ad07e02be0d3f0d554653382ffe53ae4879378d"
},
{
"fixed": "c4a413e56d16a2ae84e6d8992f215c4dcc7fac20"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54097.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.2.0"
},
{
"fixed": "5.4.243"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.180"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.111"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.28"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.2.15"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.3.0"
},
{
"fixed": "6.3.2"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54097.json"
}
}
],
"modified": "2026-10-28T02:30:33.027475432Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/0ad07e02be0d3f0d554653382ffe53ae4879378d",
"https://git.kernel.org/stable/c/824683dbec234a01bd49a0589ee3323594a6f4cf",
"https://git.kernel.org/stable/c/ad6481f49fb2c703efa3a929643934f24b666d6a",
"https://git.kernel.org/stable/c/c091bb49b3233307c7af73dae888f0799752af3d",
"https://git.kernel.org/stable/c/c4a413e56d16a2ae84e6d8992f215c4dcc7fac20",
"https://git.kernel.org/stable/c/dfce9bb3517a78507cf96f9b83948d0b81338afa",
"https://git.kernel.org/stable/c/f25994f7a9ad53eb756bc4869497c3ebe281ad5e",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54097.json",
"https://nvd.nist.gov/vuln/detail/CVE-2023-54097",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54097.json"
}
},
"related_cves": [
{
"value": "CVE-2023-54097",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 500201,
"published_at": "2025-12-24T13:06:24.519+00:00"
}