Skip to content

Commit

Permalink
netfilter: ctnetlink: fix crash during expectation creation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pablo Neira Ayuso authored and Patrick McHardy committed Mar 16, 2009
1 parent b1e93a6 commit 626ba8f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 626ba8f

Please sign in to comment.