patch 'net/bnx2x: 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:16 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/25de561322e97439fbcd2aca7f792de7b4818d9d

Thanks.

Luca Boccassi

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

[ upstream commit 569c107fe72b7c76dc5a130ddab2e285bbb19cdb ]

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

Fixes: 540a211084a7 ("bnx2x: driver core")

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

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 51e5cabf7b3..064292562e3 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -3596,7 +3596,7 @@ static void bnx2x_drv_info_ether_stat(struct bnx2x_softc *sc)
 {
 	struct eth_stats_info *ether_stat = &sc->sp->drv_info_to_mcp.ether_stat;
 
-	strncpy(ether_stat->version, BNX2X_DRIVER_VERSION,
+	strlcpy(ether_stat->version, BNX2X_DRIVER_VERSION,
 		ETH_STAT_INFO_VERSION_LEN);
 
 	sc->sp_objs[0].mac_obj.get_n_elements(sc, &sc->sp_objs[0].mac_obj,
diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c
index 5411df3a383..23f576877f9 100644
--- a/drivers/net/bnx2x/bnx2x_vfpf.c
+++ b/drivers/net/bnx2x/bnx2x_vfpf.c
@@ -303,7 +303,7 @@ int bnx2x_vf_get_resources(struct bnx2x_softc *sc, uint8_t tx_count, uint8_t rx_
 
 	PMD_DRV_LOG(DEBUG, sc, "status block count = %d, base status block = %x",
 		sc->igu_sb_cnt, sc->igu_base_sb);
-	strncpy(sc->fw_ver, sc_resp.fw_ver, sizeof(sc->fw_ver));
+	strlcpy(sc->fw_ver, sc_resp.fw_ver, sizeof(sc->fw_ver));
 
 	if (rte_is_valid_assigned_ether_addr(&sc_resp.resc.current_mac_addr))
 		rte_ether_addr_copy(&sc_resp.resc.current_mac_addr,
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:43:56.102844468 +0000
+++ 0062-net-bnx2x-replace-strncpy-with-strlcpy.patch	2026-10-27 11:43:53.574061306 +0000
@@ -1 +1 @@
-From 569c107fe72b7c76dc5a130ddab2e285bbb19cdb Mon Sep 17 00:00:00 2001
+From 25de561322e97439fbcd2aca7f792de7b4818d9d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 569c107fe72b7c76dc5a130ddab2e285bbb19cdb ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index 8790c858d5..1a3956b224 100644
+index 51e5cabf7b3..064292562e3 100644
@@ -31 +32 @@
-index 5411df3a38..23f576877f 100644
+index 5411df3a383..23f576877f9 100644


More information about the stable mailing list