patch 'net/txgbe: validate numeric devargs' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Oct 27 12:49:01 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/545c56474be050aee1f38d13c6bffac122654dfd

Thanks.

Luca Boccassi

---
>From 545c56474be050aee1f38d13c6bffac122654dfd Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 9 Sep 2026 13:40:52 -0700
Subject: [PATCH] net/txgbe: validate numeric devargs

[ upstream commit 3c1652ebd4b05619d1fda677efd57725894b3b1e ]

Be more careful about validating devargs numeric values.
Don't silently truncate to 16 bits, and check for empty
string or trailing garbage.

Fixes: f611dada1af8 ("net/txgbe: update link setup process of backplane NICs")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/txgbe/txgbe_ethdev.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index a0494f1e824..0f39fe6df2e 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -479,15 +479,21 @@ static int
 txgbe_handle_devarg(__rte_unused const char *key, const char *value,
 		  void *extra_args)
 {
-	uint16_t *n = extra_args;
+	uint16_t *arg = extra_args;
+	char *endp;
+	unsigned long num;
 
 	if (value == NULL || extra_args == NULL)
 		return -EINVAL;
 
-	*n = (uint16_t)strtoul(value, NULL, 10);
-	if (*n == USHRT_MAX && errno == ERANGE)
-		return -1;
+	errno = 0;
+	num = strtoul(value, &endp, 10);
+	if (*value == '\0' || *endp != '\0')
+		return -EINVAL;
 
+	if (num > UINT16_MAX || errno == ERANGE)
+		return -ERANGE;
+	*arg = (uint16_t)num;
 	return 0;
 }
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:43:55.551493907 +0000
+++ 0047-net-txgbe-validate-numeric-devargs.patch	2026-10-27 11:43:53.558060811 +0000
@@ -1 +1 @@
-From 3c1652ebd4b05619d1fda677efd57725894b3b1e Mon Sep 17 00:00:00 2001
+From 545c56474be050aee1f38d13c6bffac122654dfd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c1652ebd4b05619d1fda677efd57725894b3b1e ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 111843023d..0734a1c63c 100644
+index a0494f1e824..0f39fe6df2e 100644
@@ -22 +23 @@
-@@ -450,15 +450,21 @@ static int
+@@ -479,15 +479,21 @@ static int


More information about the stable mailing list