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

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

Thanks.

Kevin

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

[ upstream commit 735b94ff541a48db86a66e3c8fb7c0813c830f81 ]

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

Fixes: 804c585658ea ("net/cnxk: add representor control plane")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/cnxk/cnxk_eswitch.c | 4 ++--
 drivers/net/cnxk/cnxk_rep_msg.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cnxk/cnxk_eswitch.c b/drivers/net/cnxk/cnxk_eswitch.c
index 6b1bfdd476..9c4c8db2b6 100644
--- a/drivers/net/cnxk/cnxk_eswitch.c
+++ b/drivers/net/cnxk/cnxk_eswitch.c
@@ -125,6 +125,6 @@ cnxk_eswitch_dev_remove(struct rte_pci_device *pci_dev)
 				sun.sun_family = AF_UNIX;
 				sunlen = sizeof(struct sockaddr_un);
-				strncpy(sun.sun_path, CNXK_ESWITCH_CTRL_MSG_SOCK_PATH,
-					sizeof(sun.sun_path) - 1);
+				strlcpy(sun.sun_path, CNXK_ESWITCH_CTRL_MSG_SOCK_PATH,
+					sizeof(sun.sun_path));
 
 				if (connect(sock_fd, (struct sockaddr *)&sun, sunlen) < 0) {
diff --git a/drivers/net/cnxk/cnxk_rep_msg.c b/drivers/net/cnxk/cnxk_rep_msg.c
index a222e2b5cd..7b92e7a5f7 100644
--- a/drivers/net/cnxk/cnxk_rep_msg.c
+++ b/drivers/net/cnxk/cnxk_rep_msg.c
@@ -139,5 +139,5 @@ open_socket_ctrl_channel(void)
 	memset(&un, 0, sizeof(struct sockaddr_un));
 	un.sun_family = AF_UNIX;
-	strncpy(un.sun_path, CNXK_ESWITCH_CTRL_MSG_SOCK_PATH, sizeof(un.sun_path) - 1);
+	strlcpy(un.sun_path, CNXK_ESWITCH_CTRL_MSG_SOCK_PATH, sizeof(un.sun_path));
 
 	if (bind(sock_fd, (struct sockaddr *)&un, sizeof(un)) < 0) {
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:41.589981642 +0000
+++ 0081-net-cnxk-replace-strncpy-with-strlcpy.patch	2026-12-03 12:52:39.074938610 +0000
@@ -1 +1 @@
-From 735b94ff541a48db86a66e3c8fb7c0813c830f81 Mon Sep 17 00:00:00 2001
+From 1cb9973924dc8ff76ba0905b203c3fac0412b3b8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 735b94ff541a48db86a66e3c8fb7c0813c830f81 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index 7e717a2fbf..57e2c490df 100644
+index 6b1bfdd476..9c4c8db2b6 100644



More information about the stable mailing list