netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf 0/2] netfilter: reject cthelper del request if it is in use
@ 2017-04-09  8:22 Liping Zhang
  2017-04-09  8:22 ` [PATCH nf 1/2] netfilter: introduce nf_conntrack_helper_put helper function Liping Zhang
  2017-04-09  8:22 ` [PATCH nf 2/2] netfilter: nfnl_cthelper: reject del request if helper obj is in use Liping Zhang
  0 siblings, 2 replies; 7+ messages in thread
From: Liping Zhang @ 2017-04-09  8:22 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, Liping Zhang

From: Liping Zhang <zlpnobody@gmail.com>

User can still delete the cthelper even if it is in use:
  # nfct helper add ssdp inet udp
  # iptables -t raw -A OUTPUT -p udp -j CT --helper ssdp
  # nfct helper delete ssdp //--> succeed!

This will cause a use-after-free error. So we shoule add a refcnt to
fix this issue. Before accomplishing this, it's better to introduce a
nf_conntrack_helper_put helper function.

Note, this patch set is based on http://patchwork.ozlabs.org/patch/748533/.
But I think it may still conflict with other patches. If so, I can rebase it.

Liping Zhang (2):
  netfilter: introduce nf_conntrack_helper_put helper function
  netfilter: nfnl_cthelper: reject del request if helper obj is in use

 include/net/netfilter/nf_conntrack_helper.h |  4 ++++
 net/netfilter/nf_conntrack_helper.c         | 12 ++++++++++++
 net/netfilter/nfnetlink_cthelper.c          | 17 +++++++++++------
 net/netfilter/xt_CT.c                       |  6 +++---
 net/openvswitch/conntrack.c                 |  4 ++--
 5 files changed, 32 insertions(+), 11 deletions(-)

-- 
2.5.5



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-13 23:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-09  8:22 [PATCH nf 0/2] netfilter: reject cthelper del request if it is in use Liping Zhang
2017-04-09  8:22 ` [PATCH nf 1/2] netfilter: introduce nf_conntrack_helper_put helper function Liping Zhang
2017-04-09  8:22 ` [PATCH nf 2/2] netfilter: nfnl_cthelper: reject del request if helper obj is in use Liping Zhang
2017-04-13 23:16   ` Pablo Neira Ayuso
2017-04-13 23:37     ` Liping Zhang
2017-04-13 23:42       ` Pablo Neira Ayuso
2017-04-13 23:42         ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).