CVE-2022-50170: kunit: executor: Fix a memory leak on failure in kunit_filter_tests

Published Jun 18, 2025
·
Updated

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

4 affected components
Linux Foundation Linux Kernel
Linux Linux kernel>=5.17.14<5.18
Linux Linux kernel>=5.18.3<5.18.18
Linux Linux kernel>=5.19<5.19.2

Event History

Jun 18, 2025
CVE Published
via MITRE·11:03 AM
Data Sourced
via MITRE·11:03 AM
Description
Data Sourced
via NVD·11:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

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.

2

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.

3

What does CVE-2022-50170 affect?

CVE-2022-50170 affects the Linux kernel specifically related to the kunit testing framework.

4

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.

5

Is CVE-2022-50170 already resolved?

Yes, CVE-2022-50170 has been resolved in subsequent updates to the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203