From: ebiederm@xmission.com (Eric W. Biederman)
To: Rob Landley <rob@landley.net>
Cc: "linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
davem@davemloft.net, kuznet@ms2.inr.ac.ru,
xiyou.wangcong@gmail.com, yoshfuji@linux-ipv6.org,
segoon@openwall.com, <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/1] Change ping_group_range default to what Android's init script sets.
Date: Tue, 31 Oct 2017 13:44:59 -0500 [thread overview]
Message-ID: <8760avupg4.fsf@xmission.com> (raw)
In-Reply-To: <29f9ee1d-7ad4-b4df-7202-35c66893cc16@landley.net> (Rob Landley's message of "Mon, 30 Oct 2017 22:39:25 -0500")
Rob Landley <rob@landley.net> writes:
> From: Rob Landley <rob@landley.net>
>
> See message from the Android "native tools and libraries team" lead
> (I.E. the maintainer of bionic, adb, toolbox, etc) at
> http://lists.landley.net/pipermail/toybox-landley.net/2017-July/009103.html
Sigh. The list has no https access so it is unreachable here, and even
if it were I would not be able to verify that was not some spoofed
or someone was not hacking the contents of the list archive in flight.
As for the patch itself going from no group is allowed to reate ping sockets by
default to everyone may create ping sockets by default seems potentially
dangerous.
Why in the world would this be safe?
Why would this be wise?
Eric
> Signed-off-by: Rob Landley <rob@landley.net>
> ---
>
> net/ipv4/af_inet.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
> index e31108e..5b39a96 100644
> --- a/net/ipv4/af_inet.c
> +++ b/net/ipv4/af_inet.c
> @@ -1712,12 +1712,8 @@ static __net_init int inet_init_net(struct net *net)
> net->ipv4.ip_local_ports.range[1] = 60999;
>
> seqlock_init(&net->ipv4.ping_group_range.lock);
> - /*
> - * Sane defaults - nobody may create ping sockets.
> - * Boot scripts should set this to distro-specific group.
> - */
> - net->ipv4.ping_group_range.range[0] = make_kgid(&init_user_ns, 1);
> - net->ipv4.ping_group_range.range[1] = make_kgid(&init_user_ns, 0);
> + net->ipv4.ping_group_range.range[0] = make_kgid(&init_user_ns, 0);
> + net->ipv4.ping_group_range.range[1] = make_kgid(&init_user_ns, 2147483647);
>
> /* Default values for sysctl-controlled parameters.
> * We set them here, in case sysctl is not compiled.
parent reply other threads:[~2017-10-31 18:44 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <29f9ee1d-7ad4-b4df-7202-35c66893cc16@landley.net>]
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=8760avupg4.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=davem@davemloft.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rob@landley.net \
--cc=segoon@openwall.com \
--cc=xiyou.wangcong@gmail.com \
--cc=yoshfuji@linux-ipv6.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).