From: Patrick McHardy Date: Tue, 20 Jun 2006 06:39:45 +0000 (-0700) Subject: [NETFILTER]: xt_sctp: fix endless loop caused by 0 chunk length X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3dcd4efe2ad1ad1865b2fe5c863c1ebd9482a84;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [NETFILTER]: xt_sctp: fix endless loop caused by 0 chunk length Fix endless loop in the SCTP match similar to those already fixed in the SCTP conntrack helper (was CVE-2006-1527). Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c index b5110e5b54b0..9316c753692f 100644 --- a/net/netfilter/xt_sctp.c +++ b/net/netfilter/xt_sctp.c @@ -62,7 +62,7 @@ match_packet(const struct sk_buff *skb, do { sch = skb_header_pointer(skb, offset, sizeof(_sch), &_sch); - if (sch == NULL) { + if (sch == NULL || sch->length == 0) { duprintf("Dropping invalid SCTP packet.\n"); *hotdrop = 1; return 0;