CVE-2022-50170

kunit: executor: Fix a memory leak on failure in kunit_filter_tests

MEDIUM
5.5
CVSS Score
Published: June 18, 2025 at 11:03 AM UTC
Updated: June 17, 2026 at 05:22 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

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/[email protected]/ And by smatch via Dan Carpenter and the kernel test robot: https://lore.kernel.org/all/[email protected]/

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≥ 5.17.145.17.14 ≤ v < 5.185.18.3 ≤ v < 5.18.185.19 ≤ v < 5.19.25.19 ≤ v < 6.05.17.145.18.35.1980cf4932c2545bc231e933d869511008c36af1e0a02353f491622e49c7ddedc6a6dc4f1d6ed2150abd8b222a0002872bb229f6c755672a093ef93ea4
Vendor states this is fixed in 7d69764fa3442c7615a75c6b5c02eaa1f274bccf (fixed)
Vendor states this is fixed in 94681e289bf5d10c9db9db143d1a22d8717205c5 (fixed)
Vendor states this is fixed in a8a7e3ced362b88b659ab54239990196ff975982 (fixed)
Affected range stops below 5.18, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 5.18.18 (unaffected)
Vendor states this is fixed in 5.19 (unaffected)
Vendor states this is fixed in 5.19.2 (unaffected)
Vendor states this is fixed in 6.0 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7d69764fa3442c7615a75c6b5c02eaa1f274bccf
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/94681e289bf5d10c9db9db143d1a22d8717205c5
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a8a7e3ced362b88b659ab54239990196ff975982

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card