netfilter: ctnetlink: fix crash during expectation creation
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 16 Mar 2009 14:50:51 +0000 (15:50 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 16 Mar 2009 14:50:51 +0000 (15:50 +0100)
This patch fixes a possible crash due to the missing initialization
of the expectation class when nf_ct_expect_related() is called.

Reported-by: BORBELY Zoltan <bozo@andrews.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_netlink.c

index cb78aa00399e40c46ed15421eee8e01f612c5d63..ed6d873ad3840f50a0787a01b688597a93fa7516 100644 (file)
@@ -1780,6 +1780,7 @@ ctnetlink_create_expect(struct nlattr *cda[], u_int8_t u3, u32 pid, int report)
                goto out;
        }
 
+       exp->class = 0;
        exp->expectfn = NULL;
        exp->flags = 0;
        exp->master = ct;