patch 'net/i40e: populate error in flow director parser' has been queued to stable release 20.11.6

Xueming Li xuemingl at nvidia.com
Tue Jun 21 10:01:13 CEST 2022


Hi,

FYI, your patch has been queued to stable release 20.11.6

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

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4d6996d25a365a8ae49a1a66a06220b9acd58915

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 4d6996d25a365a8ae49a1a66a06220b9acd58915 Mon Sep 17 00:00:00 2001
From: Mike Pattrick <mkp at redhat.com>
Date: Mon, 21 Mar 2022 23:19:37 -0400
Subject: [PATCH] net/i40e: populate error in flow director parser
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 87063aaff3752470af21f3b80b257262d9d4a314 ]

Errors from i40e_flow_parse_fdir_pattern() can bubble up to
rte_flow_create. If rte_flow_error is not initialized a caller may
dereference error->message. This may be uninitialized memory, leading
to a segemntation fault.

Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate")

Signed-off-by: Mike Pattrick <mkp at redhat.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
 drivers/net/i40e/i40e_flow.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 599b5f123d..b41a1fd3ca 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -3142,8 +3142,11 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 		/* Check if the input set is valid */
 		if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_FDIR,
 						input_set) != 0) {
-			PMD_DRV_LOG(ERR, "Invalid input set");
-			return -EINVAL;
+			rte_flow_error_set(error, EINVAL,
+					   RTE_FLOW_ERROR_TYPE_ITEM,
+					   item,
+					   "Invalid input set");
+			return -rte_errno;
 		}
 
 		filter->input.flow_ext.input_set = input_set;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.613329797 +0800
+++ 0007-net-i40e-populate-error-in-flow-director-parser.patch	2022-06-21 15:37:48.961117647 +0800
@@ -1 +1 @@
-From 87063aaff3752470af21f3b80b257262d9d4a314 Mon Sep 17 00:00:00 2001
+From 4d6996d25a365a8ae49a1a66a06220b9acd58915 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 87063aaff3752470af21f3b80b257262d9d4a314 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index e0cf996200..4f3808cb5f 100644
+index 599b5f123d..b41a1fd3ca 100644


More information about the stable mailing list