Executive brief
The Linux kernel's bq25890 battery charger driver contains a memory management flaw where a reference to a secondary charger device is not properly released. This can cause kernel memory to remain in use even after the driver is unloaded or probe operations fail, gradually consuming system resources and potentially leading to kernel instability or denial of service over time.
Technical details
A resource leak exists in the bq25890_fw_probe() function within the Linux kernel's power supply subsystem. When acquiring a reference to a secondary charger via power_supply_get_by_name(), the code fails to release this reference in error paths after a successful intermediate return, including failures in subsequent initialization steps like bq25890_hw_init(), or on driver detach. The fix implements device-managed resource cleanup by registering a devm cleanup action immediately after acquiring the secondary charger reference, ensuring automatic release in all failure and unload scenarios. No authentication or user interaction is required; the leak occurs at driver probe/detach time.
Affected products
- Linux Linux Kernel versions prior to the fix commit 238320ad029a3eedabb86286a28cab55bca629b9
Timeline
- 2026-09-11: disclosed
- 2026-09-07: patched: upstream patch commit 238320ad029a3eedabb86286a28cab55bca629b9