From: Marco Scardovi <scardracs@disroot.org>
To: andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com
Cc: brgl@kernel.org, linusw@kernel.org, linux-acpi@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v5 0/2] gpiolib: acpi: Add bounds-checking and address validation
Date: Tue, 2 Jun 2026 13:32:18 +0200 [thread overview]
Message-ID: <20260602113529.52570-1-scardracs@disroot.org> (raw)
Hi all,
after some thinking and following Mika and Andy's reviews I've come up with
a new version of the series.
This series adds defensive hardening in the ACPI GPIO path, focusing on
bounds checking and safe handling of GPIO resources and ACPI addresses.
Drop the previously proposed GPIO connection handling changes in the ACPI
OperationRegion path, following review feedback.
This also closes the old threads completely and drop my @gmail account
as it is not related to my linux stuffs.
Changes in v5:
* Add bounds checking for GPIO pin resource accesses in ACPI GPIO helpers
to prevent out-of-bounds access on malformed or empty pin tables.
* Validate ACPI address in acpi_gpio_adr_space_handler() before converting
it to a GPIO index, preventing truncation-induced wraparound.
* Improve type safety and overflow handling in length calculation and loop
bounds in the OperationRegion handler.
Changes in v4:
* Dropped connection resource leak fix to keep focus on validation.
* See v4 series at:
https://lore.kernel.org/linux-gpio/20260531120816.17255-1-scardracs@disroot.org/
Changes in v3:
* Fixed global over-cleanup bug in OpRegion error path.
* See v3 series at:
https://lore.kernel.org/linux-gpio/20260520074955.55443-1-mscardovi95@gmail.com/
Changes in v2:
* Dropped gpiolib-acpi-core.c modularization (out of scope).
* Split series into bounds checking and address truncation fixes.
* See v2 series at:
https://lore.kernel.org/linux-gpio/20260519070039.9280-1-mscardovi95@gmail.com/
Changes in v1:
* Initial ACPI GPIO hardening series.
Marco Scardovi (2):
gpiolib: acpi: Add robust bounds-checking for GPIO pin resources
gpiolib: acpi: prevent address truncation in OperationRegion handler
drivers/gpio/gpiolib-acpi-core.c | 40 +++++++++++++++++++++++++-------
1 file changed, 32 insertions(+), 8 deletions(-)
--
2.54.0
next reply other threads:[~2026-06-02 11:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 11:32 Marco Scardovi [this message]
2026-06-02 11:32 ` [PATCH v5 1/2] gpiolib: acpi: Add robust bounds-checking for GPIO pin resources Marco Scardovi
2026-06-02 11:32 ` [PATCH v5] gpiolib: acpi: prevent address truncation in OperationRegion handler Marco Scardovi
2026-06-02 11:45 ` Mika Westerberg
2026-06-02 11:59 ` Marco Scardovi
2026-06-02 12:15 ` Mika Westerberg
2026-06-03 8:25 ` Marco Scardovi
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=20260602113529.52570-1-scardracs@disroot.org \
--to=scardracs@disroot.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
/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®