mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 0/2] gpiolib: acpi: Add bounds-checking and address validation
@ 2026-06-02 11:32 Marco Scardovi
  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
  0 siblings, 2 replies; 7+ messages in thread
From: Marco Scardovi @ 2026-06-02 11:32 UTC (permalink / raw)
  To: andriy.shevchenko, mika.westerberg
  Cc: brgl, linusw, linux-acpi, linux-gpio, linux-kernel

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


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

end of thread, other threads:[~2026-06-03  8:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-02 11:32 [PATCH v5 0/2] gpiolib: acpi: Add bounds-checking and address validation Marco Scardovi
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

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®