CVE-2022-50170 (GCVE-0-2022-50170)
Vulnerability from cvelistv5
Published
2025-06-18 11:03
Modified
2025-06-18 11:03
Severity ?
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/
Impacted products
Vendor Product Version
Linux Linux Version: bd8b222a0002872bb229f6c755672a093ef93ea4
Version: a02353f491622e49c7ddedc6a6dc4f1d6ed2150a
Version: a02353f491622e49c7ddedc6a6dc4f1d6ed2150a
Version: 80cf4932c2545bc231e933d869511008c36af1e0
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "lib/kunit/executor.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "a8a7e3ced362b88b659ab54239990196ff975982",
              "status": "affected",
              "version": "bd8b222a0002872bb229f6c755672a093ef93ea4",
              "versionType": "git"
            },
            {
              "lessThan": "7d69764fa3442c7615a75c6b5c02eaa1f274bccf",
              "status": "affected",
              "version": "a02353f491622e49c7ddedc6a6dc4f1d6ed2150a",
              "versionType": "git"
            },
            {
              "lessThan": "94681e289bf5d10c9db9db143d1a22d8717205c5",
              "status": "affected",
              "version": "a02353f491622e49c7ddedc6a6dc4f1d6ed2150a",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "80cf4932c2545bc231e933d869511008c36af1e0",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "lib/kunit/executor.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.19"
            },
            {
              "lessThan": "5.19",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.18.*",
              "status": "unaffected",
              "version": "5.18.18",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.19.*",
              "status": "unaffected",
              "version": "5.19.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.0",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.18.18",
                  "versionStartIncluding": "5.18.3",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19.2",
                  "versionStartIncluding": "5.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0",
                  "versionStartIncluding": "5.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "5.17.14",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nkunit: executor: Fix a memory leak on failure in kunit_filter_tests\n\nIt\u0027s possible that memory allocation for \u0027filtered\u0027 will fail, but for the\ncopy of the suite to succeed. In this case, the copy could be leaked.\n\nProperly free \u0027copy\u0027 in the error case for the allocation of \u0027filtered\u0027\nfailing.\n\nNote that there may also have been a similar issue in\nkunit_filter_subsuites, before it was removed in \"kunit: flatten\nkunit_suite*** to kunit_suite** in .kunit_test_suites\".\n\nThis was reported by clang-analyzer via the kernel test robot, here:\nhttps://lore.kernel.org/all/c8073b8e-7b9e-0830-4177-87c12f16349c@intel.com/\n\nAnd by smatch via Dan Carpenter and the kernel test robot:\nhttps://lore.kernel.org/all/202207101328.ASjx88yj-lkp@intel.com/"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-06-18T11:03:23.031Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/a8a7e3ced362b88b659ab54239990196ff975982"
        },
        {
          "url": "https://git.kernel.org/stable/c/7d69764fa3442c7615a75c6b5c02eaa1f274bccf"
        },
        {
          "url": "https://git.kernel.org/stable/c/94681e289bf5d10c9db9db143d1a22d8717205c5"
        }
      ],
      "title": "kunit: executor: Fix a memory leak on failure in kunit_filter_tests",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50170",
    "datePublished": "2025-06-18T11:03:23.031Z",
    "dateReserved": "2025-06-18T10:57:27.426Z",
    "dateUpdated": "2025-06-18T11:03:23.031Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50170\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-06-18T11:15:47.340\",\"lastModified\":\"2025-06-18T13:47:40.833\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nkunit: executor: Fix a memory leak on failure in kunit_filter_tests\\n\\nIt\u0027s possible that memory allocation for \u0027filtered\u0027 will fail, but for the\\ncopy of the suite to succeed. In this case, the copy could be leaked.\\n\\nProperly free \u0027copy\u0027 in the error case for the allocation of \u0027filtered\u0027\\nfailing.\\n\\nNote that there may also have been a similar issue in\\nkunit_filter_subsuites, before it was removed in \\\"kunit: flatten\\nkunit_suite*** to kunit_suite** in .kunit_test_suites\\\".\\n\\nThis was reported by clang-analyzer via the kernel test robot, here:\\nhttps://lore.kernel.org/all/c8073b8e-7b9e-0830-4177-87c12f16349c@intel.com/\\n\\nAnd by smatch via Dan Carpenter and the kernel test robot:\\nhttps://lore.kernel.org/all/202207101328.ASjx88yj-lkp@intel.com/\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: kunit: executor: Se corrige una fuga de memoria en caso de fallo en kunit_filter_tests. Es posible que la asignaci\u00f3n de memoria para \\\"filtered\\\" falle, pero que la copia de la suite se realice correctamente. En este caso, la copia podr\u00eda sufrir una fuga. Libere correctamente \\\"copy\\\" en caso de error en caso de fallo en la asignaci\u00f3n de \\\"filtered\\\". Tenga en cuenta que tambi\u00e9n podr\u00eda haber existido un problema similar en kunit_filter_subsuites, antes de que se eliminara en \\\"kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites\\\". Esto fue informado por clang-analyzer a trav\u00e9s del robot de pruebas del kernel, aqu\u00ed: https://lore.kernel.org/all/c8073b8e-7b9e-0830-4177-87c12f16349c@intel.com/ Y por smatch a trav\u00e9s de Dan Carpenter y el robot de pruebas del kernel: https://lore.kernel.org/all/202207101328.ASjx88yj-lkp@intel.com/\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/7d69764fa3442c7615a75c6b5c02eaa1f274bccf\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/94681e289bf5d10c9db9db143d1a22d8717205c5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a8a7e3ced362b88b659ab54239990196ff975982\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…