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 52A5E454E8 for ; Tue, 25 Jun 2024 01:59:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E0204026F; Tue, 25 Jun 2024 01:59:27 +0200 (CEST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id 8997B400EF for ; Tue, 25 Jun 2024 01:59:25 +0200 (CEST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3621ac606e1so3510315f8f.1 for ; Mon, 24 Jun 2024 16:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273565; x=1719878365; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kHBvfgHt+c6XTjVWc1V0EElS13hlGt8RCB8tK8f31p0=; b=fTXJIK+yCUjZekuKuTyn2SloXtRUeTZvYHp5y+MI0QQLJkXPu9frO/Wyox6xaKv8Qx cUvHQOdkLCXjR7fZsqfpWBLzUY8Zt2C48a4MRk5e/wBiZLwzgcH6aeM44Cp+18LQUO1M XGtQ0auA97SF2CZ0pPPj260vzRWhZhyp1hWUobec8qrDJ3gADcqHyISrOvGetXN3FqYX My5MXqJ2G7cVftcI3GefS2SCrZ0XcPsHcLpJ8uEUmcsdOWD+CKT7xnpzbmNQT5q9jwVf IuqqTQm/zpfBWU5btDEUSmizIhkJALQJ6qHpcSHA7UfUYLixgEEozVuIO1/8KiVsXizB 9YMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273565; x=1719878365; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kHBvfgHt+c6XTjVWc1V0EElS13hlGt8RCB8tK8f31p0=; b=RNPBmdGHMDpGWktzuo1VETiVRg8Wz/X0AOF8lwgkTmHMeamzjdxv3x9MQtsUpg85SI IUKg2aLmlJ1fNLlea21UjX/eMoBDu14xplkerUEgEE3m0dFuHu54lZOesmpQThgw93+e 5nBQAq8PQPI7gokKODyEgtka61B+FkiUVpnPOX6/QpHLoUWZKrfjvr53jvqbQReTfuAx m3KZOGc1v6CnXqi4c2hUOnaUxJ003wrgIGRioYgbJwtc0XlOVGhNz7Z6k50NfOTKzX/5 mi7nlpZHXZ0+o0vtt9hetmWyPxRDcygtblNtUktJmPMk/22LeL/MvUONFOswAvrgFrFD yjMA== X-Gm-Message-State: AOJu0Yw5rThsn6GDrlve8AwD5j3bm7EbI5MQJwBK85ptyR6yXYlTbcT6 9k5UXchWXG1Lu2aCVC2JL7Hb+KjX/NBjdBrblIjqibiF+iYXIWBrQu1CpA== X-Google-Smtp-Source: AGHT+IERNtv8edCnspMdp8FunJRgKU8tN4hv63Zp7a6Y1j9B0xrlJqk0aHDB5xdXGP26PnxPrtcGjA== X-Received: by 2002:adf:f048:0:b0:366:e308:f9a1 with SMTP id ffacd0b85a97d-366e36afb4bmr5597302f8f.23.1719273565116; Mon, 24 Jun 2024 16:59:25 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-366fbbac944sm1368220f8f.116.2024.06.24.16.59.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 16:59:24 -0700 (PDT) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: dpdk stable Subject: patch 'pcapng: add memcpy check' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:57:50 +0100 Message-Id: <20240624235907.885628-4-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/461739eed3b49b2106ec8c8074f04daaa00d4a95 Thanks. Luca Boccassi --- >From 461739eed3b49b2106ec8c8074f04daaa00d4a95 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 20 May 2024 18:01:03 -0700 Subject: [PATCH] pcapng: add memcpy check [ upstream commit 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd ] When adding option with no data, the rte_pcapng_add_option would call memcpy with src of NULL and size of zero. This generates a warning if fortify is enabled. Bugzilla ID: 1446 Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") Signed-off-by: Stephen Hemminger --- lib/pcapng/rte_pcapng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c index 80d08e1a3b..d8fd36799b 100644 --- a/lib/pcapng/rte_pcapng.c +++ b/lib/pcapng/rte_pcapng.c @@ -110,7 +110,8 @@ pcapng_add_option(struct pcapng_option *popt, uint16_t code, { popt->code = code; popt->length = len; - memcpy(popt->data, data, len); + if (len > 0) + memcpy(popt->data, data, len); return (struct pcapng_option *)((uint8_t *)popt + pcapng_optlen(len)); } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:13.451616314 +0100 +++ 0004-pcapng-add-memcpy-check.patch 2024-06-25 00:22:13.061183121 +0100 @@ -1 +1 @@ -From 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd Mon Sep 17 00:00:00 2001 +From 461739eed3b49b2106ec8c8074f04daaa00d4a95 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index f74ec939a9..7254defce7 100644 +index 80d08e1a3b..d8fd36799b 100644 @@ -23 +24 @@ -@@ -128,7 +128,8 @@ pcapng_add_option(struct pcapng_option *popt, uint16_t code, +@@ -110,7 +110,8 @@ pcapng_add_option(struct pcapng_option *popt, uint16_t code,