patch 'net/mvneta: fix possible out-of-bounds write' has been queued to stable release 23.11.3

Xueming Li xuemingl at nvidia.com
Sat Dec 7 08:59:24 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.3

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/10/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e26531c22509e629f3287cb7293e5c00d606d9fb

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From e26531c22509e629f3287cb7293e5c00d606d9fb Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Thu, 10 Oct 2024 00:53:26 +0000
Subject: [PATCH] net/mvneta: fix possible out-of-bounds write
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit c705c67d304b9450824a169b652520c2358c6aee ]

The mvneta_ifnames_get() function will save 'iface' value to ifnames,
it will out-of-bounds write if passed many iface pairs (e.g.
'iface=xxx,iface=xxx,...').

Fixes: 4ccc8d770d3b ("net/mvneta: add PMD skeleton")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/mvneta/mvneta_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index 212c300c14..7700a63071 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -91,6 +91,12 @@ mvneta_ifnames_get(const char *key __rte_unused, const char *value,
 {
 	struct mvneta_ifnames *ifnames = extra_args;

+	if (ifnames->idx >= NETA_NUM_ETH_PPIO) {
+		MVNETA_LOG(ERR, "Too many ifnames specified (max %u)",
+			   NETA_NUM_ETH_PPIO);
+		return -EINVAL;
+	}
+
 	ifnames->names[ifnames->idx++] = value;

 	return 0;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-12-06 23:26:44.346855123 +0800
+++ 0006-net-mvneta-fix-possible-out-of-bounds-write.patch	2024-12-06 23:26:43.843044829 +0800
@@ -1 +1 @@
-From c705c67d304b9450824a169b652520c2358c6aee Mon Sep 17 00:00:00 2001
+From e26531c22509e629f3287cb7293e5c00d606d9fb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit c705c67d304b9450824a169b652520c2358c6aee ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 3841c1ebe9..f99f9e6289 100644
+index 212c300c14..7700a63071 100644


More information about the stable mailing list