CVE-2024-57792
Published: 11 January 2025
Description
In the Linux kernel, the following vulnerability has been resolved: power: supply: gpio-charger: Fix set charge current limits Fix set charge current limits for devices which allow to set the lowest charge current limit to be greater zero. If requested charge current limit is below lowest limit, the index equals current_limit_map_size which leads to accessing memory beyond allocated memory.
Security Summary
CVE-2024-57792 is a vulnerability in the Linux kernel's power supply gpio-charger driver. The issue arises when setting charge current limits for devices that enforce a lowest limit greater than zero. If a requested charge current limit falls below this threshold, the driver calculates an array index equal to the current_limit_map_size, resulting in an out-of-bounds memory access beyond the allocated buffer.
The vulnerability carries a CVSS v3.1 base score of 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H). A local attacker with low privileges can exploit it by supplying an invalid charge current limit value, potentially achieving high-impact confidentiality, integrity, and availability effects such as arbitrary code execution, memory corruption, or kernel crashes.
Mitigation is available through upstream patches in the Linux kernel stable trees. The referenced commits—such as 13eb3cae1d8e23cce96c095abe34da8028c09ac5, 6abbbd8286b6f944eecf3c74444c138590135211, afc6e39e824ad0e44b2af50a97885caec8d213d1, b29c7783ac1fe36d639c089cf471ac7a46df05f0, and c3703d9340ca2820e1ac63256f4b423ea8559831—correct the index calculation in the set charge current limits function to prevent the out-of-bounds access. Security practitioners should update affected kernels accordingly.
Details
- CWE(s)