soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_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:
soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe()
In mpfs_sys_controller_probe(), if of_get_mtd_device_by_node() fails, the function returns immediately without freeing the allocated memory for sys_controller, leading to a memory leak.
Fix this by jumping to the out_free label to ensure the memory is properly freed.
Also, consolidate the error handling for the mbox_request_channel() failure case to use the same label.
From the CVE record · Linux
The Linux kernel's mpfs_sys_controller_probe() leaks allocated memory if of_get_mtd_device_by_node() fails. The input does not establish whether an attacker can trigger this condition or specify network access, authentication, or user interaction.
Engineers running Linux kernels with the Microchip MPFS system controller should check their versions; affected versions were not provided.