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 099274623C for ; Sun, 16 Feb 2025 17:51:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2FEC40A67; Sun, 16 Feb 2025 17:51:34 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id A467A40156 for ; Sun, 16 Feb 2025 17:51:32 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-220ecbdb4c2so63352575ad.3 for ; Sun, 16 Feb 2025 08:51:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1739724692; x=1740329492; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=RVpGacQ0uxDNemsY0SmbonZ3S9xrZln+NAk8ETDmtOM=; b=qmHUEL4eg31ouPpkYV8RpJ0I5iU7mwvHxSXBp55PmIzaZYsQ+LWp5zBOnLcNtIlupB FY4AfAEJd3ZcFSo0zWeyo6Syt86W0PvmC6xG2XMQwqeLXN2FjPqJrpBAMHqMZk6sYkF+ ccpiK+3qYEvYU5KqW7wpw0iYXseVQgfOWIuqe5Ww2/tJvnufLHBNNChJN42Ms18kYjvA hoQn43KfixVyXMxt9ih/aKCB7XV7RBwGYv8k+uznS8S6/oq/s/ZE8jBFIVKluMlKNAmO pDUcpR3Le2TbQeMXqBW0HLWRUL6mI82V9xJdwHDWVFp3wwlo7xdZzwXw17QFArbWUwhQ TrCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739724692; x=1740329492; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RVpGacQ0uxDNemsY0SmbonZ3S9xrZln+NAk8ETDmtOM=; b=eELXwZmIsG9ULewT4ZV0aM0QNzRWzyBFRh7d5Rd+B5mRYrAXREWJCShmTAdlXfxDmS 3L2U7gAMhRP51DbtwmFUimIqK5wZdr/alfgD6BqVr8mjlkPNr1AtRU0+HTiZZe8OAJvz ZjIBoNhZ61T+4XJy2rzGuQbqTfvXLSAWEB+gDBEC4scn3wGx0xcFq4Zkos7UrUG+f9Zt 4GkKr9T49NT+OKwPm0F0KbFFryL59V3Ns2AD5J0LjhWJNk8Q3201CMqTT44Xml0Uv2+u dYFyg4PVXg5BAw0IPLDB/0NpUhAyXtM4CIZpG3YzUSeXcD0s/Nppc8lWjauxlrnyh7jC /76Q== X-Forwarded-Encrypted: i=1; AJvYcCUXKOhMm9WloigtrReov8si326NyUjoJnGFf3eWOqc5EahclkAk99VgX2eLIhIgvelOtvAxFJU=@dpdk.org X-Gm-Message-State: AOJu0YxJDrmKDn1fNaDLCD/Rscf0fMBwKPdZp4FrQK5O9Dzc4tw2AlFd CHl626unUZ8dN+FgWkYKf+xiwKK3NVa0xHi4oA9eBNb9Dss+m3YDXdzuCVKDWrQ= X-Gm-Gg: ASbGncsFaC8WAGukQLOSzSMNxMIiiqDkorZgmuLDVKIXfqlcjubJMN1fOCPMhYuS2mv FBr9Q20X0/ts/uYUUwT/xw4AMLWJQANRFkFITGViFA7lWkb2pkgRxR+/dAY9YjQr3IcCJVtPpmt JwLizkEoGtBZcPZDD0ZUVgmY7QiZUASK6nzLEVMrZCrpkAX2k6V2zLtRiFwcKpsVAnUNPrKpEqs 1Qu+SVIjLgp0FOnUWyt+ocXnDxnpGmiQy9Xw7Uk3TEgxdUVfcgiPdFo+W7C9NNnvYxxu1rab/Z3 GtK+ocT52JErQtAnTfW/J/Xqrt4R9pU4lXnBPxbYOxJeSIr1FbyzGQjYO3GKNnh2PQGo X-Google-Smtp-Source: AGHT+IGAqCmxqwtPYcCEBPhaj40ylpXKSt09ck9qrUFWxkyC+NU2mubKUuVBZaNmYM38t30dTyt59A== X-Received: by 2002:a17:902:e80b:b0:21f:1549:a55a with SMTP id d9443c01a7336-22103ef57e8mr109563755ad.1.1739724691647; Sun, 16 Feb 2025 08:51:31 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2fbf999b5cesm8120080a91.34.2025.02.16.08.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2025 08:51:31 -0800 (PST) Date: Sun, 16 Feb 2025 08:51:29 -0800 From: Stephen Hemminger To: Ariel Otilibili Cc: dev@dpdk.org, Thomas Monjalon , David Marchand , Reshma Pattan , stable@dpdk.org Subject: Re: [PATCH 1/1] pcapng: fix null dereference in rte_pcapng_close Message-ID: <20250216085129.4b2666f3@hermes.local> In-Reply-To: <20250216160833.3216001-2-ariel.otilibili@6wind.com> References: <20250216160833.3216001-1-ariel.otilibili@6wind.com> <20250216160833.3216001-2-ariel.otilibili@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Sun, 16 Feb 2025 17:08:33 +0100 Ariel Otilibili wrote: > 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") > Signed-off-by: Ariel Otilibili Not sure this is necessary. The analgous function is fclose() and calling fclose() with NULL will crash. I would rather update the documentation than silently ignore buggy programs.