pinctrl: nuvoton: fix a double free in ma35_pinctrl_dt_node_to_map_func()
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:
pinctrl: nuvoton: fix a double free in ma35_pinctrl_dt_node_to_map_func()
'new_map' is allocated using devm_* which takes care of freeing the allocated data on device removal, call to
.dt_free_map = pinconf_generic_dt_free_map
double frees the map as pinconf_generic_dt_free_map() calls pinctrl_utils_free_map().
Fix this by using kcalloc() instead of auto-managed devm_kcalloc().
From the CVE record · Linux
The Linux kernel’s Nuvoton pinctrl driver can double-free a device-tree map because both device-managed cleanup and the map-free callback free it. The input does not specify how an attacker could trigger the flaw or whether access or user interaction is required.
Engineers running Linux kernels with the Nuvoton pinctrl driver should check their exposure; affected versions are not specified.