public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miquel van Smoorenburg <mikevs@xs4all.net>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
	Arnd Bergmann <arnd@arndb.de>,
	Kees Cook <kees.cook@canonical.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	serge@hallyn.com, eparis@redhat.com, jmorris@namei.org,
	eugeneteo@kernel.org, drosenberg@vsecurity.com,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Miquel van Smoorenburg <mikevs@xs4all.net>
Subject: Re: [PATCH] [RFC] Make it easier to harden /proc/
Date: Thu, 17 Mar 2011 11:14:26 +0100	[thread overview]
Message-ID: <4D81DF02.8090608@xs4all.net> (raw)
In-Reply-To: <20110316211525.GA13711@p183.telecom.by>



On 16-03-11 10:15 PM, Alexey Dobriyan wrote:
> On Wed, Mar 16, 2011 at 10:07:48PM +0100, Richard Weinberger wrote:
>> Am Mittwoch 16 März 2011, 22:04:52 schrieb Alexey Dobriyan:
>>> On Wed, Mar 16, 2011 at 09:52:49PM +0100, Richard Weinberger wrote:
>>>> Am Mittwoch 16 März 2011, 21:45:45 schrieb Arnd Bergmann:
>>>>> On Wednesday 16 March 2011 21:08:16 Richard Weinberger wrote:
>>>>>> Am Mittwoch 16 März 2011, 20:55:49 schrieb Kees Cook:
>>>>> I had expected that any dangerous sysctl would not be visible in
>>>>> an unpriviledge container anyway.
>>>>
>>>> No way.
>>>
>>> No way what exactly?
>>
>> Dangerous sysctls are not protected at all.
>> E.g. A jailed root can use /proc/sysrq-trigger.
>
> Yes, and it's suggested that you do not show it at all,
> instead of bloaing ctl_table.
>
> But this requires knowledge which /proc is root and which one is "root".
> :-(
>
> With current splitup into FOO_NS...

And what about sysfs, there's a lot of writable stuff there too. For 
example in /sys/module/*/parameters, /sys/block/*/device/queu , 
/sys/kernel/, /sys/platform/ etc. Perhaps things you don't want to be 
read too, such as some uevent files.

Shouldn't that be made inaccessible as well, preferably not visible?

Programs in containers may need sysfs for stuff like 
/sys/class/net/<device> , so just not mounting sysfs may not be an option.

Mike.

  reply	other threads:[~2011-03-17 10:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 19:31 [PATCH] [RFC] Make it easier to harden /proc/ Richard Weinberger
2011-03-16 19:55 ` Kees Cook
2011-03-16 20:08   ` Richard Weinberger
2011-03-16 20:45     ` Arnd Bergmann
2011-03-16 20:52       ` Richard Weinberger
2011-03-16 21:03         ` Arnd Bergmann
2011-03-16 21:04         ` Alexey Dobriyan
2011-03-16 21:07           ` Richard Weinberger
2011-03-16 21:15             ` Alexey Dobriyan
2011-03-17 10:14               ` Miquel van Smoorenburg [this message]
2011-03-17 10:57                 ` Richard Weinberger
2011-03-16 21:17         ` Eric W. Biederman
2011-03-16 21:23           ` Richard Weinberger
2011-03-16 21:27             ` Eric W. Biederman
2011-03-17  6:41           ` Kees Cook
2011-03-17  7:30             ` Richard Weinberger
2011-03-16 21:19     ` Alexey Dobriyan
2011-03-17 16:51       ` Eric W. Biederman
2011-03-19 10:43         ` Richard Weinberger

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=4D81DF02.8090608@xs4all.net \
    --to=mikevs@xs4all.net \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=drosenberg@vsecurity.com \
    --cc=ebiederm@xmission.com \
    --cc=eparis@redhat.com \
    --cc=eugeneteo@kernel.org \
    --cc=jmorris@namei.org \
    --cc=kees.cook@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=serge@hallyn.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