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 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 ; Wed, 26 Jun 2024 22:23:03 +0200 (CEST) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-366df217347so4011425f8f.0 for ; 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 To: Stephen Hemminger Cc: Sunil Kumar Kori , Rakesh Kudurumalla , Jerin Jacob , Nithin Dabilpuram , dev@dpdk.org Subject: Re: [PATCH] app/graph: fix destination buffer too small Message-ID: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 06/23, Stephen Hemminger wrote: > On Mon, 24 Jun 2024 00:09:21 +0400 > Mahmoud Maatuq 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 > > 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 ?