Re: [PATCH nf] netfilter: nf_nat: do not reuse an unexpected expectation on RTCP clash

Florian Westphal <[email protected]>
Newsgroups gmane.comp.security.firewalls.netfilter.devel
Message-ID <[email protected]>
Jaeyeong Lee <[email protected]> wrote:
> Since commit b8b09dc2bf35 ("netfilter: nf_conntrack_expect: use conntrack
> GC to reap expectations") nf_ct_unexpect_related() no longer unlinks the
> expectation from the global hash and from the per-master list. It only
> marks it with NF_CT_EXPECT_DEAD and defers the unlink to the conntrack GC

[..]

> and then continues the loop, reusing the very same rtp_exp object:
> 
> 	ret = nf_ct_expect_related(rtcp_exp, ...);
> 	...

I think this function should WARN_ON_ONCE when one tries to reinsert a
dead expectation (and return -EINVAL or another appropriate error).

(This is indenpendent of the real fix).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.