power: supply: charger-manager: fix refcount leak in is_full_charged()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e132fc6bb89bd307cfcdb8ba24afcd1985261485 · < 193e6471e985c2f25d09b3fe96ec52f4eab89bd4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
power: supply: charger-manager: fix refcount leak in is_full_charged()
In is_full_charged(), power_supply_get_by_name() is called to obtain a reference to the fuel_gauge power supply. If the voltage check (uV >= desc->fullbatt_uV) succeeds, the function returns true directly without releasing the reference, leaking the refcount.
Fix this by setting a flag and jumping to the out label where power_supply_put() properly drops the reference.
From the CVE record · Linux
The Linux kernel’s charger-manager leaks a power-supply reference when is_full_charged() finds the battery voltage at or above the full-battery threshold. The input does not describe how an attacker could trigger this condition or whether access, authentication, or user interaction is required.
Operators running Linux kernels with the affected charger-manager code should check their kernel versions against the vendor advisory; affected versions are not specified.