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 09B5D454EB; Tue, 25 Jun 2024 06:42:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8065F402A3; Tue, 25 Jun 2024 06:42:11 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id EF5834026F for ; Tue, 25 Jun 2024 06:42:09 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45OJFxNh031157; Mon, 24 Jun 2024 21:42:09 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2171.outbound.protection.outlook.com [104.47.58.171]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3yyet2seuh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Jun 2024 21:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gazi7Ls89s+zQ4tN8N9mEFHBp7gSZxMiMFi/7WUAG+JLqdaVUCQcEdnIFrJ2Aup04oThDlny8MlOLfrO1bXz3BNrCsoMCWvTO43iagpjkGbgZmT7LjjxWflWFc4za60AxK6c1q1Wx//Lu4it8HCJJfDWlH07LbSoKfVMKJg0UvO1o/eObSm2shFck5FCecrbCwO59G+Q+xCUp/dqbGSm67m57kKuYxIIZPLKTct2j2rV8LgLXiLw3+G+5JOQPKjmS/PduFtWN7iHS0iUz3B6E+HurtrStsjEymGOMgNKSiBu+MBNcyxgsesi/8j8FUhm2SbfKbjtSaqTVsf3RhSFdA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0T/Sml9DyfUCINnUKT/8M0mzFW+bOSWVQoxP+HSol04=; b=MVB5/QohD232GRn0WjPDUgK5owxMq3i7WgsO+7LumkaBbsI69HBcmfbTvcxPVgJsM2vM6GOsoC7BPwer/010ihwwgf5Rp3mlon98ujSu4PGWQvmjmMnzynxbndMSNm3AxNnsnxhT71abvmELKD90Sajwsw6+schLZ7zDleW1CGS8h5vC/ic8JpSCZ5Dr76OtoAtTIE/q+ANot+yqatHtL1EZhL+pNSaqwaylG6jLHp6IIZ1TfK6DMavLitXh4NgYbXvkGz/qrfPmketmVpv8Pm1QVNQH7F8iLjw6aYqeNDXatC6+3adAbG1Q62f2RoRrIU/dldLZtmSr+100vCKiDw== 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.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0T/Sml9DyfUCINnUKT/8M0mzFW+bOSWVQoxP+HSol04=; b=DiFErkH8fTk7/axg9gkKzSfhk97378T1E5BGFXUB8RUK9MJCuf50IEepWOSVctdwxNVPxsFPpu2HDKFtidseSs6Kva/l8ClHd7B/Iq/CbyX0oUQI8k6KxSdHfD1VgxsKONZ7lQDMhiPO2dz3OiSfYoVrksa7QP1RbN8K5gSPdTg= Received: from PH0PR18MB5071.namprd18.prod.outlook.com (2603:10b6:510:16b::15) by CH3PR18MB5486.namprd18.prod.outlook.com (2603:10b6:610:163::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.29; Tue, 25 Jun 2024 04:41:59 +0000 Received: from PH0PR18MB5071.namprd18.prod.outlook.com ([fe80::25e:7:91b:8f1c]) by PH0PR18MB5071.namprd18.prod.outlook.com ([fe80::25e:7:91b:8f1c%5]) with mapi id 15.20.7698.025; Tue, 25 Jun 2024 04:41:59 +0000 From: Kiran Kumar Kokkilagadda To: Mahmoud Maatuq , Sunil Kumar Kori , Rakesh Kudurumalla , Nithin Kumar Dabilpuram , Jerin Jacob CC: "dev@dpdk.org" Subject: RE: [EXTERNAL] [PATCH v2] app/graph: fix destination buffer too small Thread-Topic: [EXTERNAL] [PATCH v2] app/graph: fix destination buffer too small Thread-Index: AQHaxnFT15USl8WoeUa204kwv5pmh7HX5sng Date: Tue, 25 Jun 2024 04:41:59 +0000 Message-ID: References: <20240623200921.1715890-1-mahmoudmatook.mm@gmail.com> <20240624200114.1792214-1-mahmoudmatook.mm@gmail.com> In-Reply-To: <20240624200114.1792214-1-mahmoudmatook.mm@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB5071:EE_|CH3PR18MB5486:EE_ x-ms-office365-filtering-correlation-id: 7efb9255-2e9c-4532-8699-08dc94d1265a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230037|376011|366013|1800799021|38070700015; x-microsoft-antispam-message-info: =?utf-8?B?WDF3Y0RJeURoamFzTXJZOWNTbklEelN5b21qK08xUEtKbHlyaDR3VjlLZ05u?= =?utf-8?B?eXdQb0g4UUdwSW15bzk2YnpFMjF2TW96UHpqVXlRejllNXFJQ05QVUhpWXR2?= =?utf-8?B?eE9mVTlEdXlJalJRV3VLemphWnc3TXZvOXBiWmp3cFEzbm10YzJnRTR3N2tS?= =?utf-8?B?eDdpWTN6VDVOWkpKanhtM3FneG9pWndPNG9ObzNsbHVIc3FmRGNCSFNKb3dm?= =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ZNNE1mM0gvcEJOeElD?= =?utf-8?B?NlREN3g3eTUzZUh5MUJCT1M3SDNPNk0xRlY0K2hDUlJ4Sm91Qm1CdnlLNU1R?= =?utf-8?B?Wi9CcDNtL1JEbnVndjMyenREYk10c2FNVVhJSWNWMmFGL1YxaGlIZ3BpSW5U?= =?utf-8?B?dHp4RUpxSXdidUJJTGU5cXQ1clRpa2Q5dEtPU3kvbzJlRFIzNStPNkx3Qnd2?= =?utf-8?B?Q2JsbjVJQko1ZHJiRzQ5b0p5VVZha1RDR2pNOG1ONFRHSVNieEticjVZbUhn?= =?utf-8?B?Y3NMYjh6UHRLMnBKeldCcVNzSXBHekxnejZwdDFBZXhiZkJ1ZEoxd2NjdGp0?= =?utf-8?B?S3pMajl5UmdPRGJ4dTV0L3NSbVhzU0NleUVYZEZZeEx6QjUzeCtxRXgrVnBE?= =?utf-8?B?bndRcGZ5Nk1TaHNHN2FkR2VrT2tBUGRiZVdnTHR3WGNESk9jSlg2TTB0MjNr?= =?utf-8?B?T05POFI2ZU1wTXI1VklFNk5QTFZLSHA0U3VMLzd0enlnQXVhNHhwbGxidXFH?= =?utf-8?B?cTlLdlRyUmhkYkp6bUtmWTlZaXgzeEk0NVBRQXAvcGN1WVRNcHdUSGtTcHRT?= =?utf-8?B?S1NyM3MzWFp6V1F2UDRIQTZCSnVaVnJ6bXpob2RuTnBxR0tNMWY4cFN3Yzd4?= =?utf-8?Q?dizQFfJzDis6ZFiV6bFic6UqbNJY6r8k+Q+xjlX?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB5071.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(376011)(366013)(1800799021)(38070700015); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?ZWlHTnhVbTlYRzY0eDNtY3BLeWFYTHNELzd4RkEzMVdUT1M4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eklqdkpxQ1lHU2hBU1JhalNFWFBKTmpQaDgrMU9uWEZMQUkx?= =?utf-8?B?MFNaYU9kcmIwTUxqWFZ5K0ZVTGxqcXVKZDNseUFTdWF0SlpvM2x6L2hqcVVN?= =?utf-8?B?eFpUanNmdFUxTk5PU0lGSmZpNk1HWHNkKzRxVFRYMDJkUC9UWWFUVnJVR3Ar?= =?utf-8?B?YldmZzF0TytUUFJGOUxoRTJJenE3VVowcksyZFphZG0xQklwL1d5L2dXY3Fq?= =?utf-8?B?MndCS1ZSQjM3L29XMEFvNlU2YWxDUEI4bUFaSFFQUjIxckorY0NxZEV5MytT?= =?utf-8?Q?s2R1UT2+e82QoVPm8rVAmzyqa?= Content-Type: multipart/alternative; boundary="_000_PH0PR18MB50710C726BFEBA4DAE54B0A0ACD52PH0PR18MB5071namp_" MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB5071.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7efb9255-2e9c-4532-8699-08dc94d1265a X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jun 2024 04:41:59.2074 (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: 43KMOATQKICZGVxJQ7JtmUmPeKvN4eOLsLWeZn7Yu0+4F6HWHc8YrMBKo9z2gvDuAcMtr51itUdgd+JTtujBLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR18MB5486 X-Proofpoint-ORIG-GUID: sBW5SocqcONS2476D2IB4j4bDBD_51Tq X-Proofpoint-GUID: sBW5SocqcONS2476D2IB4j4bDBD_51Tq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-25_01,2024-06-24_01,2024-05-17_01 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 --_000_PH0PR18MB50710C726BFEBA4DAE54B0A0ACD52PH0PR18MB5071namp_ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Mahmoud Maatuq Sent: Tuesday, June 25, 2024 1:31 AM To: Sunil Kumar Kori ; Rakesh Kudurumalla ; Nithin Kumar Dabilpuram ; Jerin Jaco= b Cc: dev@dpdk.org; Mahmoud Maatuq Subject: [EXTERNAL] [PATCH v2] app/graph: fix destination buffer too small as sizeof(config.=E2=80=8Arx.=E2=80=8Amempool_name) is < sizeof(res->mempoo= l) we should copy at most sizeof(config.=E2=80=8Arx.=E2=80=8Amempool_name) = and replace memcpy with strlcpy as mempool name is a null terminated string= Coverity issue: 415430 Fixes: 3850cb06ab9c ("app/graph:=E2=80=8A as sizeof(config.rx.mempool_name) is < sizeof(res->mempool) we should copy at most sizeof(config.rx.mempool_name) and replace memcpy with strlcpy as mempool name is a null terminated string Coverity issue: 415430 Fixes: 3850cb06ab9c ("app/graph: add ethdev commands") Cc: skori@marvell.com Signed-off-by: Mahmoud Maatuq > --- v2: * replaced memcpy with strlcpy --- app/graph/ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/graph/ethdev.c b/app/graph/ethdev.c index cfc1b18569..e7a02b40a9 100644 --- a/app/graph/ethdev.c +++ b/app/graph/ethdev.c @@ -16,6 +16,7 @@ #include "ethdev_priv.h" #include "module_api.h" +#include "rte_string_fns.h" static const char cmd_ethdev_mtu_help[] =3D "ethdev mtu "; @@ -671,7 +672,7 @@ cmd_ethdev_parsed(void *parsed_result, __rte_unused str= uct cmdline *cl, void *da memset(&config, 0, sizeof(struct ethdev_config)); config.rx.n_queues =3D res->nb_rxq; config.rx.queue_size =3D ETHDEV_RX_DESC_DEFAULT; - memcpy(config.rx.mempool_name, res->mempool, strlen(res->mempo= ol)); + strlcpy(config.rx.mempool_name, res->mempool, sizeof(config.rx.= mempool_name)); Can be changed to strlcpy(config.rx.mempool_name, res->mempool->name, sizeo= f(config.rx.mempool_name)); ? config.tx.n_queues =3D res->nb_txq; config.tx.queue_size =3D ETHDEV_TX_DESC_DEFAULT; -- 2.43.0 --_000_PH0PR18MB50710C726BFEBA4DAE54B0A0ACD52PH0PR18MB5071namp_ Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

 

 

