From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 3ADCF45502;
	Wed, 26 Jun 2024 22:23:05 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 19F6C40281;
	Wed, 26 Jun 2024 22:23:05 +0200 (CEST)
Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com
 [209.85.221.47]) by mails.dpdk.org (Postfix) with ESMTP id 2B98F40274
 for <dev@dpdk.org>; Wed, 26 Jun 2024 22:23:03 +0200 (CEST)
Received: by mail-wr1-f47.google.com with SMTP id
 ffacd0b85a97d-366df217347so4011425f8f.0
 for <dev@dpdk.org>; Wed, 26 Jun 2024 13:23:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1719433383; x=1720038183; darn=dpdk.org;
 h=in-reply-to:content-disposition:mime-version:references:message-id
 :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
 bh=XRda38FdNsLcpOnt65jxsHT2NuTsKkQ7e/LJ8qER0Xg=;
 b=JHZfASvVH4Jw42EuvjoQBeQ33Wd6na0jyHAjM9rth8gvyRGKzHHq4IHEOUKjk0Jjsa
 So7TokgWfDaBHV8d2LcNEdYp/ICcvrlN0t4MDPQFElDoVO4T27+7I2PCQxAj01uNThaP
 3hTwOfW3LKoekX/xpY7DzKg8weTTXnZhfKwA1/Iq2qwTJTIbrJucDdGIKfLIvbMAsWAs
 I4zC54979XzsPabiEgsxf5HvHl8BrjK+Sxo9vswcN/Qh8alMz/D0OWOUE1e7lGwqMz/c
 q7BccECx3T7m1p1se0wHur7+7mz7NydYvLpQ3joTsgCI1ftlvtMM13i/Zj35NM9hSQNq
 5SoA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1719433383; x=1720038183;
 h=in-reply-to:content-disposition:mime-version:references:message-id
 :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=XRda38FdNsLcpOnt65jxsHT2NuTsKkQ7e/LJ8qER0Xg=;
 b=I/yh54czkLLsX5sA33DcFvAmsdgwhD8xFKIIShjry4wqf5clUbnacEgcsndTyjbIsk
 nQjOfKmwASk1ot+VT+yBm5FMnKuJzf06m7VUY0fDEiNhFGkuhTyRFpKmXGGQfR+j0zkS
 HeNVYGWLJCxJqZVU+8XWfRm6K9cRMwVUDJ4m9+6sGung15V9crWiH85zn61gsY0J2qn4
 3ZJ2qBLEjLpduSnybdquNagRXpuP8kxdxH17eu0LX7G/bGfJXpOhe3t+7BB+WQJeB4he
 Z/AdLVjsZhujr5C6pzbcEuKOAWj5JKfOJ0K0zkUSK0iYTdjCB5zzATGFF3ELnbNKnRSH
 c+FQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCVDwZG99sEbbuBpBlgEuNB1fLei7ao6m2LsqsjaDMf41X5JTmQ1jQXDZ87tqfy1DKJePP8Y8PYCnmoPTBE=
X-Gm-Message-State: AOJu0YxokrtVbusdGuxAN5Cmq5JAj+Hs3wa6PxBof65nJGbsYyqTZwKx
 ImJO/TRsvItMuccMe9JCFufa1os73SwbLduVBdTn5ex5JEczhsZw3NCkm60SsbQ=
X-Google-Smtp-Source: AGHT+IG3E42iHfUNPxHN5YJmdihRKo2BfeLaWUEi4BbH0ZuVUHGVUanMRXq2H6Z7E8JPiH+tNJ1sww==
X-Received: by 2002:a5d:518c:0:b0:362:3b56:dbda with SMTP id
 ffacd0b85a97d-366e9463e46mr7005942f8f.9.1719433382286; 
 Wed, 26 Jun 2024 13:23:02 -0700 (PDT)
Received: from localhost.localdomain (bba-2-50-153-93.alshamil.net.ae.
 [2.50.153.93]) by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-3663a2f6f0csm16720749f8f.75.2024.06.26.13.23.00
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 26 Jun 2024 13:23:01 -0700 (PDT)
Date: Thu, 27 Jun 2024 00:22:58 +0400
From: Mahmoud Matook <mahmoudmatook.mm@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Sunil Kumar Kori <skori@marvell.com>, 
 Rakesh Kudurumalla <rkudurumalla@marvell.com>, Jerin Jacob <jerinj@marvell.com>,
 Nithin Dabilpuram <ndabilpuram@marvell.com>, dev@dpdk.org
Subject: Re: [PATCH] app/graph: fix destination buffer too small
Message-ID: <j7xn7frfi4pmyrlgfhkbjivhjg6qohmsycxmd6fn5t5bg54lb7@zvg3wncm2cp3>
References: <20240623200921.1715890-1-mahmoudmatook.mm@gmail.com>
 <20240623132607.707a82e2@hermes.local>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20240623132607.707a82e2@hermes.local>
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On 06/23, Stephen Hemminger wrote:

> On Mon, 24 Jun 2024 00:09:21 +0400
> Mahmoud Maatuq <mahmoudmatook.mm@gmail.com> wrote:
> 
> > as sizeof(config.rx.mempool_name) is < sizeof(res->mempool), it's safer
> > to copy min size of them to avoide out of bound memory write.
> > 
> > Coverity issue: 415430
> > Fixes: 3850cb06ab9c ("app/graph: add ethdev commands")
> > Cc: skori@marvell.com
> > 
> > Signed-off-by: Mahmoud Maatuq <mahmoudmatook.mm@gmail.com>
> 
> NAK, this could create an invalid not null terminated string.
> 
> Since mempool name is a null terminated string this should have always
> used strlcpy instead of memcpy.

in patch v2 of this it's changed to strlcpy but we got truncation
warning as source buffer size is 128 and the dest buffer size is 26 
can we incrase the size of the source buffer ?