[PATCH 0/6] power: supply: max77759: UAF, charger ABI, input limit, and supplier fixes
From: André Draszik
Date: Fri Nov 27 2026 - 14:10:00 EST
Hi,
Patches 1-5 are self-contained fixes for stable backporting with no
external dependencies. Patch 6 fixes supplier tracking to follow the
DT power-supplies relation instead of matching any "tcpm-source*"
supply by name; it carries Cc: stable+noautosel@xxxxxxxxxx because it
requires v7.3+ power_supply_desc.init, the v7.4+ in-tree DTS
power-supplies property, and the core fixes listed below.
Summary:
- Fix a use-after-free of chg->tcpm_psy when the TCPM supplier unbinds.
- Report and program constant charge voltage in microvolts instead of
millivolts.
- Disable AUTOIBUS alongside CHGIN_ILIM instead of relying on firmware
state.
- Notify userspace and downstream consumers when supplier updates change
the charger mode or input current limit.
- Sync existing supplier state at the end of probe so events emitted
before probe or charger module reload are not missed.
- Follow the DT power-supplies relation via .external_power_changed
instead of matching "tcpm-source" via the global notifier.
Prerequisites:
- power: supply: core: give each supply's epc_sem its own lockdep class
https://lore.kernel.org/r/20261125-power-supply-epc-lockdep-key-v1-1-c8a41b8a4470@xxxxxxxxx
Required for patch 6, which calls
power_supply_get_property_from_supplier() from
.external_power_changed and would otherwise trigger a PROVE_LOCKING
false-positive recursive-lock warning on the first supplier event.
- power: supply: core: fix use-after-free of supplier names
https://lore.kernel.org/r/20261126-psy-core-supplier-fixes-v1-1-33de6aa53cd8@xxxxxxxxxx
Fixes a pre-existing power_supply core UAF on supplier unbind/reload
whenever DT power-supplies is populated (since the base driver already
passes psy_cfg.fwnode), which is hit during supplier reload testing
and by patch 6's supplier lookups.
Tested on Pixel 6 (Oriole) with USB-C charging, tcpci_maxim and
max77759_charger unload/reload cycles, and lockdep enabled.
Cheers
Andre'
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
André Draszik (6):
power: supply: max77759: fix use-after-free of tcpm_psy
power: supply: max77759: report charge voltage in uV
power: supply: max77759: disable AUTOIBUS for CHGIN_ILIM
power: supply: max77759: notify on mode or input limit change
power: supply: max77759: sync supplier state at probe
power: supply: max77759: follow the supplier from DT
drivers/power/supply/max77759_charger.c | 244 +++++++++++++-------------------
include/linux/mfd/max77759.h | 1 +
2 files changed, 100 insertions(+), 145 deletions(-)
---
base-commit: 3191063649dbf7c0d0b768e1f3655e4c5fc6edb5
change-id: 20261125-max77759-charger-fixes-a1cb573d50a7
Best regards,
--
André Draszik <andre.draszik@xxxxxxxxxx>