pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()
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 |
|
|
6.0.166.1.26.2In the Linux kernel, the following vulnerability has been resolved:
pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()
The thunderbay_add_functions() will free memory of thunderbay_funcs when everything is ok, but thunderbay_funcs will not be freed when thunderbay_add_functions() fails, then there will be a memory leak, so we need to add kfree() when thunderbay_add_functions() fails to fix it.
In addition, doing some cleaner works, moving kfree(funcs) from thunderbay_add_functions() to thunderbay_build_functions().
From the CVE record · Linux
The Linux kernel's Thunder Bay pinctrl code can leak memory when thunderbay_add_functions() fails. The input does not establish whether an attacker can trigger the failure or specify access or interaction requirements.
Engineers running Linux kernels with Thunder Bay pinctrl code should check their versions; affected versions are not specified.