netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Stefan Schmidt <stefan@datenfreihafen.org>
Cc: netdev@vger.kernel.org, isdn@linux-pingi.de, jreuter@yaina.de,
	ralf@linux-mips.org, alex.aring@gmail.com,
	orinimron123@gmail.com
Subject: Re: [PATCH 4/5] ieee802154: enforce CAP_NET_RAW for raw sockets
Date: Sat, 21 Sep 2019 14:30:58 +0200	[thread overview]
Message-ID: <20190921123058.GA2462840@kroah.com> (raw)
In-Reply-To: <5c100446-037a-cdc2-5491-fd10385a98fd@datenfreihafen.org>

On Sat, Sep 21, 2019 at 01:58:55PM +0200, Stefan Schmidt wrote:
> Hello.
> 
> On 20.09.19 09:35, Greg Kroah-Hartman wrote:
> > From: Ori Nimron <orinimron123@gmail.com>
> > 
> > When creating a raw AF_IEEE802154 socket, CAP_NET_RAW needs to be
> > checked first.
> > 
> > Signed-off-by: Ori Nimron <orinimron123@gmail.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> >  net/ieee802154/socket.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c
> > index badc5cfe4dc6..d93d4531aa9b 100644
> > --- a/net/ieee802154/socket.c
> > +++ b/net/ieee802154/socket.c
> > @@ -1008,6 +1008,9 @@ static int ieee802154_create(struct net *net, struct socket *sock,
> >  
> >  	switch (sock->type) {
> >  	case SOCK_RAW:
> > +		rc = -EPERM;
> > +		if (!capable(CAP_NET_RAW))
> > +			goto out;
> >  		proto = &ieee802154_raw_prot;
> >  		ops = &ieee802154_raw_ops;
> >  		break;
> > 
> 
> I assume this will go as a whole series into net. If you want me to pick
> it up into my tree directly let me know.
> 
> Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>

That's up to the networking maintainer, if he does not suck it in, I'll
resend and ask you to take it.

thanks,

greg k-h

  reply	other threads:[~2019-09-21 12:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20  7:35 [PATCH 0/5] Raw socket cleanups Greg Kroah-Hartman
2019-09-20  7:35 ` [PATCH 1/5] mISDN: enforce CAP_NET_RAW for raw sockets Greg Kroah-Hartman
2019-09-20  7:35 ` [PATCH 2/5] appletalk: " Greg Kroah-Hartman
2019-09-20  7:35 ` [PATCH 3/5] ax25: " Greg Kroah-Hartman
2019-09-20  7:35 ` [PATCH 4/5] ieee802154: " Greg Kroah-Hartman
2019-09-21 11:58   ` Stefan Schmidt
2019-09-21 12:30     ` Greg Kroah-Hartman [this message]
2019-09-20  7:35 ` [PATCH 5/5] nfc: " Greg Kroah-Hartman
2019-09-24 14:38 ` [PATCH 0/5] Raw socket cleanups David Miller

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=20190921123058.GA2462840@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alex.aring@gmail.com \
    --cc=isdn@linux-pingi.de \
    --cc=jreuter@yaina.de \
    --cc=netdev@vger.kernel.org \
    --cc=orinimron123@gmail.com \
    --cc=ralf@linux-mips.org \
    --cc=stefan@datenfreihafen.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).