OSDN Git Service

netfilter: xt_CT: fix crash while destroy ct templates
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 11 Dec 2012 04:07:42 +0000 (04:07 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 16 Dec 2012 22:44:12 +0000 (23:44 +0100)
commit252b3e8c1bc0c2b20348ae87d67efcd0a8209f72
tree369400efc56df50e5fa1467ffd84fbe43f264f40
parent0c36b48b36dc84d4215dc9d1cde1bda829214ba6
netfilter: xt_CT: fix crash while destroy ct templates

In (d871bef netfilter: ctnetlink: dump entries from the dying and
unconfirmed lists), we assume that all conntrack objects are
inserted in any of the existing lists. However, template conntrack
objects were not. This results in hitting BUG_ON in the
destroy_conntrack path while removing a rule that uses the CT target.

This patch fixes the situation by adding the template lists, which
is where template conntrack objects reside now.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netns/conntrack.h
net/netfilter/nf_conntrack_core.c
net/netfilter/xt_CT.c