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 F3664A04DD for ; Wed, 28 Oct 2020 11:46:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D828FC9EC; Wed, 28 Oct 2020 11:46:31 +0100 (CET) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 52001C9FA for ; Wed, 28 Oct 2020 11:46:29 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id a9so1328463wrg.12 for ; Wed, 28 Oct 2020 03:46:29 -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=0Qc0puHJskJP3ch+XrvNCIAs5szo6Wif6/NcCIyi4ko=; b=Ir6r+sINCkjebD7TcZJBOZKMJpcxJxTxVdPn7QWvxOM+KTYBfcOOg0noHg4m/5nCL9 52YAO5UxeWMKE+U/ytqwcOcJHyaCuUrGyOd/8C9Gj0kih3c/aLH/uPVA/7OUL18zjMSd RQHo8J2OIFaOpKYj3OTMtexnFnVrk5KacvckDuS6/zSrvWQQUpvVslE+BnWygeu/dPYy WP5SFvht+xOHydjY1CFlZezZ6Uviu6EJNQ7Lta0uWz3WP3E/8rnpJ0yvEP20KfWbrtho lfPC8xtNMEVCk4i8NtHZlZVCTUs9ZMm5QB57bcbngRc8NiOIg0EQ8lRhDxJFZlBhp2YO aQbA== 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=0Qc0puHJskJP3ch+XrvNCIAs5szo6Wif6/NcCIyi4ko=; b=hxWs136kShwMUaRkuMryKIji6vKbTwmAu/k9g5ervwrQ2XxG8/Qz4th004TL0V5cjC +6BAxfI8SBRtNHKbzS9CztnBPOlqUDSuKqyUugNNq1s09OKNUp/TLj9goZyNQn+W4spo Ag7faP8iaN2hZMRI56gRLQk6zKSsWhjyQ4XvAhjAKnAV7+MMRpkh3n952yzYIPCg2Z88 k47FOiWy11WdVolvy30FW43ZBG5Um07+EKh19gHjHPDuPa00LP8HDBE3P/dh9qs7XkE0 vkJF1WdYo/7KIuqLNuco4f2NhFFTAj5KCPDADg4ruYmiU/5HFs/8bAKUcGcQEKPaiv4V 2iOQ== X-Gm-Message-State: AOAM531Iw2ofkZr5hqepy7afxk0yQpwK/CctCUlM4rHYONA+NKass+1j ETls2tzSNESs/ZQZLKYqd/E= X-Google-Smtp-Source: ABdhPJy7lcdV6mlhipAmtj5lwHvcW/BTEWYmMqvWSKUd1iUYD8vABTp7NlnK63RX0fZJ9MBglYuVPw== X-Received: by 2002:adf:97cb:: with SMTP id t11mr8747400wrb.292.1603881989098; Wed, 28 Oct 2020 03:46:29 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id z6sm4385655wmi.1.2020.10.28.03.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:46:28 -0700 (PDT) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Ferruh Yigit , dpdk stable Date: Wed, 28 Oct 2020 10:42:45 +0000 Message-Id: <20201028104606.3504127-6-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/hinic: fix negative array index read' 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 85d0811e73587d3486f282f11e984d36c7b3f44d Mon Sep 17 00:00:00 2001 From: Yunjian Wang 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 Reviewed-by: Ferruh Yigit --- 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, ðertype_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 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@dpdk.org Signed-off-by: Yunjian Wang Reviewed-by: Ferruh Yigit @@ -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, ðertype_filter);