{"id":"CVE-2023-54097","published":"2025-12-24T13:06:24Z","modified":"2026-05-11T19:55:25Z","title":"regulator: stm32-pwr: fix of_iomap leak","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nregulator: stm32-pwr: fix of_iomap leak\n\nSmatch reports:\ndrivers/regulator/stm32-pwr.c:166 stm32_pwr_regulator_probe() warn:\n'base' from of_iomap() not released on lines: 151,166.\n\nIn stm32_pwr_regulator_probe(), base is not released\nwhen devm_kzalloc() fails to allocate memory or\ndevm_regulator_register() fails to register a new regulator device,\nwhich may cause a leak.\n\nTo fix this issue, replace of_iomap() with\ndevm_platform_ioremap_resource(). devm_platform_ioremap_resource()\nis a specialized function for platform devices.\nIt allows 'base' to be automatically released whether the probe\nfunction succeeds or fails.\n\nBesides, use IS_ERR(base) instead of !base\nas the return value of devm_platform_ioremap_resource()\ncan either be a pointer to the remapped memory or\nan ERR_PTR() encoded error code if the operation fails.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00214,"percentile":0.11657,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/824683dbec234a01bd49a0589ee3323594a6f4cf","tags":[]},{"url":"https://git.kernel.org/stable/c/dfce9bb3517a78507cf96f9b83948d0b81338afa","tags":[]},{"url":"https://git.kernel.org/stable/c/ad6481f49fb2c703efa3a929643934f24b666d6a","tags":[]},{"url":"https://git.kernel.org/stable/c/f25994f7a9ad53eb756bc4869497c3ebe281ad5e","tags":[]},{"url":"https://git.kernel.org/stable/c/c091bb49b3233307c7af73dae888f0799752af3d","tags":[]},{"url":"https://git.kernel.org/stable/c/0ad07e02be0d3f0d554653382ffe53ae4879378d","tags":[]},{"url":"https://git.kernel.org/stable/c/c4a413e56d16a2ae84e6d8992f215c4dcc7fac20","tags":[]}],"priority":{"score":2.3,"factors":[{"name":"EPSS percentile","points":2.33}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= dc62f951a6a8490bcccc7b6de36cd85bd57be740, < 824683dbec234a01bd49a0589ee3323594a6f4cf",">= dc62f951a6a8490bcccc7b6de36cd85bd57be740, < dfce9bb3517a78507cf96f9b83948d0b81338afa",">= dc62f951a6a8490bcccc7b6de36cd85bd57be740, < ad6481f49fb2c703efa3a929643934f24b666d6a",">= dc62f951a6a8490bcccc7b6de36cd85bd57be740, < f25994f7a9ad53eb756bc4869497c3ebe281ad5e",">= dc62f951a6a8490bcccc7b6de36cd85bd57be740, < c091bb49b3233307c7af73dae888f0799752af3d",">= dc62f951a6a8490bcccc7b6de36cd85bd57be740, < 0ad07e02be0d3f0d554653382ffe53ae4879378d",">= dc62f951a6a8490bcccc7b6de36cd85bd57be740, < c4a413e56d16a2ae84e6d8992f215c4dcc7fac20"]},{"vendor":"Linux","product":"Linux","versions":["5.2"]}],"euvd":{"id":"EUVD-2023-60348","exploited":false,"provenance":"source"}}