patch 'net/vhost: replace strncpy with strlcpy' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Oct 27 12:49:25 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/16468bd4a9647c86894a39af3b500a5d23d26587

Thanks.

Luca Boccassi

---
>From 16468bd4a9647c86894a39af3b500a5d23d26587 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Wed, 24 Jun 2026 11:36:55 +0100
Subject: [PATCH] net/vhost: replace strncpy with strlcpy

[ upstream commit ed302a6204d5bbd9f7de3236a22c25fd97a468dc ]

Replace strncpy() with safer strlcpy() which always null-terminates.

Fixes: 2e16597c4bda ("net/vhost: move to vhost library statistics API")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 87c05caccd6..bf66a7e67fd 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -208,7 +208,7 @@ vhost_dev_xstats_get_names(struct rte_eth_dev *dev,
 	}
 
 	for (i = 0; i < count; i++)
-		strncpy(xstats_names[i].name, name[i].name, RTE_ETH_XSTATS_NAME_SIZE);
+		strlcpy(xstats_names[i].name, name[i].name, RTE_ETH_XSTATS_NAME_SIZE);
 
 	free(name);
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:43:56.438265171 +0000
+++ 0071-net-vhost-replace-strncpy-with-strlcpy.patch	2026-10-27 11:43:53.578061429 +0000
@@ -1 +1 @@
-From ed302a6204d5bbd9f7de3236a22c25fd97a468dc Mon Sep 17 00:00:00 2001
+From 16468bd4a9647c86894a39af3b500a5d23d26587 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed302a6204d5bbd9f7de3236a22c25fd97a468dc ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -17 +18 @@
-index f2dfae7175..56c7a973e9 100644
+index 87c05caccd6..bf66a7e67fd 100644
@@ -20 +21 @@
-@@ -209,7 +209,7 @@ vhost_dev_xstats_get_names(struct rte_eth_dev *dev,
+@@ -208,7 +208,7 @@ vhost_dev_xstats_get_names(struct rte_eth_dev *dev,


More information about the stable mailing list