From: Oren Laadan <orenl@cs.columbia.edu>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
linux-fsdevel@vger.kernel.org,
Linux Containers <containers@lists.osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
Date: Thu, 20 Dec 2007 20:47:00 -0500 [thread overview]
Message-ID: <476B1B14.3060404@cs.columbia.edu> (raw)
In-Reply-To: <476A1CE0.30505@openvz.org>
Pavel Emelyanov wrote:
> Oren Laadan wrote:
>> Serge E. Hallyn wrote:
>>> Quoting Pavel Emelyanov (xemul@openvz.org):
>>>> Oren Laadan wrote:
>>>>> Serge E. Hallyn wrote:
>>>>>> Quoting Oren Laadan (orenl@cs.columbia.edu):
>>>>>>> I hate to bring this again, but what if the admin in the container
>>>>>>> mounts an external file system (eg. nfs, usb, loop mount from a file,
>>>>>>> or via fuse), and that file system already has a device that we would
>>>>>>> like to ban inside that container ?
>>>>>> Miklos' user mount patches enforced that if !capable(CAP_MKNOD),
>>>>>> then mnt->mnt_flags |= MNT_NODEV. So that's no problem.
>>>>> Yes, that works to disallow all device files from a mounted file system.
>>>>>
>>>>> But it's a black and white thing: either they are all banned or allowed;
>>>>> you can't have some devices allowed and others not, depending on type
>>>>> A scenario where this may be useful is, for instance, if we some apps in
>>>>> the container to execute withing a pre-made chroot (sub)tree within that
>>>>> container.
>>>>>
>>>>>> But that's been pulled out of -mm! ? Crap.
>>>>>>
>>>>>>> Since anyway we will have to keep a white- (or black-) list of devices
>>>>>>> that are permitted in a container, and that list may change even change
>>>>>>> per container -- why not enforce the access control at the VFS layer ?
>>>>>>> It's safer in the long run.
>>>>>> By that you mean more along the lines of Pavel's patch than my whitelist
>>>>>> LSM, or you actually mean Tetsuo's filesystem (i assume you don't mean that
>>>>>> by 'vfs layer' :), or something different entirely?
>>>>> :)
>>>>>
>>>>> By 'vfs' I mean at open() time, and not at mount(), or mknod() time.
>>>>> Either yours or Pavel's; I tend to prefer not to use LSM as it may
>>>>> collide with future security modules.
>>>> Oren, AFAIS you've seen my patches for device access controller, right?
>> If you mean this one:
>> http://openvz.org/pipermail/devel/2007-September/007647.html
>> then ack :)
>
> Great! Thanks.
>
>>>> Maybe we can revisit the issue then and try to come to agreement on what
>>>> kind of model and implementation we all want?
>>> That would be great, Pavel. I do prefer your solution over my LSM, so
>>> if we can get an elegant block device control right in the vfs code that
>>> would be my preference.
>> I concur.
>>
>> So it seems to me that we are all in favor of the model where open()
>> of a device will consult a black/white-list. Also, we are all in favor
>> of a non-LSM implementation, Pavel's code being a good example.
>
> Thank you, Oren and Serge! I will revisit this issue then, but
> I have a vacation the next week and, after this, we have a New
> Year and Christmas holidays in Russia. So I will be able to go
> on with it only after the 7th January :( Hope this is OK for you.
>
> Besides, Andrew told that he would pay little attention to new
> features till the 2.6.24 release, so I'm afraid we won't have this
> even in -mm in the nearest months :(
Sounds great ! (as for the delay, it wasn't the highest priority issue
to begin with, so no worries).
Ah.. coincidentally they are celebrated here, too, on the same time :D
Merry Christmas and Happy New Year !
Oren.
>
> Thanks,
> Pavel
>
>> Oren.
>>
>>> The only thing that makes me keep wanting to go back to an LSM is the
>>> fact that the code defining the whitelist seems out of place in the vfs.
>>> But I guess that's actually separated into a modular cgroup, with the
>>> actual enforcement built in at the vfs. So that's really the best
>>> solution.
>>>
>>> -serge
>
next prev parent reply other threads:[~2007-12-21 1:46 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071216080441.435456586@I-love.SAKURA.ne.jp>
[not found] ` <20071216080628.061470932@I-love.SAKURA.ne.jp>
2007-12-16 10:44 ` [patch 0/2] [RFC] Simple tamper-proof device filesystem Tetsuo Handa
2007-12-16 10:56 ` [patch 1/2] " Tetsuo Handa
2007-12-06 15:29 ` Pavel Machek
2007-12-18 15:55 ` Valdis.Kletnieks
2007-12-18 16:43 ` Casey Schaufler
2007-12-16 11:21 ` David Newall
2007-12-16 11:26 ` Tetsuo Handa
2007-12-16 11:31 ` David Newall
2007-12-16 11:36 ` Tetsuo Handa
2007-12-16 11:58 ` David Newall
2007-12-16 12:03 ` Tetsuo Handa
2007-12-16 12:14 ` Tetsuo Handa
2007-12-17 6:00 ` David Newall
2007-12-18 15:33 ` Radoslaw Szkodzinski
2007-12-16 16:52 ` Indan Zupancic
2007-12-16 19:48 ` Al Viro
2007-12-17 0:40 ` Tetsuo Handa
2007-12-17 11:44 ` Indan Zupancic
2007-12-17 12:59 ` Tetsuo Handa
2007-12-17 13:05 ` Al Boldi
2007-12-17 13:16 ` Tetsuo Handa
2007-12-18 15:22 ` Radoslaw Szkodzinski
2007-12-19 12:11 ` Tetsuo Handa
2007-12-19 19:14 ` Radoslaw Szkodzinski
2007-12-17 13:32 ` Tetsuo Handa
2007-12-17 6:42 ` penguin-kernel
2007-12-17 8:38 ` David Wagner
2007-12-17 1:19 ` David Wagner
2007-12-17 19:48 ` Serge E. Hallyn
2007-12-18 0:03 ` Tetsuo Handa
2007-12-18 0:39 ` Serge E. Hallyn
2007-12-18 1:39 ` Oren Laadan
2007-12-18 2:09 ` Serge E. Hallyn
2007-12-18 3:04 ` Oren Laadan
2007-12-19 9:43 ` Pavel Emelyanov
2007-12-19 14:10 ` Serge E. Hallyn
2007-12-20 0:07 ` Oren Laadan
2007-12-20 7:42 ` Pavel Emelyanov
2007-12-20 14:09 ` Serge E. Hallyn
2007-12-21 1:47 ` Oren Laadan [this message]
2007-12-19 14:13 ` Serge E. Hallyn
2007-12-18 1:55 ` Serge E. Hallyn
2007-12-18 2:26 ` Tetsuo Handa
2007-12-18 2:53 ` serge
2007-12-18 3:40 ` Tetsuo Handa
2007-12-19 23:43 ` Serge E. Hallyn
2007-12-24 13:09 ` Tetsuo Handa
2007-12-16 11:03 ` [patch 2/2] " Tetsuo Handa
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=476B1B14.3060404@cs.columbia.edu \
--to=orenl@cs.columbia.edu \
--cc=containers@lists.osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=serue@us.ibm.com \
--cc=xemul@openvz.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