Skip to content

Commit

Permalink
[NETFILTER]: SCTP conntrack: fix crash triggered by packet without ch…
Browse files Browse the repository at this point in the history
…unks

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: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jun 30, 2006
1 parent 2c6059b commit dd7271f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ip_conntrack_proto_sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_proto_sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,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,
Expand Down

0 comments on commit dd7271f

Please sign in to comment.