CVE-2022-50189: tools/power turbostat: Fix file pointer leak
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]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.0.2-1 - Compensating control
In tools/power/x86/turbostat/turbostat.c, call fclose(fp) before the early return taken when fscanf fails, preventing the open file pointer leak.
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50189?
CVE-2022-50189 has a severity rating that indicates it is a low-risk vulnerability due to the nature of the file pointer leak.
How do I fix CVE-2022-50189?
To fix CVE-2022-50189, ensure you update your Linux kernel to the latest patched version provided by your distribution.
What type of software is affected by CVE-2022-50189?
CVE-2022-50189 affects the Linux kernel, specifically the tools/power turbostat component.
What is the impact of CVE-2022-50189?
The impact of CVE-2022-50189 is primarily the potential resource leakage from an open file pointer if fscanf fails.
When was CVE-2022-50189 disclosed?
CVE-2022-50189 was disclosed alongside a fix in the recent updates to the Linux kernel.