CVE-2022-50170: 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 kunitfiltertests
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 kunitfiltersubsuites, before it was removed in "kunit: flatten kunitsuite to kunitsuite in .kunittestsuites".
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/
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50170?
CVE-2022-50170 has a medium severity rating due to the potential memory leak issue in the Linux kernel.
How do I fix CVE-2022-50170?
To fix CVE-2022-50170, update your Linux kernel to the latest version where this vulnerability has been patched.
What does CVE-2022-50170 affect?
CVE-2022-50170 affects the Linux kernel specifically related to the kunit testing framework.
What is the impact of CVE-2022-50170?
The impact of CVE-2022-50170 is a memory leak that can occur during the test execution process, potentially leading to resource exhaustion.
Is CVE-2022-50170 already resolved?
Yes, CVE-2022-50170 has been resolved in subsequent updates to the Linux kernel.