netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf-next v2 0/4] netfilter: handle race w. module removal and nfqueue
@ 2017-07-25 22:02 Florian Westphal
  2017-07-25 22:02 ` [PATCH nf-next v2 1/4] netfilter: expect: add and use nf_ct_expect_iterate helpers Florian Westphal
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Florian Westphal @ 2017-07-25 22:02 UTC (permalink / raw)
  To: netfilter-devel

There is a long-standing race that occurs with module removal
(such as helpers) nfqueue, and unconfirmed (not in hash table) conntracks.

The main issue is that
a). unconfirmed conntracks can't safely be mangled from other cpu (we assume
    exclusive access to grow/alter the extension area) and
b). nfqueued skbs leave RCU protection

This series address this by making the queue event similar to a
confirm event:

Just as we do not commit 'dying' conntracks to the main table, refuse to
queue dying and unconfirmed conntracks to userspace.

Combined with a 'drop queued skbs' when a module exit path calls the
ct_iterate_destroy function this closes the hole, see patch #4 for details.

The only change since v1 is a build error that occured in patch 4 when
nfqueue is enabled but conntrack is not, as reported by kbuild test robot.


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

end of thread, other threads:[~2017-07-31 17:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 22:02 [PATCH nf-next v2 0/4] netfilter: handle race w. module removal and nfqueue Florian Westphal
2017-07-25 22:02 ` [PATCH nf-next v2 1/4] netfilter: expect: add and use nf_ct_expect_iterate helpers Florian Westphal
2017-07-25 22:02 ` [PATCH nf-next v2 2/4] netfilter: add and use nf_ct_unconfirmed_destroy Florian Westphal
2017-07-25 22:02 ` [PATCH nf-next v2 3/4] netfilter: conntrack: destroy functions need to free queued packets Florian Westphal
2017-07-25 22:02 ` [PATCH nf-next v2 4/4] netfilter: nfnetlink_queue: don't queue dying conntracks to userspace Florian Westphal
2017-07-31 17:10 ` [PATCH nf-next v2 0/4] netfilter: handle race w. module removal and nfqueue 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).