patch 'common/mlx5: 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:11 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/6916a006784cfe4f0019fa8c44ab82e0996d46d3

Thanks.

Luca Boccassi

---
>From 6916a006784cfe4f0019fa8c44ab82e0996d46d3 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Wed, 24 Jun 2026 11:36:41 +0100
Subject: [PATCH] common/mlx5: replace strncpy with strlcpy

[ upstream commit 056b4e10e36d74edd6df080dc0c7c41570c793a0 ]

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

Fixes: aec086c9f1c8 ("common/mlx5: share kernel interface name getter")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_common_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
index b8aae925f63..6fd852a3ba7 100644
--- a/drivers/common/mlx5/linux/mlx5_common_os.c
+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
@@ -226,7 +226,7 @@ try_dev_id:
 		rte_errno = ENOENT;
 		return -rte_errno;
 	}
-	strncpy(ifname, match, IF_NAMESIZE);
+	strlcpy(ifname, match, IF_NAMESIZE);
 	return 0;
 }
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:43:55.925289156 +0000
+++ 0057-common-mlx5-replace-strncpy-with-strlcpy.patch	2026-10-27 11:43:53.566061058 +0000
@@ -1 +1 @@
-From 056b4e10e36d74edd6df080dc0c7c41570c793a0 Mon Sep 17 00:00:00 2001
+From 6916a006784cfe4f0019fa8c44ab82e0996d46d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 056b4e10e36d74edd6df080dc0c7c41570c793a0 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index 3e9cd86062..11a4eb8eee 100644
+index b8aae925f63..6fd852a3ba7 100644
@@ -21 +22 @@
-@@ -231,7 +231,7 @@ try_dev_id:
+@@ -226,7 +226,7 @@ try_dev_id:


More information about the stable mailing list