clk: mediatek: fix of_iomap memory leak
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: mediatek: fix of_iomap memory leak
Smatch reports: drivers/clk/mediatek/clk-mtk.c:583 mtk_clk_simple_probe() warn: 'base' from of_iomap() not released on lines: 496.
This problem was also found in linux-next. In mtk_clk_simple_probe(), base is not released when handling errors if clk_data is not existed, which may cause a leak. So free_base should be added here to release base.
From the CVE record · Linux
The Linux kernel's MediaTek clock driver can leak memory in mtk_clk_simple_probe() when clk_data does not exist and an error is handled. The input does not establish how an attacker could trigger this condition or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the MediaTek clock driver should check their versions; affected versions are not specified.