patch 'raw/cnxk_gpio: fix out-of-bound access for negative GPIO' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:00:55 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/fad4b1bb162bfff3338f7b23448315c8f3870ac3
Thanks.
Kevin
---
>From fad4b1bb162bfff3338f7b23448315c8f3870ac3 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <gakhil at marvell.com>
Date: Fri, 7 Aug 2026 15:46:30 +0530
Subject: [PATCH] raw/cnxk_gpio: fix out-of-bound access for negative GPIO
[ upstream commit 6700cb27d91b3b2e7a1f192d22d9e6004db08863 ]
cnxk_gpio_valid(struct cnxk_gpiochip *gpiochip, int gpio)
validates the GPIO number with only an upper bound while gpio
can be wrongly configured as negative value from application.
Added a check to reject negative values.
Fixes: ecc0dd455e9a ("raw/cnxk_gpio: add option to select subset of GPIOs")
Signed-off-by: Akhil Goyal <gakhil at marvell.com>
---
drivers/raw/cnxk_gpio/cnxk_gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/raw/cnxk_gpio/cnxk_gpio.c b/drivers/raw/cnxk_gpio/cnxk_gpio.c
index 0549e326f9..e22fb7cf7b 100644
--- a/drivers/raw/cnxk_gpio/cnxk_gpio.c
+++ b/drivers/raw/cnxk_gpio/cnxk_gpio.c
@@ -796,5 +796,5 @@ static bool
cnxk_gpio_valid(struct cnxk_gpiochip *gpiochip, int gpio)
{
- return gpio < gpiochip->num_gpios && gpiochip->gpios[gpio];
+ return (gpio >= 0) && (gpio < gpiochip->num_gpios) && gpiochip->gpios[gpio];
}
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:42.968607012 +0000
+++ 0129-raw-cnxk_gpio-fix-out-of-bound-access-for-negative-G.patch 2026-12-03 12:52:39.128938653 +0000
@@ -1 +1 @@
-From 6700cb27d91b3b2e7a1f192d22d9e6004db08863 Mon Sep 17 00:00:00 2001
+From fad4b1bb162bfff3338f7b23448315c8f3870ac3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6700cb27d91b3b2e7a1f192d22d9e6004db08863 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list