diff --git a/net/sctp/input.c b/net/sctp/input.c index 81b4f091760eb78a22eb49b7c4988462d283af87..a2deb36b955a6a97018cecda165ce8dfacb1f2d1 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c @@ -1204,7 +1204,7 @@ static struct sctp_association *__sctp_rcv_walk_lookup(struct net *net, ch = (struct sctp_chunkhdr *)ch_end; chunk_num++; - } while (ch_end < skb_tail_pointer(skb)); + } while (ch_end + sizeof(*ch) < skb_tail_pointer(skb)); return asoc; }