From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DB46CA0C4C; Tue, 21 Sep 2021 16:41:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ADC5640DF8; Tue, 21 Sep 2021 16:41:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 5B5814003C for ; Tue, 21 Sep 2021 16:41:13 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18L99EhB005194; Tue, 21 Sep 2021 07:41:12 -0700 Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2105.outbound.protection.outlook.com [104.47.70.105]) by mx0a-0016f401.pphosted.com with ESMTP id 3b7cgt93m2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Sep 2021 07:41:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H11IwFbhAldO3EDOhau17WDCp2h/A+yAZ7XyTMDA2yPyOf6OlcjrBqH5Mn3y6lrgc+H6o+NiaxK4VtKImcbM4fqmO1mdQhibRMm2d0okTaOhOWLbQjnXrXOZZOPHGjYu+RHVrYU/X4oyU0S1Fenjk5OZgKTTpoootioAzlnGbgCR0Jd3DgxaUI215XEn219DOAzPTTWgFi0Ppfh93QBBB2V7SwangH8jyr0MSxKKR30KwUdLmURwGDyEtaEiQ/h2RMjWK+2GFUcnTPVYeAT5H+tcQttVjLepQUCbpas5GkCmSvcsmQtVq8dlhWiTPehUWuJXxv996gfek6+1aFl5sg== 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; bh=pM7GHRgfJqhLnfA0aOwfeCpsAsCVTxAVMCBsadRmcg8=; b=NrQBSGVhVoOHTuKUHmFzUdCW9Ri6QbE3+dr5oov+OiK+Mw2X5h3BNYsIvh9zSX/A/yla5EbABMBXBj6VXy8FziO+7ZMQrrDJS+Z9+cpuANGqCabibh/NqLKaI8+W6Gzi9JBKipu7gB544+KSdhnvf17+M4J9bsaW/pzXK0NHhsD4zOsSWBuVtFXvvNcrP7gnfCZmSOB/n3o7CFXan44GpofxHstmV2HrwFuxdqsgw+VP7/rTdwjH3dYiD3h2qXlZ3aIzpZXpI6Gup+UcKHr8e3Sy7iFNAAfu1q4jse7NywT5PS/4KyVLNVHEImkSrGJwhGHcXXj/F69YrUybxUrK9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pM7GHRgfJqhLnfA0aOwfeCpsAsCVTxAVMCBsadRmcg8=; b=IKxVs1ZiU+Uq74kkQdq0XU6MJiaISeer/XkwYI3kj4krRxdyqzAO7eCQuML0NaW6SO1C38XBShzOdc75XZPFMqior6VIenZq9TcmevQ3nf3GHGaJKYuabitjCFuiz5NkkZkO5x9FVQjmXyDg+tdckMmvAxU96qzkr8UkpwF7Sro= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by PH0PR18MB3990.namprd18.prod.outlook.com (2603:10b6:510:28::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Tue, 21 Sep 2021 14:41:08 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::94d1:2b0c:115f:5a75]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::94d1:2b0c:115f:5a75%7]) with mapi id 15.20.4523.018; Tue, 21 Sep 2021 14:41:08 +0000 From: Pavan Nikhilesh Bhagavatula To: Przemyslaw Zegan , "dev@dpdk.org" CC: Akhil Goyal , "roy.fan.zhang@intel.com" Thread-Topic: [EXT] [PATCH] app: fix buffer overrun Thread-Index: AQHXruuqjlu6ZIthRkOWEr2MlBF7tquuj0EQ Date: Tue, 21 Sep 2021 14:41:07 +0000 Message-ID: References: <20210921132125.6109-1-przemyslawx.zegan@intel.com> In-Reply-To: <20210921132125.6109-1-przemyslawx.zegan@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ba060362-cf7d-428f-d036-08d97d0dd928 x-ms-traffictypediagnostic: PH0PR18MB3990: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CFIk20h3lKE6kAJhOT7uVMFCKGjQuEjxV4rK+3fBkDhv4AvezjmpLNSMP5CFknf6fWCqhghReQAxVJtK7zk3n4LKXgIyU8tl33mCDyzhLKi3m7XcE33DjIEweGO1A4PJbp5WrmfGC2iU5Yr4zKoaRVWNxNDpDhxRpPe2n2bspFO45C54Bw0drMaUvD5Fs7+aec2Lkwgei7XGsXX3a8yR2aPmW5xi9kjCL3UYBx8jKlpHnv+XE2kXX7yiRWiogbdnphRy1lIGrZDUCXHljAqRWrskxOC6h3xEIrCuWSeLUPqKHoWsIyGgI/EiGs7Zodv0wGlCjtFpP3yXNC3ppE616MS00UDWhBiQwLVd3hZ13w7MdjvmEgOBh3Ib7ayISj35YjslWwUYhwceuDYY5NUjdnx9vQyyXBAhfILPVUApPcjpGxICHyLMCtvzwO+ZcL9d0pJsuEMozuwhkbF+BQwUfhDj7xDo8S5FXFqOjMMCImkWQ22Vu0iR1ml55cfKkUCJWSoIZUjhx2ZeovJkL/CkSmVuepMI6IPTddcgUmRY7pPNkNXdiBBS40ACg48NPcgKvHOXDS7qCq1L+O8BCHnvloj2lliLZePLNKaYB9yZN52jo+oHl1ix6p9mZUewRvIitX1PtR+IjxNJFZbOUWJD8S7W5/vv5IB6Z9TsHJXzVbYlpF+U8/ObaEJocBKSBgdAeVjN2g8aPrLwgFW2bkYF7g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4086.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(186003)(508600001)(33656002)(55016002)(83380400001)(8936002)(66476007)(66446008)(66946007)(64756008)(5660300002)(38070700005)(66556008)(4326008)(316002)(8676002)(38100700002)(110136005)(54906003)(122000001)(76116006)(9686003)(2906002)(6506007)(7696005)(71200400001)(52536014)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?rE4mDLgHvmO3ffonm0/rXbe8/MNWmGfhhGnKM5cazwXmT4a/oCNkz48XlZRE?= =?us-ascii?Q?H/B3bcUiqKwYwMR6ztPlYcMhP3x8Q2u7pEwCvgrcuJJBMT2/Bwzg7agre4Pk?= =?us-ascii?Q?PQ+ZnaKbz6xKEmiXpeawWtmAMXqev4gsWReJkZS2NR88fh5fm/hvELT5E0mO?= =?us-ascii?Q?IWrwiPDNYcisYz+Gj7Ysr8e8QhpzCACSRqZDWho/g+ItyFR4oFAi4lvEyP+p?= =?us-ascii?Q?4x3DVSrfa3N3ED90Ssn5rsLpg+mQhHW9YfHLTql73JW9kGggotO++gUxEEcD?= =?us-ascii?Q?96iR4wDZlJWYQ7Kn8w8z2szazXb/A3iETFHhk3ECubxA5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bhbmSRJmurPEA9w0d0CpTwxrBA5D9ofowxMqT/89nWqrGO5?= =?us-ascii?Q?6EipWYmJ/EObCfCo8Vwr359/kyoBFZftdYzlURUU4ECMHMc6rwAHeMMgZRUS?= =?us-ascii?Q?fLzlbXrqCZRdGWcA/Bh29/h0XnXqbXFJGND0wgNd2CxUpk5kXTf2OlfDsbn5?= =?us-ascii?Q?ueYk1ZTcXeNaJ9WPnUHnDlmpMFlp?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4086.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba060362-cf7d-428f-d036-08d97d0dd928 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2021 14:41:07.9420 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VDepa94mx33EQIsLgt4LUxT28hHR7B3P84mfr8dGm9J0gmYJCWWa6BalXWUfGd7sJ8HohxIT6hj/BWxtt389dpSFk1XHXz6GzBNcY7TU2uI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB3990 X-Proofpoint-ORIG-GUID: 18E-SZLBI_oN6WqYzo915zXQVOYEfeNp X-Proofpoint-GUID: 18E-SZLBI_oN6WqYzo915zXQVOYEfeNp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-21_04,2021-09-20_01,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] [PATCH] app: fix buffer overrun X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" >This patch fixes a possible buffer overrun problem in crypto perf test. >Previously when user configured aad size is over 12 bytes the copy of >template aad will cause a buffer overrun. >The problem is fixed by only copy up to 12 bytes of aad template. > >Fixes: 761a321acf91 ("event/cnxk: support vectorized Tx event fast >path" ) >Cc: pbhagavatula@marvell.com > I don't see how the above mentioned patch is related to test-crypto-perf. Could you please recheck? >Signed-off-by: Przemyslaw Zegan >--- > app/test-crypto-perf/cperf_test_vectors.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/app/test-crypto-perf/cperf_test_vectors.c b/app/test- >crypto-perf/cperf_test_vectors.c >index 0af01ff911..2c7e314ec8 100644 >--- a/app/test-crypto-perf/cperf_test_vectors.c >+++ b/app/test-crypto-perf/cperf_test_vectors.c >@@ -548,12 +548,16 @@ cperf_test_vector_get_dummy(struct >cperf_options *options) > t_vec->aead_key.data =3D aead_key; > > if (options->aead_aad_sz) { >- t_vec->aad.data =3D rte_malloc(NULL, >+ t_vec->aad.data =3D rte_zmalloc(NULL, > options->aead_aad_sz, 16); > if (t_vec->aad.data =3D=3D NULL) { > rte_free(t_vec); > return NULL; > } >+ >+ if(options->aead_aad_sz > 12) >+ options->aead_aad_sz =3D 12; >+ > memcpy(t_vec->aad.data, aad, options- >>aead_aad_sz); > t_vec->aad.phys_addr =3D >rte_malloc_virt2iova(t_vec->aad.data); > t_vec->aad.length =3D options->aead_aad_sz; >-- >2.17.1 > >-------------------------------------------------------------- >Intel Research and Development Ireland Limited >Registered in Ireland >Registered Office: Collinstown Industrial Park, Leixlip, County Kildare >Registered Number: 308263 > > >This e-mail and any attachments may contain confidential material for >the sole >use of the intended recipient(s). Any review or distribution by others is >strictly prohibited. If you are not the intended recipient, please contact >the >sender and delete all copies.