[dpdk-stable] patch 'net/hns3: fix out of bounds access' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:43:03 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 b823997ee73ee99eb83c08ff0797f3361dd4124a Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Mon, 7 Sep 2020 09:46:33 +0800
Subject: [PATCH] net/hns3: fix out of bounds access

[ upstream commit c4c6c4c1f0ea8d8aac9d63a134d9f7a037aed493 ]

This patch fixes (out-of-bounds access) coverity issue.

Coverity issue: 349932
Fixes: 7d7f9f80bbfb ("net/hns3: support MAC address related operations")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index cac1aa53b4..cd828202ee 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -1401,7 +1401,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	struct hns3_mac_vlan_tbl_entry_cmd req;
 	struct hns3_pf *pf = &hns->pf;
-	struct hns3_cmd_desc desc;
+	struct hns3_cmd_desc desc[3];
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
 	uint16_t egress_port = 0;
 	uint8_t vf_id;
@@ -1436,7 +1436,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 	 * it if the entry is inexistent. Repeated unicast entry
 	 * is not allowed in the mac vlan table.
 	 */
-	ret = hns3_lookup_mac_vlan_tbl(hw, &req, &desc, false);
+	ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc, false);
 	if (ret == -ENOENT) {
 		if (!hns3_is_umv_space_full(hw)) {
 			ret = hns3_add_mac_vlan_tbl(hw, &req, NULL);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.538733334 +0000
+++ 0024-net-hns3-fix-out-of-bounds-access.patch	2020-10-28 10:35:11.448829200 +0000
@@ -1,13 +1,14 @@
-From c4c6c4c1f0ea8d8aac9d63a134d9f7a037aed493 Mon Sep 17 00:00:00 2001
+From b823997ee73ee99eb83c08ff0797f3361dd4124a Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian at huawei.com>
 Date: Mon, 7 Sep 2020 09:46:33 +0800
 Subject: [PATCH] net/hns3: fix out of bounds access
 
+[ upstream commit c4c6c4c1f0ea8d8aac9d63a134d9f7a037aed493 ]
+
 This patch fixes (out-of-bounds access) coverity issue.
 
 Coverity issue: 349932
 Fixes: 7d7f9f80bbfb ("net/hns3: support MAC address related operations")
-Cc: stable at dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 Reviewed-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
@@ -16,10 +17,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 4d5fa94ff4..9dd0d9cbf1 100644
+index cac1aa53b4..cd828202ee 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -1410,7 +1410,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1401,7 +1401,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
  	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
  	struct hns3_mac_vlan_tbl_entry_cmd req;
  	struct hns3_pf *pf = &hns->pf;
@@ -28,7 +29,7 @@
  	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
  	uint16_t egress_port = 0;
  	uint8_t vf_id;
-@@ -1444,7 +1444,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1436,7 +1436,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
  	 * it if the entry is inexistent. Repeated unicast entry
  	 * is not allowed in the mac vlan table.
  	 */


More information about the stable mailing list