On Mon, Dec 14, 2015 at 8:17 AM, Hannes Frederic Sowa
<han...@stressinduktion.org> wrote:
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -1098,6 +1098,9 @@ int __sock_create(struct net *net, int family, int 
> type, int protocol,
>                 return -EAFNOSUPPORT;
>         if (type < 0 || type >= SOCK_MAX)
>                 return -EINVAL;
> +       /* upper bound should be tested by per-protocol .create callbacks */
> +       if (protocol < 0)
> +               return -EINVAL;

Why? At least  bt_sock_create() and  netlink_create() do both upper bound
and lower bound checks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to