clk: imx: clk-imx8mp: improve error handling in imx8mp_clocks_probe()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9c140d9926761b0f5d329ff6c09a1540f3d5e1d3 · < 878b02d5f3b56cb090dbe2c70c89273be144087f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
clk: imx: clk-imx8mp: improve error handling in imx8mp_clocks_probe()
Replace of_iomap() and kzalloc() with devm_of_iomap() and devm_kzalloc() which can automatically release the related memory when the device or driver is removed or unloaded to avoid potential memory leak.
In this case, iounmap(anatop_base) in line 427,433 are removed as manual release is not required.
Besides, referring to clk-imx8mq.c, check the return code of of_clk_add_hw_provider, if it returns negtive, print error info and unregister hws, which makes the program more robust.
From the CVE record · Linux
The Linux kernel’s i.MX8MP clock driver could leak memory when a device or driver is removed or unloaded. The input does not describe an attacker action, access requirements, or user interaction needed to trigger the issue.
Engineers running Linux kernels with the i.MX8MP clock driver should check their versions; affected versions are not specified.