CVE-2022-49612

Severity CVSS v4.0:
Pending analysis
Type:
CWE-787 Out-of-bounds Write
Publication date:
26/02/2025
Last modified:
23/10/2025

Description

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

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.17 (including) 5.18.13 (excluding)
cpe:2.3:o:linux:linux_kernel:5.19:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc6:*:*:*:*:*:*