Article View: linux.kernel.netdev
Article #9414[PATCH net 09/15] netfilter: nft_set_rbtree: check catchall_sync return before queue_done
From: Pablo Neira Ayuso
Date: Mon, 02 Nov 2026 00:56
Date: Mon, 02 Nov 2026 00:56
33 lines
9319 bytes
9319 bytes
From: Xingyuan Mo <hdthky0@gmail.com>
nft_rbtree_gc_queue() passes the result of nft_trans_gc_catchall_sync()
straight to nft_trans_gc_queue_sync_done(). When the catchall path flushes
a full GC batch and nft_trans_gc_alloc() fails, catchall_sync returns
NULL and queue_sync_done dereferences trans->net (NULL+0x10). Guard the
call like the pipapo GC path already does.
Fixes: 7d259f021aaa ("netfilter: nft_set_rbtree: prefer sync gc to async worker")
Assisted-by: opencode:deepseek-v4
Signed-off-by: Xingyuan Mo <hdthky0@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nft_set_rbtree.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/netfilter/nft_set_rbtree.c b/net/netfilter/nft_set_rbtree.c
index fbe1750f1ca2..9d685899da70 100644
--- a/net/netfilter/nft_set_rbtree.c
+++ b/net/netfilter/nft_set_rbtree.c
@@ -953,7 +953,8 @@ static void nft_rbtree_gc_queue(struct nft_set *set)
}
gc = nft_trans_gc_catchall_sync(gc);
- nft_trans_gc_queue_sync_done(gc);
+ if (gc)
+ nft_trans_gc_queue_sync_done(gc);
}
static u64 nft_rbtree_privsize(const struct nlattr * const nla[],
--
2.47.3
Technical Details
Message-ID:
<20261102005654.532438-10-pablo@netfilter.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354398-linux-kernel-netdev=dewy.ruReferences:
<20261102005654.532438-1-pablo@netfilter.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354398-linux-kernel-netdev=dewy.ru From: pablo@netfilter.org (Pablo Neira Ayuso) Newsgroups: linux.kernel.netdev Subject: [PATCH net 09/15] netfilter: nft_set_rbtree: check catchall_sync return before queue_done Date: Mon, 2 Nov 2026 01:56:48 +0100 Organization: Usenet Network Message-ID: <20261102005654.532438-10-pablo@netfilter.org> References: <20261102005654.532438-1-pablo@netfilter.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2813382"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:xfcQ+Yy/PiGyAqbTP4lS0yD9urQ= sha256:pJtBg0ckgkM6q9w2JJdALLihe1el422NnQ9xEtIO6oc= sha1:DKwzrJZbdli81cdl5G/KgWGTYwE= sha256:zNWyVl1q9TQWkuD1TTO2tvYl2zINIZS6Z7ky7xVCXp4= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 38CDC1123E4; Mon, 2 Nov 2026 04:01:30 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.049 X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=netfilter.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AvF_DwI9yKYq; Mon, 2 Nov 2026 04:01:28 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-354398-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=netfilter.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id DCC101123D6; Mon, 2 Nov 2026 04:01:19 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 92E242E458; Mon, 2 Nov 2026 00:57:42 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1793581051; b=CTefgCZ1QA8oJNt0krcALWWm1DjKRCx5bBdAtVwbyIA7AGnPLsY53T/1QZBg7gVhw1IZ Rs2HgJ3Md6VId/H0urFIbFavTXSfGXzaeuia0txevYdaSIJFoyioRSoVKnFe+jEKdp9Cx +bK9Hpql3Pc3hGazTjyVrQfLq5bZDAMmliCUVWEcs0GvEy6AiVmERDvNwNc2TR4Yp8jZh OcHNnMAylG8OOT9TDe+d9G7w8S0Azqd1VBCdaCa8zFt1SbzJ+PjQmFiqE5I8DvIBU8VU4 euqdvkUWhgDvwuGoPMoVPv83DKt7UWogqcjbKDJWqujYul8j8K3715WipL/Axol8kDQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793581051; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=eI6BYAMtH8gnpfLqrP2oq7QPLneAgWxxYSCOTNnXMiM=; b=P76QRh+KWN3txGhhgPJy6UGnCdi4umdD8Jc7+frXJ5st4bmt+QNOTHa/dkFx3jZlFohp nxXyWrxSeCK44X9n+pphGPm883PaJ6ULdd+OpPRym3YsiXTgb+FX7cvKNM0fhHRmHpF7m z/dBNU5oiiYttADcrx2I2QAr7U4tE4aMtwahrNVR4NVnZSz0gXYDnLyIwcoaQ9qoBBAPQ rv2z6g/2TQ4K3/RHMsLbL0oI528ItjVsXOxACuPudk1oBjmxKN6nIaV3c/dcFORLunkAG ZJtHL7dikyVWwP3XAmRg+PKfSyM2j+DpCZuIAAm9D1eYFwpyyP8DylM7r+nQlX2w6Cw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=OszmStZL; dmarc=none header.from=netfilter.org; spf=pass smtp.mailfrom=netfilter.org; arc=fail smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E52860A2620; Mon, 2 Nov 2026 00:57:31 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=OszmStZL X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.70.190.124 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793581040; b=t/cWcUYHMD9MrAx+j072yFZzjPbq/RcFzGwMBG7BCk22TamkQaSEK3MyNBXiJNYUFtA1 Ig32zGFpjKtnE8m5eJiCM1PEClWZSt6Ub6pJ3CbUgO7AxfoWmbE7hhdhVorOZqw1m5OQb wEZjDPcO84mU6kXpJBduiHQALZfKxqUL86nGdoP/0WwtD3dc/eBxpv3YKM0zyu2Kfoc/+ WCb4ZcNCtEFKg4pGx+icAvIKQZSHjCglRWO7tqv18uUR9MVkmtL+0D4VeaM21B3s1jmeK LOJ0VORnBJt1LdRTiRFzV0ExDYB/2F/ne43loKpnm9LcojSjG8nfFjd4nSIarPj0iig== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793581040; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Spam-Status:X-Spam-Checker-Version; bh=eI6BYAMtH8gnpfLqrP2oq7QPLneAgWxxYSCOTNnXMiM=; b=Qsgf/LgC5AVqtH5HEfntwQQhUyDy9FyAK+iB3lxIAwcMAWZKU5dD3BERQsZR1UPYKysH 3QNel6LkmrEnzrSdu1a/X80JsZ3lhM+sNKyV2tqSTNM7PEg7ILHN5vTiVPzE818uoM9p0 QPDCbVYwwMRNyFCACazXnMfFXxZ7xqa7w3ej56MVTkdMxSZ1b+Cb9ps6SBix8TIx05I9p 5ZvFk6j+UCn4YODqcdTKvyfXqP8w9vDhHQ4ULRalbS3TSIiUDTjL83hVPsicOQ8xfXgHT mRHyObPUh2GbJFgcHlevV8QsOiSqXKmD7gW030QMZsuYmkzpNn/+Chau1pftr7WdBtA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=netfilter.org; spf=pass smtp.mailfrom=netfilter.org; dkim=pass header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=OszmStZL; arc=none smtp.remote-ip=217.70.190.124 X-Received: from mail.netfilter.org (mail.netfilter.org [217.70.190.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 337C760A2617; Mon, 2 Nov 2026 00:57:20 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 337C760A2617 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netfilter.org X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org; s=2025; t=1793581038; bh=eI6BYAMtH8gnpfLqrP2oq7QPLneAgWxxYSCOTNnXMiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OszmStZLi3eINtv6doc+ivC20sRsk4JWGO1t7l0jQXN8qQ+vtzg69T+L1zsHm1j/d Svzciav4w6/trye5oOpDEFD3kTVQ6OVYuXixowNKE6mPPaEJY8vUXsrQiqh/WALrrD xWbf96sxzZ/f5kNrgTZE9/p8ZpVgp3rBzwtygd2NUDCPUd4BJFwtEk9ipE/ModOjV6 yIuO9nrttv0NLTzF6NxW6lSDL8RBGPDpg6YRrwn43I5c/9bmFOvvTUe/8WodR5H4uF 6Y2KxYYQDs8W0WSSWZPNQyW3Bn/8QUgFwAcPaoiBohEsVEanPFMUA1FWy3RVRsyqx/ A9u3Ixqh5N7lg== X-Received: from localhost.localdomain (mail-agni [217.70.190.124]) by mail.netfilter.org (Postfix) with ESMTPSA id F0D0F6005D; Mon, 2 Nov 2026 01:57:17 +0100 (CET) X-Cc: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, horms@kernel.org, fw@strlen.de, ja@ssi.bg X-Mailer: git-send-email 2.47.3 X-In-Reply-To: <20261102005654.532438-1-pablo@netfilter.org> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list