kunit: executor: Fix a memory leak on failure in kunit_filter_tests
In the Linux kernel, the following vulnerability has been resolved: kunit: executor: Fix a memory leak on failure in kunit_filter_tests It's possible that memory allocation for 'filtered' will fail, but for the copy of the suite to succeed. In this case, the copy could be leaked. Properly free 'copy' in the error case for the allocation of 'filtered' failing. Note that there may also have been a similar issue in kunit_filter_subsuites, before it was removed in "kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites". This was reported by clang-analyzer via the kernel test robot, here: https://lore.kernel.org/all/c8073b8e-7b9e-0830-4177-87c12f16349c@intel.com/ And by smatch via Dan Carpenter and the kernel test robot: https://lore.kernel.org/all/202207101328.ASjx88yj-lkp@intel.com/
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.18.18, 5.19.2
- CVEs
- CVE-2022-50170
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 04:24 UTC · Revision 1
Source evidence
kunit: executor: Fix a memory leak on failure in kunit_filter_tests
core-osv · Original sourcePublished 18 Jun 2025, 11:03 UTC
In the Linux kernel, the following vulnerability has been resolved: kunit: executor: Fix a memory leak on failure in kunit_filter_tests It's possible that memory allocation for 'filtered' will fail, but for the copy of the suite to succeed. In this case, the copy could be leaked. Properly free 'copy' in the error case for the allocation of 'filtered' failing. Note that there may also have been a similar issue in kunit_filter_subsuites, before it was removed in "kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites". This was reported by clang-analyzer via the kernel test robot, here: https://lore.kernel.org/all/c8073b8e-7b9e-0830-4177-87c12f16349c@intel.com/ And by smatch via Dan Carpenter and the kernel test robot: https://lore.kernel.org/all/202207101328.ASjx88yj-lkp@intel.com/
osv:CVE-2022-50170
Kernel
Fixed versions: 5.18.18, 5.19.2
Complete source record
{
"id": "5276aa59000c39541873664c75fbe0eaeebe3ecc8a8c453d43ffa32b1db143d1",
"url": "https://osv.dev/vulnerability/CVE-2022-50170",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "kunit: executor: Fix a memory leak on failure in kunit_filter_tests",
"summary": "In the Linux kernel, the following vulnerability has been resolved: kunit: executor: Fix a memory leak on failure in kunit_filter_tests It's possible that memory allocation for 'filtered' will fail, but for the copy of the suite to succeed. In this case, the copy could be leaked. Properly free 'copy' in the error case for the allocation of 'filtered' failing. Note that there may also have been a similar issue in kunit_filter_subsuites, before it was removed in \"kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites\". This was reported by clang-analyzer via the kernel test robot, here: https://lore.kernel.org/all/c8073b8e-7b9e-0830-4177-87c12f16349c@intel.com/ And by smatch via Dan Carpenter and the kernel test robot: https://lore.kernel.org/all/202207101328.ASjx88yj-lkp@intel.com/",
"evidence": "osv:CVE-2022-50170",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.18.18",
"evidence": "/affected/1/ranges"
},
{
"value": "5.19.2",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2022-50170",
"aliases": [
"CVE-2022-50170"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "bd8b222a0002872bb229f6c755672a093ef93ea4"
},
{
"fixed": "a8a7e3ced362b88b659ab54239990196ff975982"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "a02353f491622e49c7ddedc6a6dc4f1d6ed2150a"
},
{
"fixed": "7d69764fa3442c7615a75c6b5c02eaa1f274bccf"
},
{
"fixed": "94681e289bf5d10c9db9db143d1a22d8717205c5"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "5.18.3"
},
{
"fixed": "5.18.18"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "5.17.14"
},
{
"fixed": "5.18"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "80cf4932c2545bc231e933d869511008c36af1e0"
}
]
}
],
"versions": [
"v5.18.17",
"v5.18.16",
"v5.18.15",
"v5.18.14",
"v5.18.13",
"v5.18.12",
"v5.18.11",
"v5.18.10",
"v5.18.9",
"v5.18.8",
"v5.18.7",
"v5.18.6",
"v5.18.5",
"v5.18.4",
"v5.18.3",
"v5.17.15",
"v5.17.14"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50170.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.18.18"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.19.0"
},
{
"fixed": "5.19.2"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50170.json"
}
}
],
"modified": "2026-10-28T02:30:33.179362664Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/7d69764fa3442c7615a75c6b5c02eaa1f274bccf",
"https://git.kernel.org/stable/c/94681e289bf5d10c9db9db143d1a22d8717205c5",
"https://git.kernel.org/stable/c/a8a7e3ced362b88b659ab54239990196ff975982",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50170.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-50170",
"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-50170.json"
}
},
"related_cves": [
{
"value": "CVE-2022-50170",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 500267,
"published_at": "2025-06-18T11:03:23.031+00:00"
}