patch 'net/octeontx: fix overflow in device name formatting' has been queued to stable release 24.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Jun 11 15:20:27 CEST 2026


Hi,

FYI, your patch has been queued to stable release 24.11.7

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

Thanks.

Luca Boccassi

---
>From f741a0c98bfb9619c669c948c629acec68182aa9 Mon Sep 17 00:00:00 2001
From: Sergei Iashin <yashin.sergey at gmail.com>
Date: Tue, 7 Apr 2026 10:57:32 +0300
Subject: [PATCH] net/octeontx: fix overflow in device name formatting

[ upstream commit b775e102c81df7a064d8a63f7ed316e0c59c2e21 ]

Replace sprintf with snprintf when formatting into the fixed-size
octtx_name buffer in octeontx_create and octeontx_remove. The device
name can be up to 63 bytes (RTE_DEV_NAME_MAX_LEN) while the buffer
is only 32 bytes (OCTEONTX_MAX_NAME_LEN), which may cause a stack
buffer overflow with a long user-provided --vdev name.

Fixes: f18b146c498d ("net/octeontx: create ethdev ports")

Signed-off-by: Sergei Iashin <yashin.sergey at gmail.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 3b8d717797..7158d7afa2 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1552,7 +1552,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 
 	PMD_INIT_FUNC_TRACE();
 
-	sprintf(octtx_name, "%s_%d", name, port);
+	snprintf(octtx_name, sizeof(octtx_name), "%s_%d", name, port);
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
 		eth_dev = rte_eth_dev_attach_secondary(octtx_name);
 		if (eth_dev == NULL)
@@ -1708,7 +1708,7 @@ octeontx_remove(struct rte_vdev_device *dev)
 		return -EINVAL;
 
 	for (i = 0; i < OCTEONTX_VDEV_DEFAULT_MAX_NR_PORT; i++) {
-		sprintf(octtx_name, "eth_octeontx_%d", i);
+		snprintf(octtx_name, sizeof(octtx_name), "eth_octeontx_%d", i);
 
 		eth_dev = rte_eth_dev_allocated(octtx_name);
 		if (eth_dev == NULL)
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-06-11 14:20:04.408422344 +0100
+++ 0078-net-octeontx-fix-overflow-in-device-name-formatting.patch	2026-06-11 14:20:01.314748413 +0100
@@ -1 +1 @@
-From b775e102c81df7a064d8a63f7ed316e0c59c2e21 Mon Sep 17 00:00:00 2001
+From f741a0c98bfb9619c669c948c629acec68182aa9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b775e102c81df7a064d8a63f7ed316e0c59c2e21 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 21e3e56901..e4dca30d9d 100644
+index 3b8d717797..7158d7afa2 100644
@@ -24 +25 @@
-@@ -1555,7 +1555,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
+@@ -1552,7 +1552,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
@@ -33 +34 @@
-@@ -1711,7 +1711,7 @@ octeontx_remove(struct rte_vdev_device *dev)
+@@ -1708,7 +1708,7 @@ octeontx_remove(struct rte_vdev_device *dev)


More information about the stable mailing list