From: Patrick McHardy Date: Tue, 25 Jul 2006 05:52:10 +0000 (-0700) Subject: [NETFILTER]: H.323 helper: fix possible NULL-ptr dereference X-Git-Tag: v3.12-rc1~34460^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=083edca05ab1fa6efac1ba414018f7f45a4a83ff;p=kernel%2Fkernel-generic.git [NETFILTER]: H.323 helper: fix possible NULL-ptr dereference An RCF message containing a timeout results in a NULL-ptr dereference if no RRQ has been seen before. Noticed by the "SATURN tool", reported by Thomas Dillig and Isil Dillig . Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323.c b/net/ipv4/netfilter/ip_conntrack_helper_h323.c index af35235..9a39e29 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c @@ -1200,7 +1200,7 @@ static struct ip_conntrack_expect *find_expect(struct ip_conntrack *ct, tuple.dst.protonum = IPPROTO_TCP; exp = __ip_conntrack_expect_find(&tuple); - if (exp->master == ct) + if (exp && exp->master == ct) return exp; return NULL; }