power: supply: bq25890: Fix power_supply reference leak
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
power: supply: bq25890: Fix power_supply reference leak
bq25890_fw_probe() acquires a reference to a secondary charger using power_supply_get_by_name(), but the reference is not released on later probe failures or on driver detach.
In particular, failures after bq25890_fw_probe() returns successfully, such as a failure in bq25890_hw_init(), also leak the reference.
Register a device-managed cleanup action immediately after acquiring the secondary charger. This releases the reference on all subsequent probe failures and on driver detach.
Found by code review.
From the CVE record · Linux
The bq25890 power supply driver can leak a reference to a secondary charger when a later probe step fails or the driver detaches. The input does not describe an attacker path, required access, or user interaction; the issue was found by code review.
Engineers running Linux kernels with the bq25890 power supply driver should check their versions; affected versions are not specified.