archive mirror
 help / color / mirror / Atom feed
From: David Miller <>
Subject: Re: [PATCH] net: ipv4: add IPPROTO_ICMP socket kind
Date: Tue, 12 Apr 2011 14:25:34 -0700 (PDT)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Solar Designer <>
Date: Tue, 12 Apr 2011 09:06:59 +0400

> On Sat, Apr 09, 2011 at 02:15:14PM +0400, Vasiliy Kulikov wrote:
>> This patch adds IPPROTO_ICMP socket kind.  It makes it possible to send
>> ICMP_ECHO messages and receive the corresponding ICMP_ECHOREPLY messages
>> without any special privileges.  In other words, the patch makes it
>> possible to implement setuid-less and CAP_NET_RAW-less /bin/ping.  In
>> order not to increase the kernel's attack surface (in case of
>> vulnerabilities in the newly added code), the new functionality is
>> disabled by default, but is enabled at bootup by supporting Linux
>> distributions, optionally with restriction to a group or a group range
> ...
>> For Openwall GNU/*/Linux it is the last step on the road to the
>> setuid-less distro.
> More correctly, it _was_ the last step - we've already taken it, so a
> revision of the patch (against OpenVZ/RHEL5 kernels) is currently in use.
> We would really like this accepted into mainline, which is why Vasiliy
> spends extra effort to keep the patch updated to current mainline
> kernels and re-test it.  If there are any comments/concerns/objections,
> we'd be happy to hear those.
>> Signed-off-by: Vasiliy Kulikov <>
> Acked-by: Solar Designer <>

I have no fundamental objections to this change and I'll be happy to
apply it after we iron out a few details.

First, please get rid of the debug option, we have pr_debug() which can
be dynamically turned on and off at run time these days.

Second, if this is a bonafide core facility we'd like everyone to use,
let's make it so.  I want it so that every ping binary can expect this
facility to be there if the kernel is new enough.

So let's get rid of the config option.

Third, either we trust this code or we do not.  If we are OK with a
user application spamming whatever they wish out of a datagram UDP
socket, they can do no more harm with this thing unless there are

The group range thing I also consider hackish.  In my opinion two
other approaches seem more reasonable:

1) On/Off sysctl, default to ON.  This is to handle the "oh crap
   there's a really bad bug discovered in this thing" situations.

2) A single group ID, if zero it means "all groups" else it limits
   the facility to specific groups.

I would mention capabilities, but probably that's undesirable for
something like this as it creeps us back to the original problem
this is trying to resolve.

Finally, longer term, I'd really like to see ipv6 support for this
feature as well.  I absolutely am not requiring that ipv6 get
worked on right now just to apply the ipv4 variant.

So let's sort out the ipv4 side issues so I can get this into the
net-next-2.6 tree and people can start testing it.


  reply	other threads:[~2011-04-12 21:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-09 10:15 [PATCH] net: ipv4: add IPPROTO_ICMP socket kind Vasiliy Kulikov
2011-04-12  5:06 ` Solar Designer
2011-04-12 21:25   ` David Miller [this message]
2011-04-13 11:22     ` Vasiliy Kulikov
2011-05-05 11:32     ` Vasiliy Kulikov
2011-05-10 18:09     ` [PATCH v2] " Vasiliy Kulikov
2011-05-10 19:15       ` David Miller
2011-05-10 19:45         ` Vasiliy Kulikov
2011-05-13 20:01         ` [PATCH v3] " Vasiliy Kulikov
2011-05-13 20:08           ` David Miller
2011-05-13 21:30           ` Andi Kleen
2011-05-13 22:22             ` [PATCH net-next-2.6] net: ipv4: add ping_group_range documentation Eric Dumazet
2011-05-15  8:18           ` [PATCH net-next-2.6] net: ping: dont call udp_ioctl() Eric Dumazet
2011-05-15 21:30             ` Solar Designer
2011-05-15 21:44               ` David Miller
2011-05-16  7:26                 ` [PATCH net-next-2.6 v2] " Eric Dumazet
2011-05-16 12:48                   ` Vasiliy Kulikov
2011-05-16 15:50                   ` David Miller
2011-04-13 10:29 ` [PATCH] net: ipv4: add IPPROTO_ICMP socket kind Alexey Dobriyan
2011-04-13 11:32   ` Vasiliy Kulikov
2011-04-14  9:16     ` Alexey Dobriyan
2011-04-14  1:53   ` Simon Horman
  -- strict thread matches above, loose matches on Subject: below --
2011-03-18 18:00 Vasiliy Kulikov
2011-03-18 19:47 ` David Miller
2011-03-18 19:59   ` Vasiliy Kulikov

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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).