netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Lorenzo Colitti <lorenzo@google.com>
Cc: Ben Hutchings <ben@decadent.org.uk>,
	Florian Westphal <fw@strlen.de>, netdev <netdev@vger.kernel.org>,
	Vasiliy Kulikov <segoon@openwall.com>
Subject: Re: [RFC][PATCH] IP: Make ping sockets optional
Date: Fri, 25 Apr 2014 23:18:09 +0200	[thread overview]
Message-ID: <20140425211809.GC7050@order.stressinduktion.org> (raw)
In-Reply-To: <CAKD1Yr0X5vqhdmFkwfgd0WJ0Jw7GGm8=iHNPeyfNKoODN4=1Mw@mail.gmail.com>

On Fri, Apr 25, 2014 at 07:37:02PM +0900, Lorenzo Colitti wrote:
> On Fri, Apr 25, 2014 at 1:37 AM, Hannes Frederic Sowa
> <hannes@stressinduktion.org> wrote:
> > The origins of this interface are in the openwall project. I assume
> > embedded devices were not that high up on their agenda.
> 
> One of the original discussion threads I posted above has a link to a
> lengthy discussion on why the original designers of this code thought
> capabilities were not a good idea from a security standpoint.

Hmm, maybe I have overlooked it but I have not found any references to
capabilities.

> > We absolutely cannot abandon the interface as it already is in use by
> > android, as Lorenzo stated.
> 
> Well, the fact that it's in use by Android doesn't mean it can't be
> made optional - Android can just turn the feature on in their kernels.
> It would be unfortunate if it were to be removed entirely.
> 
> > Will android switch to file based capabilities
> > in some time? Is that possible?
> 
> I think Android does support file capabilities. But this socket type
> is not just for the ping binary. The fact that this socket type is
> available to any binary allows any application developer to write an
> app that can send ping packets. That seems like a useful capability
> for a diagnostic app.

Ok, I see. There seem to be more users of this on Android. I guess ping
sockets are available to every application writer or will it be set
dynamically because of application permissions? Sorry, I am not that common
with android.

> On the other hand, it seems to me that giving that same diagnostic app
> CAP_NET_RAW would be unacceptable from a security point of view since
> that app would now be able to sniff all traffic on the system, with
> obvious privacy implications. There are also the usual security
> concerns such as what if an exploit is discovered in the ping binary,
> etc. etc.

Ack, that's why my first hunch was to introduce a new capability just for ping
sockets. I assume this wouldn't work for android?

> What's the problem with this code? Is it just the 10KB in size?

I thought it was mostly unused. But now I heard that android uses it,
this is actually not true any more.

Bye,

  Hannes

  reply	other threads:[~2014-04-25 21:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 15:20 [RFC][PATCH] IP: Make ping sockets optional Ben Hutchings
2014-04-23 15:30 ` Florian Westphal
2014-04-23 15:55   ` Ben Hutchings
2014-04-23 16:27     ` Florian Westphal
2014-04-24 15:17       ` Hannes Frederic Sowa
2014-04-24 16:02         ` Ben Hutchings
2014-04-24 16:37           ` Hannes Frederic Sowa
2014-04-25 10:37             ` Lorenzo Colitti
2014-04-25 21:18               ` Hannes Frederic Sowa [this message]
2014-04-26  3:02                 ` Lorenzo Colitti
2014-04-25 21:43               ` Ben Hutchings
2014-04-23 16:05 ` David Laight
2014-04-24 15:59 ` Lorenzo Colitti

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=20140425211809.GC7050@order.stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=ben@decadent.org.uk \
    --cc=fw@strlen.de \
    --cc=lorenzo@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=segoon@openwall.com \
    /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).