{"id":"CVE-2022-50189","state":"PUBLISHED","title":"tools/power turbostat: Fix file pointer leak","description":"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]","publishedAt":"2025-06-18T11:03:35.532Z","updatedAt":"2026-05-11T19:14:30.814Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"eae97e053fe306edbbe60c934031edf9a8affd3f","status":"affected","lessThan":"2ebf6f5946817f33fb33e613e359229e98164eb3","versionType":"git"},{"version":"eae97e053fe306edbbe60c934031edf9a8affd3f","status":"affected","lessThan":"5e5fd36c58d6c820f7292ee492c3731c9a104a41","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["tools/power/x86/turbostat/turbostat.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"5.19.2","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["tools/power/x86/turbostat/turbostat.c"]}],"references":["https://git.kernel.org/stable/c/2ebf6f5946817f33fb33e613e359229e98164eb3","https://git.kernel.org/stable/c/5e5fd36c58d6c820f7292ee492c3731c9a104a41"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50189.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50189","state":"PUBLISHED","datePublished":"2025-06-18T11:03:35.532Z","dateUpdated":"2026-05-11T19:14:30.814Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-06-18T10:57:27.427Z"},"containers":{"cna":{"title":"tools/power turbostat: Fix file pointer leak","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]"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"eae97e053fe306edbbe60c934031edf9a8affd3f","status":"affected","lessThan":"2ebf6f5946817f33fb33e613e359229e98164eb3","versionType":"git"},{"version":"eae97e053fe306edbbe60c934031edf9a8affd3f","status":"affected","lessThan":"5e5fd36c58d6c820f7292ee492c3731c9a104a41","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["tools/power/x86/turbostat/turbostat.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"5.19.2","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["tools/power/x86/turbostat/turbostat.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/2ebf6f5946817f33fb33e613e359229e98164eb3"},{"url":"https://git.kernel.org/stable/c/5e5fd36c58d6c820f7292ee492c3731c9a104a41"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:14:30.814Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"5.19.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}