netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: hannes@stressinduktion.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] net: add validation for the socket syscall protocol argument
Date: Mon, 14 Dec 2015 14:32:17 -0500 (EST)	[thread overview]
Message-ID: <20151214.143217.492564448937971982.davem@davemloft.net> (raw)
In-Reply-To: <1450109869-23769-1-git-send-email-hannes@stressinduktion.org>

From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Mon, 14 Dec 2015 17:17:49 +0100

> diff --git a/net/socket.c b/net/socket.c
> index 456fadb..d2f3d49 100644
> --- 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;
>  

Please get rid of this part of your patch and resubmit, thanks.

      parent reply	other threads:[~2015-12-14 19:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 16:17 [PATCH net] net: add validation for the socket syscall protocol argument Hannes Frederic Sowa
2015-12-14 18:59 ` Cong Wang
2015-12-14 19:32 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151214.143217.492564448937971982.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).