# CVE-2022-50189: tools/power turbostat: Fix file pointer leak

- Severity: High 7.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 15% of CVEs (2026-12-02)
- Published: 2025-06-18T11:03:35.532Z
- Modified: 2026-06-17T05:22:56.410Z
- Weaknesses: CWE-772
- Assigned by: Linux

## Description

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]

(As written by CVE List.)

## Affected

- Linux Linux: from eae97e053fe306edbbe60c934031edf9a8affd3f before 2ebf6f5946817f33fb33e613e359229e98164eb3; from eae97e053fe306edbbe60c934031edf9a8affd3f before 5e5fd36c58d6c820f7292ee492c3731c9a104a41; 5.19 (not affected: before 5.19; from 5.19.2 up to 5.19.*; from 6.0 up to *)
- linux linux_kernel: from 5.19 before 5.19.2

## References

- <https://git.kernel.org/stable/c/2ebf6f5946817f33fb33e613e359229e98164eb3> (patch)
- <https://git.kernel.org/stable/c/5e5fd36c58d6c820f7292ee492c3731c9a104a41> (patch)

## Sources

- CVE List: [CVE-2022-50189](https://www.cve.org/CVERecord?id=CVE-2022-50189), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-50189](https://nvd.nist.gov/vuln/detail/CVE-2022-50189), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-50189 · Whole record: https://cve.day/CVE-2022-50189.json · Rebuilt by cve.day 2026-11-25T22:58:21.096Z
