diff --git a/[refs] b/[refs] index d561d3e0be59..545e2a01e0be 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2645a3c3761ac25498db2e627271016c849c68e1 +refs/heads/master: 735ce972fbc8a65fb17788debd7bbe7b4383cc62 diff --git a/trunk/net/sctp/socket.c b/trunk/net/sctp/socket.c index e7e3baf7009e..0dbcde6758ea 100644 --- a/trunk/net/sctp/socket.c +++ b/trunk/net/sctp/socket.c @@ -4401,7 +4401,9 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len, if (copy_from_user(&getaddrs, optval, len)) return -EFAULT; - if (getaddrs.addr_num <= 0) return -EINVAL; + if (getaddrs.addr_num <= 0 || + getaddrs.addr_num >= (INT_MAX / sizeof(union sctp_addr))) + return -EINVAL; /* * For UDP-style sockets, id specifies the association to query. * If the id field is set to the value '0' then the locally bound