patch 'drivers/net: fix buffer overflow for packet types list' has been queued to stable release 21.11.7

Kevin Traynor ktraynor at redhat.com
Tue Mar 5 16:34:23 CET 2024


Hi,

FYI, your patch has been queued to stable release 21.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/15d533ce941f245389f87d1fa3bf91c5d30264ef

Thanks.

Kevin

---
>From 15d533ce941f245389f87d1fa3bf91c5d30264ef Mon Sep 17 00:00:00 2001
From: Sivaramakrishnan Venkat <venkatx.sivaramakrishnan at intel.com>
Date: Thu, 1 Feb 2024 15:50:20 +0000
Subject: [PATCH] drivers/net: fix buffer overflow for packet types list

[ upstream commit 2e3ddb568044308b40f60fdb2ddc62160b95b1b1 ]

Address Sanitizer detects a buffer overflow caused by an incorrect
ptypes list. Missing "RTE_PTYPE_UNKNOWN" ptype causes buffer overflow.
Fix the ptypes list for drivers.

Fixes: 0849ac3b6122 ("net/tap: add packet type management")
Fixes: a7bdc3bd4244 ("net/dpaa: support packet type parsing")
Fixes: 4ccc8d770d3b ("net/mvneta: add PMD skeleton")
Fixes: f3f0d77db6b0 ("net/mrvl: support packet type parsing")
Fixes: 71e8bb65046e ("net/nfp: update supported list of packet types")
Fixes: 659b494d3d88 ("net/pfe: add packet types and basic statistics")
Fixes: 398a1be14168 ("net/thunderx: remove generic passX references")

Signed-off-by: Sivaramakrishnan Venkat <venkatx.sivaramakrishnan at intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 drivers/net/dpaa/dpaa_ethdev.c      | 3 ++-
 drivers/net/mvneta/mvneta_ethdev.c  | 3 ++-
 drivers/net/mvpp2/mrvl_ethdev.c     | 3 ++-
 drivers/net/pfe/pfe_ethdev.c        | 3 ++-
 drivers/net/tap/rte_eth_tap.c       | 1 +
 drivers/net/thunderx/nicvf_ethdev.c | 2 ++
 6 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index bae6c5abf2..3bf356fa2c 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -352,5 +352,6 @@ dpaa_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_UDP,
-		RTE_PTYPE_L4_SCTP
+		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};
 
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index d79d069120..309336eec3 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -204,5 +204,6 @@ mvneta_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L3_IPV6,
 		RTE_PTYPE_L4_TCP,
-		RTE_PTYPE_L4_UDP
+		RTE_PTYPE_L4_UDP,
+		RTE_PTYPE_UNKNOWN
 	};
 
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index a1c800aaf8..2133fb7717 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1783,5 +1783,6 @@ mrvl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L2_ETHER_ARP,
 		RTE_PTYPE_L4_TCP,
-		RTE_PTYPE_L4_UDP
+		RTE_PTYPE_L4_UDP,
+		RTE_PTYPE_UNKNOWN
 	};
 
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index c5158bbf31..fe48ccea8e 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -537,5 +537,6 @@ pfe_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_UDP,
-		RTE_PTYPE_L4_SCTP
+		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};
 
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 29b4860656..3a11f36e6f 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1838,4 +1838,5 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};
 
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index fc334cf734..a177bca3ff 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -311,4 +311,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_UDP,
 		RTE_PTYPE_L4_FRAG,
+		RTE_PTYPE_UNKNOWN
 	};
 	static const uint32_t ptypes_tunnel[] = {
@@ -317,4 +318,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_TUNNEL_VXLAN,
 		RTE_PTYPE_TUNNEL_NVGRE,
+		RTE_PTYPE_UNKNOWN
 	};
 	static const uint32_t ptypes_end = RTE_PTYPE_UNKNOWN;
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.837293658 +0000
+++ 0050-drivers-net-fix-buffer-overflow-for-packet-types-lis.patch	2024-03-05 14:08:54.685520858 +0000
@@ -1 +1 @@
-From 2e3ddb568044308b40f60fdb2ddc62160b95b1b1 Mon Sep 17 00:00:00 2001
+From 15d533ce941f245389f87d1fa3bf91c5d30264ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2e3ddb568044308b40f60fdb2ddc62160b95b1b1 ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -25 +25,0 @@
- drivers/net/nfp/nfp_net_common.c    | 1 +
@@ -29 +29 @@
- 7 files changed, 12 insertions(+), 4 deletions(-)
+ 6 files changed, 11 insertions(+), 4 deletions(-)
@@ -32 +32 @@
-index bb2de5de80..cf73f9d50b 100644
+index bae6c5abf2..3bf356fa2c 100644
@@ -35 +35,2 @@
-@@ -364,5 +364,6 @@ dpaa_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -352,5 +352,6 @@ dpaa_supported_ptypes_get(struct rte_eth_dev *dev)
+ 		RTE_PTYPE_L4_TCP,
@@ -37,3 +38,2 @@
- 		RTE_PTYPE_L4_SCTP,
--		RTE_PTYPE_TUNNEL_ESP
-+		RTE_PTYPE_TUNNEL_ESP,
+-		RTE_PTYPE_L4_SCTP
++		RTE_PTYPE_L4_SCTP,
@@ -44 +44 @@
-index daa69e533a..212c300c14 100644
+index d79d069120..309336eec3 100644
@@ -47 +47 @@
-@@ -199,5 +199,6 @@ mvneta_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
+@@ -204,5 +204,6 @@ mvneta_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
@@ -56 +56 @@
-index a91509d92a..82cb8d5368 100644
+index a1c800aaf8..2133fb7717 100644
@@ -59 +59 @@
-@@ -1778,5 +1778,6 @@ mrvl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
+@@ -1783,5 +1783,6 @@ mrvl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
@@ -67,10 +66,0 @@
-diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
-index a438eb5871..c907d9d5f6 100644
---- a/drivers/net/nfp/nfp_net_common.c
-+++ b/drivers/net/nfp/nfp_net_common.c
-@@ -1366,4 +1366,5 @@ nfp_net_supported_ptypes_get(struct rte_eth_dev *dev)
- 		RTE_PTYPE_INNER_L4_ICMP,
- 		RTE_PTYPE_INNER_L4_SCTP,
-+		RTE_PTYPE_UNKNOWN
- 	};
- 
@@ -78 +68 @@
-index 551f3cf193..0073dd7405 100644
+index c5158bbf31..fe48ccea8e 100644
@@ -81 +71 @@
-@@ -521,5 +521,6 @@ pfe_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -537,5 +537,6 @@ pfe_supported_ptypes_get(struct rte_eth_dev *dev)
@@ -90 +80 @@
-index b41fa971cb..3fa03cdbee 100644
+index 29b4860656..3a11f36e6f 100644
@@ -93 +83 @@
-@@ -1804,4 +1804,5 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
+@@ -1838,4 +1838,5 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
@@ -100 +90 @@
-index a504d41dfe..5a0c3dc4a6 100644
+index fc334cf734..a177bca3ff 100644
@@ -103 +93 @@
-@@ -393,4 +393,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -311,4 +311,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
@@ -109 +99 @@
-@@ -399,4 +400,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -317,4 +318,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)



More information about the stable mailing list