netfilter: nf_conntrack: fix conntrack lookup race
commitb240992a30c3d44e2261d0931b431f0112a553be
authorPatrick McHardy <kaber@trash.net>
Mon, 22 Jun 2009 12:14:41 +0000 (22 14:14 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 30 Jul 2009 21:40:23 +0000 (30 14:40 -0700)
tree8c35abb16878473bf47cc0c5ad48bebe3df8d450
parentd583e5291f0e456a872ec058bf36223dcad01e0a
netfilter: nf_conntrack: fix conntrack lookup race

commit 8d8890b7751387f58ce0a6428773de2fbc0fd596 upstream.

The RCU protected conntrack hash lookup only checks whether the entry
has a refcount of zero to decide whether it is stale. This is not
sufficient, entries are explicitly removed while there is at least
one reference left, possibly more. Explicitly check whether the entry
has been marked as dying to fix this.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/netfilter/nf_conntrack_core.c