[{"id":3676695,"web_url":"http://patchwork.ozlabs.org/comment/3676695/","msgid":"<2026041319-spur-purse-2433@gregkh>","list_archive_url":null,"date":"2026-04-13T11:59:29","subject":"Re: [PATCH v5.15-v6.1] netfilter: nft_set_pipapo: do not rely on\n ZERO_SIZE_PTR","submitter":{"id":11800,"url":"http://patchwork.ozlabs.org/api/people/11800/","name":"Greg Kroah-Hartman","email":"gregkh@linuxfoundation.org"},"content":"On Mon, Apr 13, 2026 at 04:32:47AM +0000, Keerthana K wrote:\n> From: Florian Westphal <fw@strlen.de>\n> \n> commit 07ace0bbe03b3d8e85869af1dec5e4087b1d57b8 upstream\n> \n> pipapo relies on kmalloc(0) returning ZERO_SIZE_PTR (i.e., not NULL\n> but pointer is invalid).\n> \n> Rework this to not call slab allocator when we'd request a 0-byte\n> allocation.\n> \n> Reviewed-by: Stefano Brivio <sbrivio@redhat.com>\n> Signed-off-by: Florian Westphal <fw@strlen.de>\n> Signed-off-by: Mukul Sikka <mukul.sikka@broadcom.com>\n> Signed-off-by: Brennan Lamoreaux <brennan.lamoreaux@broadcom.com>\n> [Keerthana: In older stable branches (v6.6 and earlier), the allocation logic in\n> pipapo_clone() still relies on `src->rules` rather than `src->rules_alloc`\n> (introduced in v6.9 via 9f439bd6ef4f). Consequently, the previously\n> backported INT_MAX clamping check uses `src->rules`. This patch correctly\n> moves that `src->rules > (INT_MAX / ...)` check inside the new\n> `if (src->rules > 0)` block]\n> Signed-off-by: Keerthana K <keerthana.kalyanasundaram@broadcom.com>\n> ---\n>  net/netfilter/nft_set_pipapo.c | 20 ++++++++++++++------\n>  1 file changed, 14 insertions(+), 6 deletions(-)\n\nDoes not apply to 5.15.y :(","headers":{"Return-Path":"\n <netfilter-devel+bounces-11843-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","netfilter-devel@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org\n header.a=rsa-sha256 header.s=korg header.b=iM2Szv72;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11843-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=linuxfoundation.org\n header.i=@linuxfoundation.org header.b=\"iM2Szv72\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvR2B2nGYz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 22:05:54 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id D1B993077686\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 11:59:33 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 1C17435AC2D;\n\tMon, 13 Apr 2026 11:59:33 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FDE11D61A3;\n\tMon, 13 Apr 2026 11:59:32 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id A91CFC116C6;\n\tMon, 13 Apr 2026 11:59:31 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776081572; cv=none;\n b=LiuyrAJKBM+5ltNFnnEzpMy0HN2uA/oUfqWRGMWMP2fRvm9tx6p+Os6HWpSXj9IXzBQRaNsuMnl4e1lVkaygqbtfVENOOkhujWjH6pQiBL2MP1Rn1WKYPqwD+XJpVx3O8jPWWK4UOMf6E8+ZjGnWF93s1as62eVLF0xXd6p6mto=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776081572; c=relaxed/simple;\n\tbh=aEyJLS5pKAqzyDFhV+V2dHBfpEyLJ6FcOXc82hX/FQ4=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=kUY65p1Kw/+6HR1Z+6J70KVJuty0yNEeT0xCGC4pqiAGrdfOnPLXhi2qbkqzt9/dSylWw0JKEtDD/5EISc4goLcED/ML6SBR48PVWcNxRYZYqI3HNgplkAZYATtV5uKwOyqETLIb9VMYhKYHOltup0b4kYZzi7uhHBkzEe7jK9U=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (1024-bit key) header.d=linuxfoundation.org\n header.i=@linuxfoundation.org header.b=iM2Szv72;\n arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;\n\ts=korg; t=1776081572;\n\tbh=aEyJLS5pKAqzyDFhV+V2dHBfpEyLJ6FcOXc82hX/FQ4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=iM2Szv72NalA6zpSUcBznN1T4oT4GCmcQw+3HTaCf3IMqa6UhwoVzToKaeptjhDz+\n\t +TDVDH4GATyF5axrwqaP1tRDdSL1mHsIznElmGuLQ42nJ/5rdLea4dtKpN71RAa720\n\t 7qu2eLqTMuNfnl3j/sq5QrzQCRHPEpiJ0sFImtWw=","Date":"Mon, 13 Apr 2026 13:59:29 +0200","From":"Greg KH <gregkh@linuxfoundation.org>","To":"Keerthana K <keerthana.kalyanasundaram@broadcom.com>","Cc":"stable@vger.kernel.org, pablo@netfilter.org, kadlec@netfilter.org,\n\tfw@strlen.de, davem@davemloft.net, edumazet@google.com,\n\tkuba@kernel.org, pabeni@redhat.com, netfilter-devel@vger.kernel.org,\n\tcoreteam@netfilter.org, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, ajay.kaher@broadcom.com,\n\talexey.makhalov@broadcom.com,\n\tvamsi-krishna.brahmajosyula@broadcom.com, yin.ding@broadcom.com,\n\ttapas.kundu@broadcom.com, Stefano Brivio <sbrivio@redhat.com>,\n\tMukul Sikka <mukul.sikka@broadcom.com>,\n\tBrennan Lamoreaux <brennan.lamoreaux@broadcom.com>","Subject":"Re: [PATCH v5.15-v6.1] netfilter: nft_set_pipapo: do not rely on\n ZERO_SIZE_PTR","Message-ID":"<2026041319-spur-purse-2433@gregkh>","References":"<20260413043247.3327855-1-keerthana.kalyanasundaram@broadcom.com>","Precedence":"bulk","X-Mailing-List":"netfilter-devel@vger.kernel.org","List-Id":"<netfilter-devel.vger.kernel.org>","List-Subscribe":"<mailto:netfilter-devel+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:netfilter-devel+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260413043247.3327855-1-keerthana.kalyanasundaram@broadcom.com>"}}]