Skip to contentSkip to conversation

netfilter: nft_ct: reject expectation if conntrack has a master

PATCH Superseded Pablo Neira Ayuso 1 participant 1 message Nov 1

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: nft_ct: reject expectation if conntrack has a master

The nft ct expectation object can attach its internal helper to an unconfirmed expected child, then arm the next expectation with that child as master, resulting in a long chain of sibling conntracks.

This custom ct expectation support barely works for one limited use-case, skip expectation creation to address this issue.

Fixes 857b46027d6f ("netfilter: nft_ct: add ct expectations support")
---
 net/netfilter/nft_ct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nft_ct.c +1 -1
index 5a8db5592036..a6013d6a110f 100644
@@ -1254,7 +1254,7 @@ static int ct_expect_help(struct sk_buff *skb, unsigned int protoff,
 	int ret = NF_ACCEPT;
 	u16 l3num;
 
-	if (nf_ct_is_confirmed(ct))
+	if (nf_ct_is_confirmed(ct) || ct->master)
 		return NF_ACCEPT;
 
 	expect_data = nfct_help_data(ct);
Signature · 1 line
2.47.3