]> git.itanic.dy.fi Git - linux-stable/commitdiff
[PATCH] NETFILTER: SCTP conntrack: fix crash triggered by packet without chunks ...
authorPatrick McHardy <kaber@trash.net>
Fri, 30 Jun 2006 03:33:12 +0000 (05:33 +0200)
committerChris Wright <chrisw@sous-sol.org>
Fri, 30 Jun 2006 17:37:31 +0000 (10:37 -0700)
When a packet without any chunks is received, the newconntrack variable
in sctp_packet contains an out of bounds value that is used to look up an
pointer from the array of timeouts, which is then dereferenced, resulting
in a crash. Make sure at least a single chunk is present.

Problem noticed by George A. Theall <theall@tenablesecurity.com>

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
net/ipv4/netfilter/ip_conntrack_proto_sctp.c
net/netfilter/nf_conntrack_proto_sctp.c

index 0416073c5600c109c56d85d3a49359a829fbc4cb..2d3612cd5f18cd1c442ac7407e7d5202c8d5ebbd 100644 (file)
@@ -254,7 +254,7 @@ static int do_basic_checks(struct ip_conntrack *conntrack,
        }
 
        DEBUGP("Basic checks passed\n");
-       return 0;
+       return count == 0;
 }
 
 static int new_state(enum ip_conntrack_dir dir,
index 0c6da496cfa9fc5311115b81b26b1b8176fcaa9d..9dab81d31821e9174db7f4d42935f514d2e579ef 100644 (file)
@@ -259,7 +259,7 @@ static int do_basic_checks(struct nf_conn *conntrack,
        }
 
        DEBUGP("Basic checks passed\n");
-       return 0;
+       return count == 0;
 }
 
 static int new_state(enum ip_conntrack_dir dir,