From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D50A5A0471 for ; Tue, 18 Jun 2019 18:34:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3F2481C23F; Tue, 18 Jun 2019 18:34:51 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B11231C218 for ; Tue, 18 Jun 2019 18:34:49 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2019 09:34:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,389,1557212400"; d="scan'208";a="186170692" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga002.fm.intel.com with ESMTP; 18 Jun 2019 09:34:47 -0700 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 18 Jun 2019 17:34:46 +0100 Received: from irsmsx112.ger.corp.intel.com ([169.254.1.194]) by irsmsx155.ger.corp.intel.com ([169.254.14.100]) with mapi id 14.03.0439.000; Tue, 18 Jun 2019 17:34:46 +0100 From: "De Lara Guarch, Pablo" To: "Zhang, Roy Fan" , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" Thread-Topic: [PATCH v2] aesni_mb: fix out-of-bounds access Thread-Index: AQHVJRoUAr9lLWYWiUC3nAsXVEhvgKahnLjA Date: Tue, 18 Jun 2019 16:34:46 +0000 Message-ID: References: <20190515153259.74322-1-roy.fan.zhang@intel.com> <20190617143129.7106-1-roy.fan.zhang@intel.com> In-Reply-To: <20190617143129.7106-1-roy.fan.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDlhODMyNGQtNDVhYS00YmYxLTgxOTEtZDJlZTNkNGU0MjQ3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiM25OTmJ4SW94cytveEdROE9cL3BXWG1VVFRrY25wTzRDSEFXSzFDUXIrQ0JRWkxsdGh2ZWZ4YXlTcHNHaHNCRUoifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] aesni_mb: fix out-of-bounds access 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 Fan, > -----Original Message----- > From: Zhang, Roy Fan > Sent: Monday, June 17, 2019 3:31 PM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; De Lara Guarch, Pablo > ; Zhang, Roy Fan > > Subject: [PATCH v2] aesni_mb: fix out-of-bounds access >=20 > This patch fixes the out-of-bounds coverity issue by adding missed > algorithms to the array. >=20 > Coverity issue: 337683 >=20 > Fixes: c68d7aa354f6 ("crypto/aesni_mb: use architecture independent > macros") >=20 > Signed-off-by: Fan Zhang > --- > drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 17 > ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h > b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h > index 4d439360f..dda78d989 100644 > --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h > +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h > @@ -41,6 +41,14 @@ static const unsigned auth_blocksize[] =3D { > [SHA_512] =3D 128, > [AES_XCBC] =3D 16, > [AES_CCM] =3D 16, > + [AES_CMAC] =3D 16, > + [AES_GMAC] =3D 16, > + [AES_GCM] =3D 16, As Akhil has pointed out, there is a compilation error, because there is no AES_GCM in JOB_HASH_ALG list. I think instead what's missing is NULL_HASH, which block size should be 0. Thanks, Pablo