patch 'net/virtio: replace strncpy with strlcpy' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:00:16 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/1a5e823ec4c544a6f2bce916e25bcae37b511246

Thanks.

Kevin

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

[ upstream commit 821542535cae702a4b3a4902de988ff74b8dfed5 ]

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

Fixes: b72099be7f27 ("net/virtio-user: fix init when using existing tap")

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

diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index 611e2e25ec..d6a2d420ca 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -61,5 +61,5 @@ tap_open(const char *ifname, unsigned int r_flags, bool multi_queue)
 retry_mono_q:
 	memset(&ifr, 0, sizeof(ifr));
-	strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1);
+	strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
 	ifr.ifr_flags = r_flags;
 	if (multi_queue)
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:41.832266893 +0000
+++ 0090-net-virtio-replace-strncpy-with-strlcpy.patch	2026-12-03 12:52:39.079742122 +0000
@@ -1 +1 @@
-From 821542535cae702a4b3a4902de988ff74b8dfed5 Mon Sep 17 00:00:00 2001
+From 1a5e823ec4c544a6f2bce916e25bcae37b511246 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 821542535cae702a4b3a4902de988ff74b8dfed5 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -17 +18 @@
-index 2431d00c33..da55aba505 100644
+index 611e2e25ec..d6a2d420ca 100644
@@ -20 +21 @@
-@@ -61,5 +61,5 @@ vhost_tap_open(const char *ifname, unsigned int r_flags, bool multi_queue)
+@@ -61,5 +61,5 @@ tap_open(const char *ifname, unsigned int r_flags, bool multi_queue)



More information about the stable mailing list