Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp525641rdb; Tue, 23 Jan 2024 06:58:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5LW3Hp3cElPWqT2fVcfw0Vycc6LPH0W0siV4YRwkCG7mEGX/f/s6VTFAKOhTF1hao1rD2 X-Received: by 2002:a05:6a20:4904:b0:19a:e0cc:7992 with SMTP id ft4-20020a056a20490400b0019ae0cc7992mr2457135pzb.112.1706021934427; Tue, 23 Jan 2024 06:58:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706021934; cv=pass; d=google.com; s=arc-20160816; b=awAx+3PM2YLBA2h+m/u1FcizG6xkoww4uxGsw1q3ixx+1EHQo3BbeL5g/nkzviiY40 thLirT6bDYi22BszFLEY5M6ujN5OmMfVHUUWdXVm5UrIBGyJBIuWF2+DGPRV02D+kCsC mnqK8fNg2WSl8tJg0eqpiYpLPKFSSN3sRM3cxoZzQFpum9xXGzPoSDRo0saWXuEf100/ DJcCNNBj0nm1+LiYCGQhQtCYHpzMWcDOMkLqTOrFfyB7ayikfuidornoNeiL8fCc/ixm iBhaHLabLnOfyz+4+EJ/pm6izeFGbgwBnvkvuQOVbH/hL0dOl/7B4iQyYFArXJVjrs5R olTA== 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:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=BTsxL2QSNrFW7p5bkgMQqWW/siZMS6ojxp3iHaXXt+w=; fh=tKfliYVAP2saTx4mSss/nHjKUONTNKTzMxGedGuqQK4=; b=KQk/KJpdn4UmXgIPfIaNSSjuFW8mNX90qYbOljLDl+xha5MdHD7KFuZkLIgBdNhfIs 4UBjXxMFwTt7RGlSC1LILssS97fAO1WyfDgWtY0cAzm08vXROqPDp6X2EkPGK9YQ6k/+ Pv0pyf42UsPoaQY/9GoGMt7AKQzXJhiMINLE0I8Bkwg8sDndcq4ATu+jBO+RXU17IDnD JPZIdGB6rGrNkvG0giWGmFGq/eRcMShXpt5MddCquRgEtOsdMs+RXepBqKzFtFekZN+L x1v+kI32FAnUXlI7FChw00QZowBp/F71aKrWgRra0bc2bFJSsPtdMe/USbyHRDxstLSX aEdQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@nwl.cc header.s=mail2022 header.b=ZfDBlhUz; arc=pass (i=1 spf=pass spfdomain=nwl.cc dkim=pass dkdomain=nwl.cc); spf=pass (google.com: domain of linux-kernel+bounces-35466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35466-linux.lists.archive=gmail.com@vger.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 k70-20020a638449000000b005ce016cce2bsi645292pgd.190.2024.01.23.06.58.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 06:58:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35466-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=fail header.i=@nwl.cc header.s=mail2022 header.b=ZfDBlhUz; arc=pass (i=1 spf=pass spfdomain=nwl.cc dkim=pass dkdomain=nwl.cc); spf=pass (google.com: domain of linux-kernel+bounces-35466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35466-linux.lists.archive=gmail.com@vger.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 BAD5FB2770C for ; Tue, 23 Jan 2024 14:42:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 490305A110; Tue, 23 Jan 2024 14:41:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nwl.cc header.i=@nwl.cc header.b="ZfDBlhUz" Received: from orbyte.nwl.cc (orbyte.nwl.cc [151.80.46.58]) (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 42C002B9C0; Tue, 23 Jan 2024 14:41:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=151.80.46.58 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706020910; cv=none; b=PuUbyIiiMhlPdOmMdgxlKUZNzMm8E+ZeKqpUKdm/uUxHgWkIUt2JUd2H8ez+yiwWrkQhMNqQLLJl/T1N7xocjwV1Tl2m9miqollIlwMXan+Mz+QiR537BK4z+ZV7ZZZ35tYGp4ClgKsrzAn7hh3fWhOBQsEW5yq+YDeD5E3K3Xc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706020910; c=relaxed/simple; bh=Fugrd7Xd23UiFFUWmNQ6MW06YWe/PAihiB2USFF2qRw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uqxVF/fa32w+2dvzGDvp3e2XK+O3+Y4otr0Bse+HTWxlbz7+WBSYF+EPMcUMMcerlptSaIy2MqCTKW4KhboT6/+GD1VYg1O7t9BxSRUBXtqjQ4HL8rxmfcoxPKC4ZCvfYQEqSBwaVy1JRJRYJ9z8ywOqYPignQ9v/ExAQg8JI8o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nwl.cc; spf=pass smtp.mailfrom=nwl.cc; dkim=pass (2048-bit key) header.d=nwl.cc header.i=@nwl.cc header.b=ZfDBlhUz; arc=none smtp.client-ip=151.80.46.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nwl.cc Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nwl.cc DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nwl.cc; s=mail2022; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BTsxL2QSNrFW7p5bkgMQqWW/siZMS6ojxp3iHaXXt+w=; b=ZfDBlhUz5V4aHvs9rQBiO80jj7 CI9zxEIc96m8NF3GAnPX4hosYiRwHSQ/Lp6wLLb9JCCjW2uPNAz5qfN5Vo39HqcBhtZEWJj6UJkOQ Edzjv7Ocz6iFfAtYO6pHDlY2+yxtLPTA0qDec1y9awtlfhzeWZEe9pKIfWayGJkm31N6uvsQiD9NG Lf3J9MdybNdO83XxTUsaqZcOSDuk2Ge6jUmgkw89ML94jVI1bp3Hpj+dIN3rxS1JjcSW2EZ/+fv+X N15T8udR80HXFL7tPBuehz9JBbFnbOhxNXnsSGucRVQZoxauXiebE4K+lDwWm8wCTzUiCuDw0X1Ov AnZ+Kfrw==; Received: from n0-1 by orbyte.nwl.cc with local (Exim 4.97) (envelope-from ) id 1rSHy9-000000002rA-1YHh; Tue, 23 Jan 2024 15:41:41 +0100 Date: Tue, 23 Jan 2024 15:41:41 +0100 From: Phil Sutter 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 , LKML , Kunwu Chan Subject: Re: [PATCH] netfilter: nf_tables: Add a null pointer check in two functions Message-ID: Mail-Followup-To: Phil Sutter , Markus Elfring , 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 , LKML , Kunwu Chan 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: Hi Markus, 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. This is correct and I'm fine with the patch if it avoids ringing alarm bells somewhere, yet it doesn't fix an actual issue here since the allocated buffer is merely passed to vsnprintf() which detects and sanitizes %s args being NULL. Cheers, Phil