summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXingyuan Mo <hdthky0@gmail.com>2026-10-20 11:37:40 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2026-11-05 13:31:11 +0100
commit1cec19d70bc282a8e7f7c42697d44046f60dc506 (patch)
treefb179896c9662861f381dffdf41b1a07ea6c92a2
parent46ecda278f6eedffb2898d41e3e56757c996a41f (diff)
netfilter: nft_set_rbtree: check catchall_sync return before queue_done
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>
-rw-r--r--net/netfilter/nft_set_rbtree.c3
1 files changed, 2 insertions, 1 deletions
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[],