]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conntrack_tcp: fix endless loop
authorPatrick McHardy <kaber@trash.net>
Wed, 9 Jul 2008 22:06:12 +0000 (15:06 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jul 2008 22:06:12 +0000 (15:06 -0700)
commitaa63cedb6eb5e34617d82b6170b55dbf10330917
tree94334a28c9db60981a72478b18d54fccd353f7ff
parent5bb12bbf7f9397a8c8d4311260fa5181559b429b
netfilter: nf_conntrack_tcp: fix endless loop

When a conntrack entry is destroyed in process context and destruction
is interrupted by packet processing and the packet is an attempt to
reopen a closed connection, TCP conntrack tries to kill the old entry
itself and returns NF_REPEAT to pass the packet through the hook
again. This may lead to an endless loop: TCP conntrack repeatedly
finds the old entry, but can not kill it itself since destruction
is already in progress, but destruction in process context can not
complete since TCP conntrack is keeping the CPU busy.

Drop the packet in TCP conntrack if we can't kill the connection
ourselves to avoid this.

Reported by: hemao77@gmail.com [ Kernel bugzilla #11058 ]
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nf_conntrack_proto_tcp.c