{"id":"CVE-2021-46940","aliases":["CVE-2021-46940"],"related":[],"kind":"vulnerability","state":"published","title":"tools/power turbostat: Fix offset overflow issue in index converting","summary":"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 < 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 < 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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: herramientas/turbostat de potencia: soluciona el problema de desbordamiento de compensación en la conversión de índice. La función idx_to_offset() devuelve el tipo int (32 bits firmado), pero MSR_PKG_ENERGY_STAT es u32 y se interpretaría como negativo. número. El resultado final es que alcanza la verificación if (offset &lt; 0) en update_msr_sum(), lo que evita que la devolución de llamada del temporizador actualice la estadística en segundo plano cuando se utilizan duraciones prolongadas. Existe un problema similar en offset_to_idx() y update_msr_sum(). Solucione este problema convirtiendo 'int' a 'off_t' en consecuencia.","source":"nvd"}],"published":"2024-02-27T18:40:28.063Z","modified":"2026-06-17T04:15:55.530Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-190"],"affected":[{"ranges":[{"type":"git","introduced":"9972d5d84d76982606806b2ce887f70c2f8ba60a","fixed":"ea6803ff2cd1a2d7d880256bf562172b708a76ff","status":"affected"},{"type":"git","introduced":"9972d5d84d76982606806b2ce887f70c2f8ba60a","fixed":"dbdf22fc825fdb1d97f23230064e0f9819471628","status":"affected"},{"type":"git","introduced":"9972d5d84d76982606806b2ce887f70c2f8ba60a","fixed":"337b1546cde87fb8588ddaedf0201b769baa572a","status":"affected"},{"type":"git","introduced":"9972d5d84d76982606806b2ce887f70c2f8ba60a","fixed":"13a779de4175df602366d129e41782ad7168cef0","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.10","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.10","status":"unaffected"},{"type":"semver","introduced":"5.10.36","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.11.20","lastAffected":"5.11.*","status":"unaffected"},{"type":"semver","introduced":"5.12.3","lastAffected":"5.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.10.0","fixed":"5.10.36"},{"status":"affected","introduced":"5.11.0","fixed":"5.11.20"},{"status":"affected","introduced":"5.12.0","fixed":"5.12.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ea6803ff2cd1a2d7d880256bf562172b708a76ff","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dbdf22fc825fdb1d97f23230064e0f9819471628","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/337b1546cde87fb8588ddaedf0201b769baa572a","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/13a779de4175df602366d129e41782ad7168cef0","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-03-05T20:11:09.167Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-46940","url":"https://www.cve.org/CVERecord?id=CVE-2021-46940","licence":"CVE Terms of Use","modified":"2026-05-11T13:44:51.013Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-46940","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-46940","licence":"Public domain","modified":"2026-06-17T04:15:55.530Z"}],"updatedAt":"2026-11-25T22:58:08.578Z","epss":{"score":0.00222,"percentile":0.13652,"date":"2026-12-01T12:00:22.000Z"}}