mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 5.10/5.15 0/2] power: supply: Fix supplied_from allocation
@ 2026-11-02 11:12 Mikhail Dmitrichenko
  2026-11-02 11:12 ` [PATCH 5.10/5.15 1/2] power: supply: Fix typo in power_supply_check_supplies Mikhail Dmitrichenko
  2026-11-02 11:12 ` [PATCH 5.10/5.15 2/2] power: supply: core: fix supplied_from allocations Mikhail Dmitrichenko
  0 siblings, 2 replies; 3+ messages in thread
From: Mikhail Dmitrichenko @ 2026-11-02 11:12 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman
  Cc: Mikhail Dmitrichenko, Sasha Levin, Schspa Shi, Lucas Tsai,
	Sebastian Reichel, Rhyland Klein, Anton Vorontsov, linux-pm,
	linux-kernel, lvc-project

Please apply this series to 5.10.y and 5.15.y to fix CVE-2026-74271.

When a Device Tree power-supplies property lists more than one supplier,
power_supply_check_supplies() allocates space for only one pointer in
psy->supplied_from. The subsequent allocation through *psy->supplied_from
does not extend that array, and populating the second supplier writes
past its end. Patch 2 allocates a single array large enough for all the
supplier pointers.

Patch 1, upstream commit 966f6551173a ("power: supply: Fix typo in
power_supply_check_supplies"), adjusts the sizeof expressions used by
these allocations. With this small prerequisite in place, the fix in
ba61aed9a346 ("power: supply: core: fix supplied_from allocations")
applies unchanged to both branches. The fix is already in 6.1.y and
newer stable branches.

The series applies cleanly to v5.10.273 and v5.15.224.
Build-tested only.

Schspa Shi (1):
  power: supply: Fix typo in power_supply_check_supplies

Lucas Tsai (1):
  power: supply: core: fix supplied_from allocations

 drivers/power/supply/power_supply_core.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

-- 
2.43.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-02 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 11:12 [PATCH 5.10/5.15 0/2] power: supply: Fix supplied_from allocation Mikhail Dmitrichenko
2026-11-02 11:12 ` [PATCH 5.10/5.15 1/2] power: supply: Fix typo in power_supply_check_supplies Mikhail Dmitrichenko
2026-11-02 11:12 ` [PATCH 5.10/5.15 2/2] power: supply: core: fix supplied_from allocations Mikhail Dmitrichenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®