patch 'net/virtio: 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:26 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/59a14aad547a43a60de0b685c0e440c212079f1f
Thanks.
Luca Boccassi
---
>From 59a14aad547a43a60de0b685c0e440c212079f1f 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 611e2e25ec9..d6a2d420ca7 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -60,7 +60,7 @@ 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)
ifr.ifr_flags |= IFF_MULTI_QUEUE;
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-10-27 11:43:56.473166334 +0000
+++ 0072-net-virtio-replace-strncpy-with-strlcpy.patch 2026-10-27 11:43:53.578061429 +0000
@@ -1 +1 @@
-From 821542535cae702a4b3a4902de988ff74b8dfed5 Mon Sep 17 00:00:00 2001
+From 59a14aad547a43a60de0b685c0e440c212079f1f 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 611e2e25ec9..d6a2d420ca7 100644
@@ -20 +21 @@
-@@ -60,7 +60,7 @@ vhost_tap_open(const char *ifname, unsigned int r_flags, bool multi_queue)
+@@ -60,7 +60,7 @@ tap_open(const char *ifname, unsigned int r_flags, bool multi_queue)
More information about the stable
mailing list