Skip to content

Commit bb328dc

Browse files
committed
netfilter: nf_tables: GC transaction race with abort path
jira VULN-597 subsystem-sync netfilter:nf_tables 4.18.0-534 commit-author Pablo Neira Ayuso <pablo@netfilter.org> commit 7203443 upstream-diff Some minor differences due to pernet goo - not important. Abort path is missing a synchronization point with GC transactions. Add GC sequence number hence any GC transaction losing race will be discarded. Fixes: 5f68718 ("netfilter: nf_tables: GC transaction API to avoid race with control plane") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de> (cherry-picked from commit 7203443) Signed-off-by: Greg Rose <g.v.rose@ciq.com>
1 parent 48351fd commit bb328dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8601,6 +8601,12 @@ static int nf_tables_abort(struct net *net, struct sk_buff *skb,
86018601
enum nfnl_abort_action action)
86028602
{
86038603
struct nftables_pernet *nft_net = nft_pernet(net);
8604+
unsigned int gc_seq;
8605+
int ret;
8606+
8607+
gc_seq = nft_gc_seq_begin(nft_net);
8608+
ret = __nf_tables_abort(net, action);
8609+
nft_gc_seq_end(nft_net, gc_seq);
86048610

86058611
mutex_unlock(&net->nft_commit_mutex);
86068612

0 commit comments

Comments
 (0)