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

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 13:59:51 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/578e4e432230d59914f6c6d1b7cdf929b70812cb

Thanks.

Kevin

---
>From 578e4e432230d59914f6c6d1b7cdf929b70812cb 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 b215e69250..63d328657d 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -505,13 +505,19 @@ 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.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:41.154950302 +0000
+++ 0065-net-txgbe-validate-numeric-devargs.patch	2026-12-03 12:52:39.064938602 +0000
@@ -1 +1 @@
-From 3c1652ebd4b05619d1fda677efd57725894b3b1e Mon Sep 17 00:00:00 2001
+From 578e4e432230d59914f6c6d1b7cdf929b70812cb 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 b215e69250..63d328657d 100644
@@ -22 +23 @@
-@@ -451,13 +451,19 @@ txgbe_handle_devarg(__rte_unused const char *key, const char *value,
+@@ -505,13 +505,19 @@ txgbe_handle_devarg(__rte_unused const char *key, const char *value,



More information about the stable mailing list