CVE-2022-50649
Description
In the Linux kernel, the following vulnerability has been resolved:
power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type()
ADP5061_CHG_STATUS_1_CHG_STATUS is masked with 0x07, which means a length of 8, but adp5061_chg_type array size is 4, may end up reading 4 elements beyond the end of the adp5061_chg_type[] array.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Out-of-bounds read in Linux kernel's ADP5061 charger driver due to insufficient array size check leads to potential memory leak.
Vulnerability
In the Linux kernel's power supply subsystem, the adp5061_get_chg_type() function in the ADP5061 charger driver performs a masked read of a status register without validating the result against the size of the lookup array. The status field ADP5061_CHG_STATUS_1_CHG_STATUS is masked with 0x07, allowing values 0-7, but the adp5061_chg_type[] array only has 4 elements. This mismatch can cause an out-of-bounds read when the masked value is >= 4 [1][2][3].
Exploitation
An attacker would need the ability to influence the charger status register, likely through physical access or a compromised I2C controller. The vulnerability is triggered during normal operation when the driver reads the charge type. No special privileges or authentication are required beyond the ability to interact with the hardware.
Impact
A successful out-of-bounds read can lead to disclosure of sensitive kernel memory if the read accesses unintended data. Depending on the surrounding memory layout, this could result in information leakage or potentially a system crash (denial of service). The impact is limited to the kernel's address space.
Mitigation
Patches have been incorporated into the Linux kernel stable releases. The fix involves adding a bounds check on the array index before accessing adp5061_chg_type[]. Users should update their kernel to a version containing the patch [1][2][3].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
724a0be36e9a23376a0cf138d89f305a714187c8bc374659d038e4aa71281dc52b73d3acd9d47e01b9d80Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- git.kernel.org/stable/c/038e4aa71281d0cbc8aeb56ba05ff7fc5653a106nvd
- git.kernel.org/stable/c/24a0be36e9a21f63de2e6088607e689e59ec15f4nvd
- git.kernel.org/stable/c/3376a0cf138dfc90b449fde541ca228a33e1c143nvd
- git.kernel.org/stable/c/7c8bc374659de19d846f7cab3eda9ebdb005c4ccnvd
- git.kernel.org/stable/c/89f305a71418591cdda18180f712f91c9820f03bnvd
- git.kernel.org/stable/c/9d47e01b9d807808224347935562f7043a358054nvd
- git.kernel.org/stable/c/dc52b73d3acd676ccbb440fcec617c547b903af2nvd
News mentions
0No linked articles in our index yet.