clk: imx: clk-imxrt1050: fix memory leak in imxrt1050_clocks_probe
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
clk: imx: clk-imxrt1050: fix memory leak in imxrt1050_clocks_probe
Use devm_of_iomap() instead of of_iomap() to automatically handle the unused ioremap region. If any error occurs, regions allocated by kzalloc() will leak, but using devm_kzalloc() instead will automatically free the memory using devm_kfree().
Also, fix error handling of hws by adding unregister_hws label, which unregisters remaining hws when iomap failed.
From the CVE record · Linux
The Linux kernel's imxrt1050_clocks_probe can leak allocated memory when an error occurs. The input does not establish whether an attacker can trigger the error or specify access, authentication, or user-interaction conditions.
Engineers running Linux kernels with the i.MX RT1050 clock driver should check whether their kernel includes the fix; affected versions are not specified.