]> Git Repo - linux.git/commitdiff
[NETFILTER]: {ip, nf}_conntrack_sctp: fix remotely triggerable NULL ptr dereference...
authorPatrick McHardy <[email protected]>
Wed, 11 Jul 2007 06:24:52 +0000 (23:24 -0700)
committerDavid S. Miller <[email protected]>
Wed, 11 Jul 2007 06:24:52 +0000 (23:24 -0700)
When creating a new connection by sending an unknown chunk type, we
don't transition to a valid state, causing a NULL pointer dereference
in sctp_packet when accessing sctp_timeouts[SCTP_CONNTRACK_NONE].

Fix by don't creating new conntrack entry if initial state is invalid.

Noticed by Vilmos Nebehaj <[email protected]>

Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Chris Wright <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/netfilter/nf_conntrack_proto_sctp.c

index 265769e5002b6a11753428aa3e1d80814b604cbc..debfe61378a1468019f9dd09604920e8cac3d2fd 100644 (file)
@@ -431,7 +431,8 @@ static int sctp_new(struct nf_conn *conntrack, const struct sk_buff *skb,
                                         SCTP_CONNTRACK_NONE, sch->type);
 
                /* Invalid: delete conntrack */
-               if (newconntrack == SCTP_CONNTRACK_MAX) {
+               if (newconntrack == SCTP_CONNTRACK_NONE ||
+                   newconntrack == SCTP_CONNTRACK_MAX) {
                        pr_debug("nf_conntrack_sctp: invalid new deleting.\n");
                        return 0;
                }
This page took 0.0538920000000001 seconds and 4 git commands to generate.