patch 'net/mlx5: fix GRE flow item validation' has been queued to stable release 24.11.3
Kevin Traynor
ktraynor at redhat.com
Fri Jul 18 21:29:23 CEST 2025
Hi,
FYI, your patch has been queued to stable release 24.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 07/23/25. 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/eef73c95b14ecd8e011858a734ff89440f0ad91d
Thanks.
Kevin
---
>From eef73c95b14ecd8e011858a734ff89440f0ad91d Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani at nvidia.com>
Date: Sun, 27 Apr 2025 14:22:57 +0300
Subject: [PATCH] net/mlx5: fix GRE flow item validation
[ upstream commit 41e1fac36acf0af9817f158a5ab4f4719cd6af4a ]
GRE item was dereferenced w/o checking it's value.
Added a check to verify if null before using the pointer.
Fixes: 80c676259a04 ("net/mlx5: validate HWS template items")
Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e909a6ab63..61833c0dcb 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -3334,8 +3334,8 @@ mlx5_flow_validate_item_gre_key(const struct rte_eth_dev *dev,
RTE_FLOW_ERROR_TYPE_ITEM, item,
"GRE key following a wrong item");
- gre_mask = gre_item->mask;
+ gre_mask = gre_item ? gre_item->mask : NULL;
if (!gre_mask)
gre_mask = &rte_flow_item_gre_mask;
- gre_spec = gre_item->spec;
+ gre_spec = gre_item ? gre_item->spec : NULL;
if (gre_spec && (gre_mask->c_rsvd0_ver & RTE_BE16(0x2000)) &&
!(gre_spec->c_rsvd0_ver & RTE_BE16(0x2000)))
@@ -3380,6 +3380,6 @@ mlx5_flow_validate_item_gre_option(struct rte_eth_dev *dev,
struct rte_flow_error *error)
{
- const struct rte_flow_item_gre *gre_spec = gre_item->spec;
- const struct rte_flow_item_gre *gre_mask = gre_item->mask;
+ const struct rte_flow_item_gre *gre_spec = gre_item ? gre_item->spec : NULL;
+ const struct rte_flow_item_gre *gre_mask = gre_item ? gre_item->mask : NULL;
const struct rte_flow_item_gre_opt *spec = item->spec;
const struct rte_flow_item_gre_opt *mask = item->mask;
--
2.50.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-07-18 20:29:12.104887710 +0100
+++ 0029-net-mlx5-fix-GRE-flow-item-validation.patch 2025-07-18 20:29:10.866907135 +0100
@@ -1 +1 @@
-From 41e1fac36acf0af9817f158a5ab4f4719cd6af4a Mon Sep 17 00:00:00 2001
+From eef73c95b14ecd8e011858a734ff89440f0ad91d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 41e1fac36acf0af9817f158a5ab4f4719cd6af4a ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index cb91f4dfbe..8696cc4e95 100644
+index e909a6ab63..61833c0dcb 100644
@@ -22 +23 @@
-@@ -3335,8 +3335,8 @@ mlx5_flow_validate_item_gre_key(const struct rte_eth_dev *dev,
+@@ -3334,8 +3334,8 @@ mlx5_flow_validate_item_gre_key(const struct rte_eth_dev *dev,
@@ -33 +34 @@
-@@ -3381,6 +3381,6 @@ mlx5_flow_validate_item_gre_option(struct rte_eth_dev *dev,
+@@ -3380,6 +3380,6 @@ mlx5_flow_validate_item_gre_option(struct rte_eth_dev *dev,
More information about the stable
mailing list