{"id":"CVE-2021-46940","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ntools/power turbostat: Fix offset overflow issue in index converting\n\nThe idx_to_offset() function returns type int (32-bit signed), but\nMSR_PKG_ENERGY_STAT is u32 and would be interpreted as a negative number.\nThe end result is that it hits the if (offset \u003c 0) check in update_msr_sum()\nwhich prevents the timer callback from updating the stat in the background when\nlong durations are used. The similar issue exists in offset_to_idx() and\nupdate_msr_sum(). Fix this issue by converting the 'int' to 'off_t' accordingly.","modified":"2026-03-15T22:42:41.323309Z","published":"2024-02-27T19:04:05.927Z","references":[{"type":"FIX","url":"https://git.kernel.org/stable/c/337b1546cde87fb8588ddaedf0201b769baa572a"},{"type":"FIX","url":"https://git.kernel.org/stable/c/dbdf22fc825fdb1d97f23230064e0f9819471628"},{"type":"FIX","url":"https://git.kernel.org/stable/c/ea6803ff2cd1a2d7d880256bf562172b708a76ff"},{"type":"FIX","url":"https://git.kernel.org/stable/c/13a779de4175df602366d129e41782ad7168cef0"}],"affected":[{"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-46940.json","unresolved_ranges":[{"events":[{"introduced":"5.10.0"},{"fixed":"5.10.36"}]},{"events":[{"introduced":"5.11.0"},{"fixed":"5.11.20"}]},{"events":[{"introduced":"5.12.0"},{"fixed":"5.12.3"}]}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}