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 074ECA00C5; Fri, 8 May 2020 04:44:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA0BE1DBC9; Fri, 8 May 2020 04:44:09 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id C6D061DBC8 for ; Fri, 8 May 2020 04:44:08 +0200 (CEST) IronPort-SDR: a173yi+UUB0a32nIcs22TnWpbQtuAyovZUlgO3ptYy0ge54IiOAqcOGH2jit/sZSPZtZ9pay8u +EOjrBiCPh0A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2020 19:44:07 -0700 IronPort-SDR: PtC/NKzYjESNPF4uNFASTOBldZuUQDD5yKWIvyZJlIg0QqDX6kwVDIywvMZX1sFIwuQsWQha5T 6gmVcwu80DDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,366,1583222400"; d="scan'208";a="264156137" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.116.183]) by orsmga006.jf.intel.com with ESMTP; 07 May 2020 19:44:06 -0700 Date: Fri, 8 May 2020 10:36:17 +0800 From: Ye Xiaolong To: "Yang, Qiming" Cc: "Di, ChenxuX" , "dev@dpdk.org" Message-ID: <20200508023617.GC75514@intel.com> References: <20200507030928.42082-1-chenxux.di@intel.com> <20200507094941.87470-1-chenxux.di@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: fix out of bounds read issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Qiming On 05/08, Yang, Qiming wrote: >Nacked by: Qiming Yang Could you post the reason why you nack this patch? Thanks, Xiaolong > >> -----Original Message----- >> From: dev On Behalf Of Chenxu Di >> Sent: Thursday, May 7, 2020 17:50 >> To: dev@dpdk.org >> Cc: Di, ChenxuX >> Subject: [dpdk-dev] [PATCH v2] net/i40e: fix out of bounds read issue >> >> This patch fixes (out-of-bounds read) coverity issue. >> >> Coverity issue: 357699 >> Coverity issue: 357694 >> Fixes: feaae285b342 ("net/i40e: support hash configuration in RSS flow") >> >> Signed-off-by: Chenxu Di >> --- >> drivers/net/i40e/i40e_ethdev.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c >> index 749d85f54..c2d5c6835 100644 >> --- a/drivers/net/i40e/i40e_ethdev.c >> +++ b/drivers/net/i40e/i40e_ethdev.c >> @@ -13179,6 +13179,9 @@ i40e_rss_config_hash_function(struct i40e_pf >> *pf, >> break; >> } >> >> + if (i == UINT64_BIT) >> + return 0; >> + > > > >> for (j = I40E_FILTER_PCTYPE_INVALID + 1; >> j < I40E_FILTER_PCTYPE_MAX; j++) { >> if (pf->adapter->pctypes_tbl[i] & (1ULL << j)) @@ - >> 13311,6 +13314,9 @@ i40e_rss_clear_hash_function(struct i40e_pf *pf, >> break; >> } >> >> + if (i == UINT64_BIT) >> + return 0; >> + >> for (j = I40E_FILTER_PCTYPE_INVALID + 1; >> j < I40E_FILTER_PCTYPE_MAX; j++) { >> if (pf->adapter->pctypes_tbl[i] & (1ULL << j)) >> -- >> 2.17.1 >