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 64F29468E4 for ; Thu, 12 Jun 2025 23:11:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6099842E0C; Thu, 12 Jun 2025 23:11:23 +0200 (CEST) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id 0D59F42E0C for ; Thu, 12 Jun 2025 23:11:22 +0200 (CEST) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3a5123c1533so996989f8f.2 for ; Thu, 12 Jun 2025 14:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749762682; x=1750367482; 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=cXre60nzMaKZViUcfFTlojRJGGYNjkuvfZueJqjlKQI=; b=KWdopwg4SDJFFFUQ9ta8GYxpqIdwyK42gw/YBwJyDplMleLCRAKx/BEkVLCwXlF8/n Ov93u5jIe4XjSeI+hj4h+6RAFBP/rX29hDbzDhtu6xUTiTS3rjNFaYwosadXRbeT8zNx hBSaCDTE3VnMF9T/40EyG43qVwzIu71qkOAuGS9X5VMTHgWKFeYmv4fiom9CAXrE1Iba fTX68zpGdsJ8kuHfZXBpAGcXWG8rdNVuwO4UOxzlBp77Qw7wEMQHghtiUHCkoLTOeiBJ 5kpr92qlb3V+sfYwE733xxP2aCVIIi5sKu/W4NRfOknqBW7eB3c0DLOWY5wD9FTxiSU4 AnOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749762682; x=1750367482; 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=cXre60nzMaKZViUcfFTlojRJGGYNjkuvfZueJqjlKQI=; b=R/6ARZfTrgq8Shf6c6NuoY951juPsPL0wIjs/y4tNGAP8iFhKqv2PWC4dAXPL7MzMb nKmjeCmUu5IMVxo061HkRGbYTHiG6uJhBgc82xVtEK6+mstNzV3L18sx0tYVQkvFRMwo lqwjkZL1zQ2fHjbOZ9yAMxU+pJyQfIu3EC1VKB9GNYePSs8LF0yHy2uSZA4oJ/mvjQDV FMQOHYCwvXawqofPUlMDUhLvn/2Daf3eE0Ss+B0Qjj9FGo6OuJaCRwNMLZKW33U2PeYT mbaABMVRmOlylLTpzUupJbWqgr5jMziOHGP+tA/kTnF2yObTl646nCaSBQh/klSPpVOG br/Q== X-Forwarded-Encrypted: i=1; AJvYcCUHzECV9FlW5jHLUsgikNecSSy0BrSTkBQoc9Rmqf4zTvjP17BmSl/aPQ6LKZtXMB8a9w9Yatc=@dpdk.org X-Gm-Message-State: AOJu0Yzqbmobi775MIxu14OvIXdqbVdD051UyXskBxyz5uDGq70xR3Nc ugs7LN0gNLGl1IkERWwLifVo2xeLagvsFa4h0lZnEay8c4UTmj0ql/Zo X-Gm-Gg: ASbGncuLQPVYe4iHh0+9V4oADFQoT+bw866S7AO/neJR+NmkXZNbGTZjhsuhZ9kQtew CNp3BlZEhJQTyhskyrYKDA1Z+LYPynsLp03++eDUMQrOr85C5HN39rn8ci9FHprsFsrEzm1Yi8c NDndqTOafj/55IfEjWwjfjFt62AhJSYfpefnbXVUbSE7pjVOF5W5wh0dGBzmJDKLypkTcJe6GoP k2xWKLCnXvPghckp3a0V+PnKEqtnHcdnerQUhY4fzNJBWoYnMDimE+ULp3lvtIhGOWLCaSKqDV5 vhtHJR0bq371TjRtlz5OIcFkOPD7qdvoY0pZ+u1rus4fTHXEliONnRxsY8cH1ZZAe4Sg X-Google-Smtp-Source: AGHT+IEPk+nofYCROcPImKWr0dfGDC3rR7z5lqIhvk+Al4o3rAoegAo1V/K5Th9qwMjtHVoWvFHKAA== X-Received: by 2002:a05:6000:4308:b0:3a4:f918:9db9 with SMTP id ffacd0b85a97d-3a5686f0354mr536220f8f.32.1749762681443; Thu, 12 Jun 2025 14:11:21 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:f2df:571a:ae4c:bef2]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a568b1bc97sm379489f8f.68.2025.06.12.14.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jun 2025 14:11:20 -0700 (PDT) From: luca.boccassi@gmail.com To: Ariel Otilibili Cc: Stephen Hemminger , dpdk stable Subject: patch 'pcapng: fix null dereference in close' has been queued to stable release 22.11.9 Date: Thu, 12 Jun 2025 22:07:24 +0100 Message-ID: <20250612210733.2506558-67-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250612210733.2506558-1-luca.boccassi@gmail.com> References: <20250612210733.2506558-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.9 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/14/25. 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/cc22066925ac875b42db4ccf0f740337db0134e8 Thanks. Luca Boccassi --- >From cc22066925ac875b42db4ccf0f740337db0134e8 Mon Sep 17 00:00:00 2001 From: Ariel Otilibili Date: Mon, 24 Feb 2025 17:40:31 +0100 Subject: [PATCH] pcapng: fix null dereference in close [ upstream commit b24a6349ae1d56b947186c9545349fca1ca87614 ] rte_pcapng_close() might dereference a null pointer; as example, PVS-Studio gives its usage in test_pcapng.c: indeed, that call to rte_pcapng_close() might receive a null pointer. Link: https://pvs-studio.com/en/docs/warnings/v522/ Link: https://github.com/DPDK/dpdk/blob/e5176f23ae8b31437c3e5eb875c81f95bf3a9942/app/test/test_pcapng.c#L438 Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") Suggested-by: Stephen Hemminger Signed-off-by: Ariel Otilibili --- lib/pcapng/rte_pcapng.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c index 3f5e08379a..d82f992ffd 100644 --- a/lib/pcapng/rte_pcapng.c +++ b/lib/pcapng/rte_pcapng.c @@ -664,6 +664,8 @@ fail: void rte_pcapng_close(rte_pcapng_t *self) { - close(self->outfd); - free(self); + if (self) { + close(self->outfd); + free(self); + } } -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-12 22:06:26.286521742 +0100 +++ 0067-pcapng-fix-null-dereference-in-close.patch 2025-06-12 22:06:23.894045145 +0100 @@ -1 +1 @@ -From b24a6349ae1d56b947186c9545349fca1ca87614 Mon Sep 17 00:00:00 2001 +From cc22066925ac875b42db4ccf0f740337db0134e8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b24a6349ae1d56b947186c9545349fca1ca87614 ] + @@ -22 +24 @@ -index cacbefdc50..2a07b4c1f5 100644 +index 3f5e08379a..d82f992ffd 100644 @@ -25 +27 @@ -@@ -724,6 +724,8 @@ RTE_EXPORT_SYMBOL(rte_pcapng_close) +@@ -664,6 +664,8 @@ fail: