pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()
In 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().
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.0.16, 6.1.2
- CVEs
- CVE-2022-50557
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 06:10 UTC · Revision 1
Source evidence
pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()
core-osv · Original sourcePublished 22 Oct 2025, 13:23 UTC
In 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().
osv:CVE-2022-50557
Kernel
Fixed versions: 6.0.16, 6.1.2
Complete source record
{
"id": "d4c9793df39ed2b4eedcd178f4d701ee3e8de55d6ba1d9063c7ebd63a2f29274",
"url": "https://osv.dev/vulnerability/CVE-2022-50557",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()",
"summary": "In 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().",
"evidence": "osv:CVE-2022-50557",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.0.16",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.2",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2022-50557",
"aliases": [
"CVE-2022-50557"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "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"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.17.0"
},
{
"fixed": "6.0.16"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.1.0"
},
{
"fixed": "6.1.2"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50557.json"
}
}
],
"modified": "2026-10-28T02:30:42.958174670Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/3650943bab29d03ef147290451237713ed1942cd",
"https://git.kernel.org/stable/c/83e1bcaf8cef26edaaf2a6098ef760f563683483",
"https://git.kernel.org/stable/c/aae4846e8e49044cb51d0276bec2a3fc2d5cd8da",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50557.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-50557",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50557.json"
}
},
"related_cves": [
{
"value": "CVE-2022-50557",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 511001,
"published_at": "2025-10-22T13:23:18.131+00:00"
}