]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conntrack: fix conntrack lookup race
authorPatrick McHardy <kaber@trash.net>
Mon, 22 Jun 2009 12:14:41 +0000 (14:14 +0200)
committerPatrick McHardy <kaber@trash.net>
Mon, 22 Jun 2009 12:14:41 +0000 (14:14 +0200)
commita99ed34bbc5dcded48dd19e679a8410360713370
tree651b2f1da674823f386d4ba9165a6d81212e52cf
parentadbb5bdd2258e1e8c10d0143430c2aeb2cf4267d
netfilter: nf_conntrack: fix conntrack lookup race

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>
net/netfilter/nf_conntrack_core.c