CVE-2022-49612

power: supply: core: Fix boundary conditions in interpolation

HIGH
7.8
CVSS Score
Published: February 26, 2025 at 02:23 AM UTC
Updated: June 17, 2026 at 05:18 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
HIGH7.8
Exploit prediction
EPSS 0.3%

Description

In the Linux kernel, the following vulnerability has been resolved: power: supply: core: Fix boundary conditions in interpolation The functions power_supply_temp2resist_simple and power_supply_ocv2cap_simple handle boundary conditions incorrectly. The change was introduced in a4585ba2050f460f749bbaf2b67bd56c41e30283 ("power: supply: core: Use library interpolation"). There are two issues: First, the lines "high = i - 1" and "high = i" in ocv2cap have the wrong order compared to temp2resist. As a consequence, ocv2cap sets high=-1 if ocv>table[0].ocv, which causes an out-of-bounds read. Second, the logic of temp2resist is also not correct. Consider the case table[] = {{20, 100}, {10, 80}, {0, 60}}. For temp=5, we expect a resistance of 70% by interpolation. However, temp2resist sets high=low=2 and returns 60.

Affected

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

5.17 ≤ v < 5.18.135.17 ≤ v < 5.195.175.19 rc15.19 rc25.19 rc35.19 rc45.19 rc55.19 rc6a4585ba2050f460f749bbaf2b67bd56c41e30283
Vendor states this is fixed in 093d27bb6f2d1963f927ef59c9a2d37059175426 (fixed)
Vendor states this is fixed in a762cee5d933fe4e2e1b773d60fc74fb8248d8c4 (fixed)
Vendor states this is fixed in 5.17 (unaffected)
Vendor states this is fixed in 5.18.13 (unaffected)
Vendor states this is fixed in 5.19 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/093d27bb6f2d1963f927ef59c9a2d37059175426
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a762cee5d933fe4e2e1b773d60fc74fb8248d8c4

CVSS

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

Quick Info

StatusANALYZED
CWE
CWE-787

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