]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conntrack: fix confirmation race condition
authorPatrick McHardy <kaber@trash.net>
Mon, 22 Jun 2009 12:14:16 +0000 (14:14 +0200)
committerPatrick McHardy <kaber@trash.net>
Mon, 22 Jun 2009 12:14:16 +0000 (14:14 +0200)
commitadbb5bdd2258e1e8c10d0143430c2aeb2cf4267d
treed24884793a0804bf2f96afac2248189b358b8ae2
parent2d786a700b4fcfc5e049794650a8bab20f37535d
netfilter: nf_conntrack: fix confirmation race condition

New connection tracking entries are inserted into the hash before they
are fully set up, namely the CONFIRMED bit is not set and the timer not
started yet. This can theoretically lead to a race with timer, which
would set the timeout value to a relative value, most likely already in
the past.

Perform hash insertion as the final step to fix this.

Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_core.c