{"id":"CVE-2022-50557","summary":"pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\npinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()\n\nThe thunderbay_add_functions() will free memory of thunderbay_funcs\nwhen everything is ok, but thunderbay_funcs will not be freed when\nthunderbay_add_functions() fails, then there will be a memory leak,\nso we need to add kfree() when thunderbay_add_functions() fails to\nfix it.\n\nIn addition, doing some cleaner works, moving kfree(funcs) from\nthunderbay_add_functions() to thunderbay_build_functions().","modified":"2026-04-02T08:28:38.256080Z","published":"2025-10-22T13:23:18.131Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50557.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/3650943bab29d03ef147290451237713ed1942cd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/83e1bcaf8cef26edaaf2a6098ef760f563683483"},{"type":"WEB","url":"https://git.kernel.org/stable/c/aae4846e8e49044cb51d0276bec2a3fc2d5cd8da"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50557.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50557"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"12422af8194df85243d68b11f8783de9d01e58dc"},{"fixed":"3650943bab29d03ef147290451237713ed1942cd"},{"fixed":"aae4846e8e49044cb51d0276bec2a3fc2d5cd8da"},{"fixed":"83e1bcaf8cef26edaaf2a6098ef760f563683483"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50557.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.17.0"},{"fixed":"6.0.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50557.json"}}],"schema_version":"1.7.5"}