From: David Miller <davem@davemloft.net>
To: jann@thejh.net
Cc: kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, netdev@vger.kernel.org
Subject: Re: [PATCH] net: explicitly whitelist sysctls for unpriv namespaces
Date: Thu, 22 Sep 2016 01:30:37 -0400 (EDT) [thread overview]
Message-ID: <20160922.013037.1974473377908826519.davem@davemloft.net> (raw)
In-Reply-To: <1474232300-8423-1-git-send-email-jann@thejh.net>
From: Jann Horn <jann@thejh.net>
Date: Sun, 18 Sep 2016 22:58:20 +0200
> There were two net sysctls that could be written from unprivileged net
> namespaces, but weren't actually namespaced.
>
> To fix the existing issues and prevent stuff this from happening again in
> the future, explicitly whitelist permitted sysctls.
>
> Note: The current whitelist is "allow everything that was previously
> accessible and that doesn't obviously modify global state".
>
> On my system, this patch just removes the write permissions for
> ipv4/netfilter/ip_conntrack_max, which would have been usable for a local
> DoS. With a different config, the ipv4/vs/debug_level sysctl would also be
> affected.
>
> Maximum impact of this seems to be local DoS, and it's a fairly large
> commit, so I'm sending this publicly directly.
>
> An alternative (and much smaller) fix would be to just change the
> permissions of the two files in question to be 0444 in non-privileged
> namespaces, but I believe that this solution is slightly less error-prone.
> If you think I should switch to the simple fix, let me know.
>
> Signed-off-by: Jann Horn <jann@thejh.net>
I think this is fine for net-next and will apply it there.
But for 'net' and 'stable', please also submit the simpler fix.
Thanks.
next prev parent reply other threads:[~2016-09-22 5:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-18 20:58 [PATCH] net: explicitly whitelist sysctls for unpriv namespaces Jann Horn
2016-09-22 5:30 ` David Miller [this message]
2016-09-22 5:31 ` 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=20160922.013037.1974473377908826519.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jann@thejh.net \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--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).