From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C4B9CA04DD for ; Wed, 28 Oct 2020 11:47:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BD07E2C2A; Wed, 28 Oct 2020 11:47:24 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 2DD8FC9C0 for ; Wed, 28 Oct 2020 11:47:22 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id w14so1124544wrs.9 for ; Wed, 28 Oct 2020 03:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wzvqPFO7V1OAmSEGOYXSMdQTwbLyBCMgAy+HwdXipF4=; b=f3X/XaLDmEbKKX6xcP+gxHBJRoN6TlmuZRxrlw3bqrN6uzF2tgNDbp6Maeoxqj67Cj FLlrsp4ppLKryE+f01xh/fN+ejZT2XLOaKK2L5Sne8uDa6lAdJKWJZehBgDA3pOIVerF QBtJ6VoGqakUWg9MrH90IPn1FfJ7pEGxkdf+C4xDyrvw1284ua6uZs6ooI375m+UKVx1 xKQawUhvStRxC9sHaLE9WD75fl/19pynhU7gWI5tG6P+Pa5tjlqZwHTFbQ1dRPx5c+FY +te2OGZZ26pOjB/SsSXNvdBLbtgSdW3v9bZ6xEVommMUx7GlEsKEsLQFnm8ONb/BZIOe pl0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wzvqPFO7V1OAmSEGOYXSMdQTwbLyBCMgAy+HwdXipF4=; b=H6m0YcmJUR0HRdjizBJRxiEfmBqh1euT6LS9IIjMBs0NyxwkHSxjSGPY9LrSnw9Tkp MiZuxiuDQ5ivReZDg05cmIS4bUMPj1VN0hDctYgcNedLnodASLuE6gx4yzSVjBheWyBm iO/Irxy/g0V9TE/EdEOQuzwXnuCzcci4Wr3CTAFQtjLc3BlvIGG6+o0E688lVG4twsET sWws8a0YtMpPXxegdaXGlr+Dq/9SGV/FjDp6IdmVN5Gwl7Fx6N+RqDSc8NHGC8s82Y5c yeZpUTC76HYDOVKN+ij31NlSmS7iIWy/qb40HO0aVw5witouTOTgZLca/klu/PRQroym 7jRQ== X-Gm-Message-State: AOAM532kDcLmPV2gCsJ6Zw7SNqruC3JpFCAE7aXPm7Yp4kcFYipy1Iax YCfgtKbQMVC+U7NmeTn9VFI= X-Google-Smtp-Source: ABdhPJzk2t6xCFLmS2UzI1LRcUJs7JkA/6+yzeAPmAnDHoDRIfPmP/Gygi1xtrIiPUYGx2VIGYjhzQ== X-Received: by 2002:adf:a50e:: with SMTP id i14mr8203083wrb.121.1603882040889; Wed, 28 Oct 2020 03:47:20 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id k16sm5724114wmi.5.2020.10.28.03.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:47:20 -0700 (PDT) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Wei Hu , dpdk stable Date: Wed, 28 Oct 2020 10:43:03 +0000 Message-Id: <20201028104606.3504127-24-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix out of bounds access' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Reviewed-by: Wei Hu (Xavier) --- 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 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@dpdk.org Signed-off-by: Yunjian Wang Reviewed-by: Wei Hu (Xavier) @@ -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. */