From: Richard Weinberger <richard@nod.at>
To: Andi Kleen <andi@firstfloor.org>,
Shanker Wang <shanker@tuna.tsinghua.edu.cn>
Cc: netdev@vger.kernel.org,
Hannes Frederic Sowa <hannes@stressinduktion.org>,
Richard Weinberger <richard.weinberger@gmail.com>,
Guillaume Nault <g.nault@alphalink.fr>,
Miao Wang <shankerwangmiao@gmail.com>
Subject: Re: [PATCH] net:ppp: replace too strict capability restriction on opening /dev/ppp
Date: Mon, 20 Jun 2016 08:47:12 +0200 [thread overview]
Message-ID: <57679170.5030406@nod.at> (raw)
In-Reply-To: <87wplkihbp.fsf@tassilo.jf.intel.com>
Am 20.06.2016 um 07:02 schrieb Andi Kleen:
> Shanker Wang <shanker@tuna.tsinghua.edu.cn> writes:
>
>> This patch removes the check for CAP_NET_ADMIN in the initial namespace
>> when opening /dev/open. Instead, CAP_NET_ADMIN is checked in the user
>> namespace the net namespace was created so that /dev/ppp cat get opened
>> in a unprivileged container.
>
> Seems dangerous. From a quick look at the PPP ioctl there is no limit
> how many PPP devices this can create. So a container having access to
> this would be able to fill all kernel memory. Probably needs more
> auditing and hardening first.
>
> In general there seems to be a lot of attack surface for root
> in PPP.
You are right.
Shanker Wang, I had also another at the open function, it is more complicated
than I thought. Please see how ppp_unattached_ioctl() is called.
Before we give containers access to it the use of nsproxy has to be removed.
Not sure how easy this will be, especially since you cannot break existing users.
Thanks,
//richard
next prev parent reply other threads:[~2016-06-20 6:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-18 23:38 [PATCH] net:ppp: replace too strict capability restriction on opening /dev/ppp Shanker Wang
2016-06-20 5:02 ` Andi Kleen
2016-06-20 6:47 ` Richard Weinberger [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-06-19 5:21 Shanker Wang
2016-06-19 5:24 ` David Miller
2016-06-19 5:31 ` Shanker Wang
2016-06-19 10:13 ` Richard Weinberger
2016-06-19 10:36 ` Shanker Wang
2016-06-19 10:40 ` Richard Weinberger
2016-07-16 9:41 ` Shanker Wang
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=57679170.5030406@nod.at \
--to=richard@nod.at \
--cc=andi@firstfloor.org \
--cc=g.nault@alphalink.fr \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
--cc=richard.weinberger@gmail.com \
--cc=shanker@tuna.tsinghua.edu.cn \
--cc=shankerwangmiao@gmail.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).