patch 'net/mlx5/hws: fix memory access in L3 decapsulation' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Sat Apr 13 14:49:57 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/15/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=aeebcd33c070db072666eb2dbdf587f3c0319a49

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From aeebcd33c070db072666eb2dbdf587f3c0319a49 Mon Sep 17 00:00:00 2001
From: Alex Vesker <valex at nvidia.com>
Date: Fri, 22 Mar 2024 12:01:59 +0200
Subject: [PATCH] net/mlx5/hws: fix memory access in L3 decapsulation
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 1738b65b89ba5c80c452cb9acdaad4af892e802d ]

In case decapL3 action is created we would access header
data even in case the SHARED flag is not set, this would
lead to an invalid memory access.

Fixes: 3a6c50215c07 ("net/mlx5/hws: support multi-pattern")

Signed-off-by: Alex Vesker <valex at nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_action.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index 862ee3e332..d21bca294c 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -1465,7 +1465,9 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action *action,
 
 	/* Create a full modify header action list in case shared */
 	mlx5dr_action_prepare_decap_l3_actions(hdrs->sz, mh_data, &num_of_actions);
-	mlx5dr_action_prepare_decap_l3_data(hdrs->data, mh_data, num_of_actions);
+
+	if (action->flags & MLX5DR_ACTION_FLAG_SHARED)
+		mlx5dr_action_prepare_decap_l3_data(hdrs->data, mh_data, num_of_actions);
 
 	/* All DecapL3 cases require the same max arg size */
 	arg_obj = mlx5dr_arg_create_modify_header_arg(ctx,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-13 20:43:08.617256604 +0800
+++ 0117-net-mlx5-hws-fix-memory-access-in-L3-decapsulation.patch	2024-04-13 20:43:05.147753736 +0800
@@ -1 +1 @@
-From 1738b65b89ba5c80c452cb9acdaad4af892e802d Mon Sep 17 00:00:00 2001
+From aeebcd33c070db072666eb2dbdf587f3c0319a49 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 1738b65b89ba5c80c452cb9acdaad4af892e802d ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index 084d4d606e..562fb5cbb4 100644
+index 862ee3e332..d21bca294c 100644
@@ -22 +24 @@
-@@ -1775,7 +1775,9 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action *action,
+@@ -1465,7 +1465,9 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action *action,


More information about the stable mailing list