[dpdk-stable] patch 'net/hinic: fix negative array index read' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:42:45 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.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 10/30/20. 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.

Thanks.

Luca Boccassi

---
>From 85d0811e73587d3486f282f11e984d36c7b3f44d Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Mon, 24 Aug 2020 20:43:46 +0800
Subject: [PATCH] net/hinic: fix negative array index read

[ upstream commit 2e8fb3d2442cc0123562d4c43a6e86a1bb3df62f ]

Negative array index read using variable 'i' as an index to array
'filter_info->pkt_filters'. Fixed by add return value check.

Coverity issue: 350364
Fixes: f4ca3fd54c4d ("net/hinic: create and destroy flow director filter")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/hinic/hinic_pmd_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_flow.c b/drivers/net/hinic/hinic_pmd_flow.c
index 6752a8f15a..7bbdcc9e78 100644
--- a/drivers/net/hinic/hinic_pmd_flow.c
+++ b/drivers/net/hinic/hinic_pmd_flow.c
@@ -1934,6 +1934,8 @@ hinic_add_del_ethertype_filter(struct rte_eth_dev *dev,
 		ethertype_filter.pkt_proto = filter->ether_type;
 		i = hinic_ethertype_filter_lookup(filter_info,
 						&ethertype_filter);
+		if (i < 0)
+			return -EINVAL;
 
 		if ((filter_info->type_mask & (1 << i))) {
 			filter_info->pkt_filters[i].enable = FALSE;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:11.978698178 +0000
+++ 0006-net-hinic-fix-negative-array-index-read.patch	2020-10-28 10:35:11.392828375 +0000
@@ -1,14 +1,15 @@
-From 2e8fb3d2442cc0123562d4c43a6e86a1bb3df62f Mon Sep 17 00:00:00 2001
+From 85d0811e73587d3486f282f11e984d36c7b3f44d Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian at huawei.com>
 Date: Mon, 24 Aug 2020 20:43:46 +0800
 Subject: [PATCH] net/hinic: fix negative array index read
 
+[ upstream commit 2e8fb3d2442cc0123562d4c43a6e86a1bb3df62f ]
+
 Negative array index read using variable 'i' as an index to array
 'filter_info->pkt_filters'. Fixed by add return value check.
 
 Coverity issue: 350364
 Fixes: f4ca3fd54c4d ("net/hinic: create and destroy flow director filter")
-Cc: stable at dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/hinic/hinic_pmd_flow.c b/drivers/net/hinic/hinic_pmd_flow.c
-index 503a32fff0..70fd4450c2 100644
+index 6752a8f15a..7bbdcc9e78 100644
 --- a/drivers/net/hinic/hinic_pmd_flow.c
 +++ b/drivers/net/hinic/hinic_pmd_flow.c
-@@ -2351,6 +2351,8 @@ hinic_add_del_ethertype_filter(struct rte_eth_dev *dev,
+@@ -1934,6 +1934,8 @@ hinic_add_del_ethertype_filter(struct rte_eth_dev *dev,
  		ethertype_filter.pkt_proto = filter->ether_type;
  		i = hinic_ethertype_filter_lookup(filter_info,
  						&ethertype_filter);


More information about the stable mailing list