{"id":"CVE-2022-49612","aliases":["CVE-2022-49612"],"related":[],"kind":"vulnerability","state":"published","title":"power: supply: core: Fix boundary conditions in interpolation","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\npower: supply: core: Fix boundary conditions in interpolation\n\nThe functions power_supply_temp2resist_simple and power_supply_ocv2cap_simple\nhandle boundary conditions incorrectly.\nThe change was introduced in a4585ba2050f460f749bbaf2b67bd56c41e30283\n(\"power: supply: core: Use library interpolation\").\nThere are two issues: First, the lines \"high = i - 1\" and \"high = i\" in ocv2cap\nhave the wrong order compared to temp2resist. As a consequence, ocv2cap\nsets high=-1 if ocv>table[0].ocv, which causes an out-of-bounds read.\nSecond, the logic of temp2resist is also not correct.\nConsider the case table[] = {{20, 100}, {10, 80}, {0, 60}}.\nFor temp=5, we expect a resistance of 70% by interpolation.\nHowever, temp2resist sets high=low=2 and returns 60.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\npower: supply: core: Fix boundary conditions in interpolation\n\nThe functions power_supply_temp2resist_simple and power_supply_ocv2cap_simple\nhandle boundary conditions incorrectly.\nThe change was introduced in a4585ba2050f460f749bbaf2b67bd56c41e30283\n(\"power: supply: core: Use library interpolation\").\nThere are two issues: First, the lines \"high = i - 1\" and \"high = i\" in ocv2cap\nhave the wrong order compared to temp2resist. As a consequence, ocv2cap\nsets high=-1 if ocv>table[0].ocv, which causes an out-of-bounds read.\nSecond, the logic of temp2resist is also not correct.\nConsider the case table[] = {{20, 100}, {10, 80}, {0, 60}}.\nFor temp=5, we expect a resistance of 70% by interpolation.\nHowever, temp2resist sets high=low=2 and returns 60.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: power: supply: core: Fix boundary conditions in interpolation The functions power_supply_temp2resist_simple and power_supply_ocv2cap_simple handle boundary conditions incorrectly. El cambio se introdujo en a4585ba2050f460f749bbaf2b67bd56c41e30283 (\"power: supply: core: Use library interpolation\"). Hay dos problemas: primero, las líneas \"high = i - 1\" y \"high = i\" en ocv2cap tienen el orden incorrecto en comparación con temp2resist. Como consecuencia, ocv2cap establece high=-1 si ocv&gt;table[0].ocv, lo que provoca una lectura fuera de los límites. Segundo, la lógica de temp2resist tampoco es correcta. Considere el caso table[] = {{20, 100}, {10, 80}, {0, 60}}. Para temp=5, esperamos una resistencia del 70 % por interpolación. Sin embargo, temp2resist establece high=low=2 y devuelve 60.","source":"nvd"}],"published":"2025-02-26T02:23:34.263Z","modified":"2026-11-05T20:17:07.647Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"a4585ba2050f460f749bbaf2b67bd56c41e30283","fixed":"a762cee5d933fe4e2e1b773d60fc74fb8248d8c4","status":"affected"},{"type":"git","introduced":"a4585ba2050f460f749bbaf2b67bd56c41e30283","fixed":"093d27bb6f2d1963f927ef59c9a2d37059175426","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.17","status":"unaffected"},{"type":"semver","introduced":"5.18.13","lastAffected":"5.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.19","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.17","fixed":"5.18.13"},{"status":"affected","version":"5.19"},{"status":"affected","version":"5.19"},{"status":"affected","version":"5.19"},{"status":"affected","version":"5.19"},{"status":"affected","version":"5.19"},{"status":"affected","version":"5.19"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/a762cee5d933fe4e2e1b773d60fc74fb8248d8c4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/093d27bb6f2d1963f927ef59c9a2d37059175426","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T19:46:19.477Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49612","url":"https://www.cve.org/CVERecord?id=CVE-2022-49612","licence":"CVE Terms of Use","modified":"2026-11-05T19:49:40.851Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49612","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49612","licence":"Public domain","modified":"2026-11-05T20:17:07.647Z"}],"updatedAt":"2026-11-25T22:58:20.759Z","epss":{"score":0.00278,"percentile":0.21674,"date":"2026-12-01T12:00:22.000Z"}}