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 74C39A00C5; Fri, 8 May 2020 04:26:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D254F1DBBC; Fri, 8 May 2020 04:26:38 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 308801DA4C for ; Fri, 8 May 2020 04:26:37 +0200 (CEST) IronPort-SDR: /EFOdxojj0TxTA7tf9m+qy1KnciETXvENxHKFtaXdY7JRoCaJSW4Q+6Mp0FS3bvP/jCQapF+ZF jEaLEbZ+ZqqQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2020 19:26:36 -0700 IronPort-SDR: LZ4WCRQlzGRwicTBAZOIaMHq6PthKZTDUgIHOjTCDztjaCD0JjIukbIAiyNCS7QCuOtObEaJsj K6TVBOpZDaaw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,366,1583222400"; d="scan'208";a="339567952" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 07 May 2020 19:26:35 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 19:26:35 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 7 May 2020 19:26:35 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 7 May 2020 19:26:35 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 19:26:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XOV3vuS7xyeLb9z+9H1Ei8q2kTt5L6DpuSzc6SkC5YkzI3SMvOkT4bJsNqafbz20jwTlUikvaxRJD/R9vMNzngsJJbeS7w+p+Vbs3sCZtcwObfiU6hUBNpW4+sL3O4u/Mc6MqdRxR3W7i6KXtauo6Df5FbDDa0Bt/dHjtVbB/NgRuLZbjC8LMHrGvV5IfBG03mS5sS/47S9bKgTIGBUewAyTmSJtT/Wfgt/n3ywc1/Dw/Tdm+oHjEE22Oeea1K1YcSmxG52PSYx33DsYvLv7yyVghRhqN2CHngvdbk1ITpgM4+odCgwsfmmti6QtyfnP85F+z+LuBN3VfJxEIAnJBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kpLrqxodzSGVxY/311SHAb1ubewG44Ubdiand/+Oi9U=; b=A3H0969KsZinfMap8gUIJMM8NOcJ8Xals0/q7BuwlqW3mmSt/wkf1FEvv0TY+MCpGPKMYMeXOfn/sxyQUGrXBtuO3aVPSfr2EUXo146vTzXQjV1lWFpieHE5kfKboGq+wrPihjxGgehiT4G1Xcp09pl4BJv3HuLtU5d0/4/t7p69P4LipetsVou0XVWepfHXUV369Slc7m/v83zuQRIyhzpDqaZnNaS1ag3dCx58mbuaeqiJAPrnbWfFeVfMOxE88S/BefT7WVYAG8LxvuoS2ZNbbfsT6f7egsfi/nqaRDchj6keSar+7m97M+b4wDE7cgNm8AZczSkW4t69PgSfig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kpLrqxodzSGVxY/311SHAb1ubewG44Ubdiand/+Oi9U=; b=oh6HuVlwOYsbJB/OpdBd+wnoj6C3vm8rLF9wGLq0uqoCR9FJAnQ7JHiMd1H2nIrqSzchj8nLIaTX7rDVmUnfx4nmnTWeRi2zKns1e0Qs5Vwhru5ziMHe/nObztomBhV20UQlW38CjqGXfJHh+ItYI5U5Tgc8mWMb34FGqB9uVqg= Received: from MN2PR11MB3582.namprd11.prod.outlook.com (2603:10b6:208:ec::28) by MN2PR11MB4048.namprd11.prod.outlook.com (2603:10b6:208:153::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Fri, 8 May 2020 02:26:31 +0000 Received: from MN2PR11MB3582.namprd11.prod.outlook.com ([fe80::e1c5:b5cf:5a94:379f]) by MN2PR11MB3582.namprd11.prod.outlook.com ([fe80::e1c5:b5cf:5a94:379f%3]) with mapi id 15.20.2958.030; Fri, 8 May 2020 02:26:30 +0000 From: "Yang, Qiming" To: "Di, ChenxuX" , "dev@dpdk.org" CC: "Di, ChenxuX" Thread-Topic: [dpdk-dev] [PATCH v2] net/i40e: fix out of bounds read issue Thread-Index: AQHWJFX2HOgQEseH90GUboSjLs4aaKiddfMw Date: Fri, 8 May 2020 02:26:30 +0000 Message-ID: References: <20200507030928.42082-1-chenxux.di@intel.com> <20200507094941.87470-1-chenxux.di@intel.com> In-Reply-To: <20200507094941.87470-1-chenxux.di@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bbaaba42-3ae1-4b5e-3ee7-08d7f2f73827 x-ms-traffictypediagnostic: MN2PR11MB4048: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1122; x-forefront-prvs: 039735BC4E x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: abvJzDuF+SQrgSUY0Dk0Kzy10XRNHL8ggVqppG6u+P+Gijy8ARm8mqSJhcpey8gOjQQyKN8s5xr5Yl66V0XhnkKa5X2UVsrfIR1qTHzPrJkghtJfmmvv5n+CRJrupUcI8l24vBfsN6GzkB/HNnLccVK2ZQ37firfMsbO9219KF8jZ7GrWQ3jTmnO1SB6Zy0yb6is4kr4vbjBE2+5izk3e79WdsVkQCF+0bscGRBRnVMhd5VciBfVSx1HqQarEpn5ObAWs9VmuwjGRSH+OqupTNGBnOopS+a88S8npDpmBN6LHMGZgaii9YDCa6tD2PoakqojmgabxltlNxGZJ2IPiZVFx/2Z+0QwrzPGEfSSkihjNPvIikZG5fLqp7Ss78/YO8JFjD7tyHLE/9glGPo+N//mmAw8a0+es5eMT+uw5D20SdwTS3hVuKjuYCVbgIIeG4eis3hds+SUeHSlzdwH2684k3+B1JW7cFyetvo6wHaRvpvHh6Dl3Z6wXQhcJJX76G5xg1Z6gCioJ0uIXSOBtA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3582.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39860400002)(366004)(346002)(136003)(396003)(376002)(33430700001)(8676002)(76116006)(55016002)(9686003)(26005)(33440700001)(64756008)(66476007)(66946007)(86362001)(186003)(66556008)(5660300002)(2906002)(478600001)(52536014)(4326008)(107886003)(66446008)(53546011)(7696005)(110136005)(8936002)(71200400001)(316002)(83280400001)(83320400001)(83290400001)(6506007)(83310400001)(83300400001)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: kS4oC6Mqg0VCDmZX8un7MLblc2YKkObYk0JRb2WnBAICd/Cpi6AJ9t5w2wI85Y67gHwl4BL2N05jXmXrQ/x7KDi/3h9lTstD+CL8+TjB2LcxEYPcH2bjarHVUPFuKMu5OO9DTzJKXdToeVL+hjGg48LF/QisIm3o+dKlQrPEKbJf1HtqSyX2Y8n7n7jTmOb7dVjZtaUkbZt1y4pgHNw5WzpBC+7O3FrMSaWtL8PuhZy0Agp1WqIpnABXIhrmbvMrg6ACihEsJ4Ul4b/ep2mGO4Zgd+Ee8AwDx635jkQVczlaVofEmfb7jdLraVS1LepMr4u20RnOIgSWDmb11l+pOJdkAZz1CjiQcnpyngIZ3bE6CSXLLOaKBfvaLwu/fqDJXIj6++kYf+f88Zb70cjTm+R9DjYw+60AeU86dLJS8YSGHk3QQaOmlrydzsIvfNeZ29TI/BCZs1yCgPRO0aeV5JznpO/xL7tjG8Yfnk0FuKQnRX3DdRb7+X9Dltw545xPvBtNuloueAnC/9M+0GmUg4TbWhyromcBbg/T4SERAe0HYPTr5IW4Rk6gTaNLUq2TDopf+jt1YL2S/vP6ZUfLqZ2sjk0T2oYplU5r3PkBSRH4G3hJAujwZYbie4dHwVSC5gi5z55rJt+2IYHUavpAbLFQYTHUwIajekGygM4VpCAoAF3HnX+n1URFRGssVgbNooOemWx7+0OD50On3K3hlJnm1mnSih2loM2l7TCCOO+EhngkOFL940e44gK0r3Dw31e0Zfg7WVHjpqImVYmT88LwlI2UWLlnxlgX2A0uwgw= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: bbaaba42-3ae1-4b5e-3ee7-08d7f2f73827 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2020 02:26:30.7245 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VtlrckUklmnfiZXAaIDSCi9AiMdmncJf+eBmpHiW2tl5gwPXueuraor9PX/R5HbdFPOmBU0OCVANDV3/nuI1vA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4048 X-OriginatorOrg: intel.com 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" Nacked by: Qiming Yang > -----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 >=20 > This patch fixes (out-of-bounds read) coverity issue. >=20 > Coverity issue: 357699 > Coverity issue: 357694 > Fixes: feaae285b342 ("net/i40e: support hash configuration in RSS flow") >=20 > Signed-off-by: Chenxu Di > --- > drivers/net/i40e/i40e_ethdev.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.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; > } >=20 > + if (i =3D=3D UINT64_BIT) > + return 0; > + > for (j =3D 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; > } >=20 > + if (i =3D=3D UINT64_BIT) > + return 0; > + > for (j =3D I40E_FILTER_PCTYPE_INVALID + 1; > j < I40E_FILTER_PCTYPE_MAX; j++) { > if (pf->adapter->pctypes_tbl[i] & (1ULL << j)) > -- > 2.17.1