CVE-2022-50189 (GCVE-0-2022-50189)
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: tools/power turbostat: Fix file pointer leak Currently if a fscanf fails then an early return leaks an open file pointer. Fix this by fclosing the file before the return. Detected using static analysis with cppcheck: tools/power/x86/turbostat/turbostat.c:2039:3: error: Resource leak: fp [resourceLeak]
Impacted products
Vendor Product Version
Linux Linux Version: eae97e053fe306edbbe60c934031edf9a8affd3f
Version: eae97e053fe306edbbe60c934031edf9a8affd3f
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "tools/power/x86/turbostat/turbostat.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "2ebf6f5946817f33fb33e613e359229e98164eb3",
              "status": "affected",
              "version": "eae97e053fe306edbbe60c934031edf9a8affd3f",
              "versionType": "git"
            },
            {
              "lessThan": "5e5fd36c58d6c820f7292ee492c3731c9a104a41",
              "status": "affected",
              "version": "eae97e053fe306edbbe60c934031edf9a8affd3f",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "tools/power/x86/turbostat/turbostat.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.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.19.2",
                  "versionStartIncluding": "5.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0",
                  "versionStartIncluding": "5.19",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ntools/power turbostat: Fix file pointer leak\n\nCurrently if a fscanf fails then an early return leaks an open\nfile pointer. Fix this by fclosing the file before the return.\nDetected using static analysis with cppcheck:\n\ntools/power/x86/turbostat/turbostat.c:2039:3: error: Resource leak: fp [resourceLeak]"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-06-18T11:03:35.532Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/2ebf6f5946817f33fb33e613e359229e98164eb3"
        },
        {
          "url": "https://git.kernel.org/stable/c/5e5fd36c58d6c820f7292ee492c3731c9a104a41"
        }
      ],
      "title": "tools/power turbostat: Fix file pointer leak",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50189",
    "datePublished": "2025-06-18T11:03:35.532Z",
    "dateReserved": "2025-06-18T10:57:27.427Z",
    "dateUpdated": "2025-06-18T11:03:35.532Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50189\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-06-18T11:15:49.490\",\"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\\ntools/power turbostat: Fix file pointer leak\\n\\nCurrently if a fscanf fails then an early return leaks an open\\nfile pointer. Fix this by fclosing the file before the return.\\nDetected using static analysis with cppcheck:\\n\\ntools/power/x86/turbostat/turbostat.c:2039:3: error: Resource leak: fp [resourceLeak]\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: tools/power turbostat: Correcci\u00f3n de fuga de puntero de archivo. Actualmente, si un fscanf falla, un retorno anticipado filtra un puntero de archivo abierto. Se soluciona cerrando el archivo antes del retorno. Detectado mediante an\u00e1lisis est\u00e1tico con cppcheck: tools/power/x86/turbostat/turbostat.c:2039:3: error: Fuga de recursos: fp [resourceLeak]\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2ebf6f5946817f33fb33e613e359229e98164eb3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5e5fd36c58d6c820f7292ee492c3731c9a104a41\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}