Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp649003rdb; Tue, 23 Jan 2024 10:15:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IERWJaDwQAdtBxyqmCN4skTJKT7B61yksDEUeVuFyYxqHvSd/+jr0YM2K7gJAA48PV9VuVB X-Received: by 2002:a05:6a20:d90c:b0:19a:7ca5:858c with SMTP id jd12-20020a056a20d90c00b0019a7ca5858cmr8843950pzb.18.1706033747269; Tue, 23 Jan 2024 10:15:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706033747; cv=pass; d=google.com; s=arc-20160816; b=aEYGTNAd0SdH1g03WLmbvO8DyUIW0TkgCeMWxwHDJmpdQWyxkWZYsHznrNOdSklntG MvdqXLStLIqCICY2EvJd3gG0/x9XpOk+3NGqawzJiYz73vPlpICaWp6t6XIZ8JHfrLNr EFXHOi8Ug1neiUpRkIM233yQ5SvI2kxTBCblQdGsybjDvfPkavh/vTNDykXAiuZ4CKxC G4AvbHbud3mi4l0KPTsYqzVttpGDbSCL9qllSb+9Oduewi1e2m1IBsGYu09MpAMsf6by fkMGslSWXhKUR2e6aQi4fws3/W2GylO1nesjX6whlalq/4AUh/cWc7KeK6h160XDJT3t liNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pjBZKG3F9JUHWiWNkV4Tg1UXokQ7/mwtC+fwE2ZCZIg=; fh=e06pOlhy+dt6yylnWi/+Dbg80FHcWQlH00adeGOS6Eg=; b=mI5mLhjuDmuOCcQG9ep61FaDOmvmJLHlpyOrjPC8Lx4xzYI/dvdFiGKvnzZ92/JC8w GH7UbIKuA8RsCJ+1meXW66gozpMHCZjtRaUyCpTaXt4ANELSugUGJw8Zu+CuwBYvUmTK QaGHtjLE2RFI+gqtIF5pWKhAagbwBjLlYeECbPm1qIq3oROLh7SfHjL3lm8xUOOYYUfu uHUNpx27B074ZPv5dXuy+xAmdwdsRL89xmCoUkIi5xd8e5IaYufdyxufHC8uDxIVH+pY qkZV5zBRu6gtuNkVRxP34jsdQRguPe1CqGWpOwVdb0UOeHpDCSKFVMgBm0wVENpwx4Xt zQ4Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O64Q2j7k; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-35800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d21-20020a631d55000000b005cda6105077si9849511pgm.299.2024.01.23.10.15.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 10:15:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O64Q2j7k; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-35800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 56B94B274E3 for ; Tue, 23 Jan 2024 17:46:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 855DA81203; Tue, 23 Jan 2024 17:46:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="O64Q2j7k" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93C7A80036; Tue, 23 Jan 2024 17:46:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706031991; cv=none; b=OKdYVlCEjBmVEh/z/rel16DO5v1bWwAcraETZ3MMHfDP7H4YAxS+PACmNdGAWb622U0wGvG9NfUgRALhwl67pDN1dT/xJbVMDhS46gWgn0nnFRNxz64VOrFpx1XX/CWADoxGyomvrF+vdMwm8Mjby4z61IS2PRe6531o1urpUyo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706031991; c=relaxed/simple; bh=NkHE5jAGeam0OhUX55X+rbk7tkRtqWrCjQ1f8FdelE8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VxPyIRA/JMmGA7zZgCwjwNltP8cUvZ95dXdKEQ7+t+yIDTfBY82Ngvt7QIXAu5KM9PoS/E7MkOWwgzKl0yv7QhQIHJRhvd+6ajDhdS+ou3zRAVpD9HPJu3QSV/T1BoslJ8RNqzItjG1DclyT8yUXqZccbi8K/4UU13IlRmNt0ZA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O64Q2j7k; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E11DC433C7; Tue, 23 Jan 2024 17:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706031991; bh=NkHE5jAGeam0OhUX55X+rbk7tkRtqWrCjQ1f8FdelE8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O64Q2j7kI6EdmKZ7mFXyWaeNIyGfxeOZHcYsgupC8JpBdUjQ4uxSzkGM7iy2OlXAI tFClav5O4lFK1QzAHICJ3RCsYSqD3vtwnLiplM30pqZG9HwAj5K7nSJXu/3b5hqOQ0 O6AMpTl9P6mQr5X7RBSN+aKEThtUtQHIq1u2u8XPrRbGpahBnKi29VSmCYV273ZcwD BASyCD/EeAPIgp29JskMQW9/3YS/LWGUt1C2W82IDPNVkX3DhrpJ+kn2Na36hCstIQ xO4igiLh62T87z4Xw6Z8rRAexLfoL02cWha+ZRkjV+IXP4fzvuwLx2q+4BDCYS3vde mTOUkFOeNenWw== Date: Tue, 23 Jan 2024 17:46:25 +0000 From: Simon Horman To: Markus Elfring Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, "David S. Miller" , Eric Dumazet , Florian Westphal , Jakub Kicinski , Jozsef Kadlecsik , Pablo Neira Ayuso , Paolo Abeni , Phil Sutter , LKML , Kunwu Chan Subject: Re: [PATCH] netfilter: nf_tables: Add a null pointer check in two functions Message-ID: <20240123174625.GO254773@kernel.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Jan 23, 2024 at 02:45:12PM +0100, Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 23 Jan 2024 14:28:31 +0100 > > The result from a call of the function “kasprintf” was passed to > a subsequent function call without checking for a null pointer before > (according to a memory allocation failure). > This issue was detected by using the Coccinelle software. > > Thus add a null pointer check and a jump target in affected functions. > > Fixes: 8877393029e76 ("netfilter: nf_tables: Open-code audit log call in nf_tables_getrule()") > Fixes: 0854db2aaef3f ("netfilter: nf_tables: use net_generic infra for transaction data") > Signed-off-by: Markus Elfring For the record: Markus has posed patches of this nature many times over the past weeks and months. They are not fixing bugs - there is no user visible problem. And moreover they move the code away from the preferred style - avoiding unnecessary checks around code that can handle NULL values. Markus, please stop posting patches of this nature.