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 CB998A0471 for ; Tue, 18 Jun 2019 15:36:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 674A41C1B6; Tue, 18 Jun 2019 15:36:13 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20087.outbound.protection.outlook.com [40.107.2.87]) by dpdk.org (Postfix) with ESMTP id D20751C1B1 for ; Tue, 18 Jun 2019 15:36:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dJO0qR1FQvUrouXejLVHn8B8QO/pM9Nr6Mfrfvwdyfs=; b=P0cvLOx+tbkDqyXQG+Nt0HI5QmFa42c3Hf/GdVjFIlInhrD9fLR4QDyYjLWK8mPNdZ0sr+BGaGhYmIBCRM5ZxjS9jurk5xFS7OTCkkl/CjzqwJPC3xSoVaAackMCb7ZSNVUzC59QFI1piNWD9s0f7NS0c4cxtiOBldqrxOfkA0E= Received: from VE1PR04MB6639.eurprd04.prod.outlook.com (20.179.235.82) by VE1PR04MB6623.eurprd04.prod.outlook.com (20.179.235.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.11; Tue, 18 Jun 2019 13:36:11 +0000 Received: from VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::a929:3d03:7bb7:d5e0]) by VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::a929:3d03:7bb7:d5e0%7]) with mapi id 15.20.1987.014; Tue, 18 Jun 2019 13:36:11 +0000 From: Akhil Goyal To: Fan Zhang , "dev@dpdk.org" CC: "pablo.de.lara.guarch@intel.com" Thread-Topic: [PATCH v2] aesni_mb: fix out-of-bounds access Thread-Index: AQHVJRoStytZi8JSF06Lqp7h62KKUqahayKg Date: Tue, 18 Jun 2019 13:36:10 +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-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [92.120.0.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 262ebd34-1dbe-421d-6ede-08d6f3f1ed1a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR04MB6623; x-ms-traffictypediagnostic: VE1PR04MB6623: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 007271867D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(39860400002)(136003)(396003)(189003)(199004)(76116006)(52536014)(7736002)(2501003)(102836004)(64756008)(86362001)(68736007)(66066001)(305945005)(26005)(81166006)(99286004)(25786009)(81156014)(14454004)(316002)(8936002)(256004)(8676002)(53936002)(478600001)(33656002)(110136005)(74316002)(5660300002)(14444005)(6506007)(4326008)(6246003)(66476007)(9686003)(73956011)(55016002)(66556008)(71190400001)(186003)(71200400001)(3846002)(476003)(76176011)(229853002)(2906002)(6436002)(446003)(66946007)(44832011)(11346002)(66446008)(7696005)(6116002)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6623; H:VE1PR04MB6639.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: T1v4tQIjAykoh4H8+NbY1cmyRsCBG/DBq7/xFfdjguxl4INYfaLI1Uh5wD76vQAvnYDlkXaf46kmIE2L6F8WbDnYUL8KIoTN3inEa2bnDAhXnn/rp7clnkLtj1jj3emcLEMym/zdddreX8PX4yJS9JmQLC5WqqF2pM9xoSso7rZH423kcOBkCrZKdlhqyDWu1O77m4P+50jXxGOQrTMxxyOe7ZBVuaesN4DtsSVYvnVqSnkkfAMDqdsH8FjBk1q6N+zIw9ASDWEFYsC5FQqKomrNLkQNBGgiSKUOQODiUFu4vx0DO03Ub7eLlNjcIHT3yyT7PKgU4FP5S3v+8b9msmReGl74alSu9P9kfH38a2ucak7SPOWBDZM/t58LNhaPJm+RIgG5E3S8VYHlv1Im9dkrOHk/r+P0Ivm+LoWlCdc= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 262ebd34-1dbe-421d-6ede-08d6f3f1ed1a X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2019 13:36:10.8505 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: akhil.goyal@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6623 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, >=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 macro= s") >=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, > + [PLAIN_SHA1] =3D 64, > + [PLAIN_SHA_224] =3D 64, > + [PLAIN_SHA_256] =3D 64, > + [PLAIN_SHA_384] =3D 128, > + [PLAIN_SHA_512] =3D 128 > }; >=20 > /** > @@ -65,7 +73,13 @@ static const unsigned > auth_truncated_digest_byte_lengths[] =3D { > [AES_XCBC] =3D 12, > [AES_CMAC] =3D 12, > [AES_CCM] =3D 8, > - [NULL_HASH] =3D 0 > + [NULL_HASH] =3D 0, > + [AES_GMAC] =3D 16, > + [PLAIN_SHA1] =3D 20, > + [PLAIN_SHA_224] =3D 28, > + [PLAIN_SHA_256] =3D 32, > + [PLAIN_SHA_384] =3D 48, > + [PLAIN_SHA_512] =3D 64 > }; >=20 > /** > @@ -90,6 +104,7 @@ static const unsigned auth_digest_byte_lengths[] =3D { > [SHA_512] =3D 64, > [AES_XCBC] =3D 16, > [AES_CMAC] =3D 16, > + [AES_CCM] =3D 16, > [AES_GMAC] =3D 12, > [NULL_HASH] =3D 0, > [PLAIN_SHA1] =3D 20, > -- > 2.14.5 Patchworks say that there is a compilation issue in this patch. Could you please check. Thanks, Akhil