From: Mikhail Dmitrichenko <mdmitrichenko@astralinux.ru>
To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mikhail Dmitrichenko <mdmitrichenko@astralinux.ru>,
Sasha Levin <sashal@kernel.org>, Schspa Shi <schspa@gmail.com>,
Lucas Tsai <lucas_tsai@richtek.com>,
Sebastian Reichel <sre@kernel.org>,
Rhyland Klein <rklein@nvidia.com>,
Anton Vorontsov <anton@enomsg.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: [PATCH 5.10/5.15 0/2] power: supply: Fix supplied_from allocation
Date: Mon, 2 Nov 2026 14:12:30 +0300 [thread overview]
Message-ID: <20261102111233.383-1-mdmitrichenko@astralinux.ru> (raw)
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
next reply other threads:[~2026-11-02 11:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 11:12 Mikhail Dmitrichenko [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261102111233.383-1-mdmitrichenko@astralinux.ru \
--to=mdmitrichenko@astralinux.ru \
--cc=anton@enomsg.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lucas_tsai@richtek.com \
--cc=lvc-project@linuxtesting.org \
--cc=rklein@nvidia.com \
--cc=sashal@kernel.org \
--cc=schspa@gmail.com \
--cc=sre@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®