From:= Mahmoud Maatuq <mahmoudmatook.mm@gmail= .com>
Sent: Tuesday, June 25, 2024 1:31 AM
To: Sunil Kumar Kori <skori@marvell.com>; Rakesh Kudurumalla &= lt;rkudurumalla@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@ma= rvell.com>; Jerin Jacob <jerinj@marvell.com>
Cc: dev@dpdk.org; Mahmoud Maatuq <mahmoudmatook.mm@gmail.com><= br> Subject: [EXTERNAL] [PATCH v2] app/graph: fix destination buffer too= small

 

as sizeof(config.=E2=80=8Arx.=E2=80=8Amempool_n= ame) is < sizeof(res->mempool) we should copy at most sizeof(config.= =E2=80=8Arx.=E2=80=8Amempool_name) and replace memcpy with strlcpy as mempo= ol name is a null terminated string Coverity issue: 415430 Fixes: 3850cb06ab9= c ("app/graph:=E2=80=8A

as sizeof(config.rx.mempool_name) is <=
; sizeof(res->mempool) we should
copy at most sizeof(config.rx.mempool_name) and replace memcpy with
strlcpy as mempool name is a null terminated string
 
Coverity issue: 415430
Fixes: 3850cb06ab9c ("app/graph: add ethdev commands")
Cc: skori@marvell.com
 
Signed-off-by: Mahmoud Maatuq <mahmoudmatook.mm@gmail.com>
---
v2:
* replaced memcpy with strlcpy
---
 app/graph/ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
 
diff --git a/app/graph/ethdev.c b/app/graph/ethdev.c<=
/pre>
index cfc1b18569..e7a02b40a9 100644
--- a/app/graph/ethdev.c
+++ b/app/graph/ethdev.c
@@ -16,6 +16,7 @@
 
 #include "ethdev_priv.h"
 #include "module_api.h"
+#include "rte_string_fns.h"
 
 static const char
 cmd_ethdev_mtu_help[] =3D "ethdev <ethdev_name> mtu <mtu=
_sz>";
@@ -671,7 +672,7 @@ cmd_ethdev_parsed(void *parsed_result, __rte_unused=
 struct cmdline *cl, void *da
            &nbs=
p; memset(&config, 0, sizeof(struct ethdev_config));<=
/pre>
            &nbs=
p; config.rx.n_queues =3D res->nb_rxq;
            &nbs=
p; config.rx.queue_size =3D ETHDEV_RX_DESC_DEFAULT;
-            mem=
cpy(config.rx.mempool_name, res->mempool, strlen(res->mempool));=
+           strlcpy(c=
onfig.rx.mempool_name, res->mempool, sizeof(config.rx.mempool_name));
 
Can be changed to strlcpy(config.rx.mempool_name, res->mempo=
ol->name, sizeof(config.rx.mempool_name)); ?
 
            &nbs=
p; config.tx.n_queues =3D res->nb_txq;
            &nbs=
p; config.tx.queue_size =3D ETHDEV_TX_DESC_DEFAULT;
--
2.43.0
 
--_000_PH0PR18MB50710C726BFEBA4DAE54B0A0ACD52PH0PR18MB5071namp_--