netfilter: nft_ct: reject expectation creation if conntrack has a master
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH v2 1/1 netfilter: nft_ct: reject expectation creation 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")
Reported-by Daehyeon Ko <[email protected]>
Signed-off-by Pablo Neira Ayuso <[email protected]>
---
v2: check if from obj_eval().
net/netfilter/nft_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nft_ct.c +1 -1
@@ -1418,7 +1418,7 @@ static void nft_ct_expect_obj_eval(struct nft_object *obj,struct nf_conn *ct; ct =nf_ct_get (pkt->skb, &ctinfo); -if (!ct ||nf_ct_is_confirmed (ct) ||nf_ct_is_template (ct)) { +if (!ct ||nf_ct_is_confirmed (ct) ||nf_ct_is_template (ct) || ct->master) { regs->verdict.code =NFT_BREAK ;return ; }
Signature · 1 line
2.47.3