CVE-2021-46940

tools/power turbostat: Fix offset overflow issue in index converting

MEDIUM
5.5
CVSS Score
Published: February 27, 2024 at 06:40 PM UTC
Updated: June 17, 2026 at 04:15 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: tools/power turbostat: Fix offset overflow issue in index converting The idx_to_offset() function returns type int (32-bit signed), but MSR_PKG_ENERGY_STAT is u32 and would be interpreted as a negative number. The end result is that it hits the if (offset < 0) check in update_msr_sum() which prevents the timer callback from updating the stat in the background when long durations are used. The similar issue exists in offset_to_idx() and update_msr_sum(). Fix this issue by converting the 'int' to 'off_t' accordingly.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.10 ≤ v < 5.10.365.10 ≤ v < 5.11.205.10 ≤ v < 5.12.35.10 ≤ v < 5.135.10.0 ≤ v < 5.10.365.11.0 ≤ v < 5.11.205.12.0 ≤ v < 5.12.35.109972d5d84d76982606806b2ce887f70c2f8ba60a
Vendor states this is fixed in 13a779de4175df602366d129e41782ad7168cef0 (fixed)
Vendor states this is fixed in 337b1546cde87fb8588ddaedf0201b769baa572a (fixed)
Vendor states this is fixed in dbdf22fc825fdb1d97f23230064e0f9819471628 (fixed)
Vendor states this is fixed in ea6803ff2cd1a2d7d880256bf562172b708a76ff (fixed)
Vendor states this is fixed in 5.10 (unaffected)
Vendor states this is fixed in 5.10.36 (unaffected)
Vendor states this is fixed in 5.11.20 (unaffected)
Vendor states this is fixed in 5.12.3 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/13a779de4175df602366d129e41782ad7168cef0
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/337b1546cde87fb8588ddaedf0201b769baa572a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/dbdf22fc825fdb1d97f23230064e0f9819471628
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ea6803ff2cd1a2d7d880256bf562172b708a76ff

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-190

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card