Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- From: Oren Laadan <orenl@xxxxxxxxxxxxxxx>
- Date: Wed, 19 Dec 2007 19:07:04 -0500
Serge E. Hallyn wrote:
Quoting Pavel Emelyanov (xemul@xxxxxxxxxx):
Oren Laadan wrote:
Serge E. Hallyn wrote:Oren, AFAIS you've seen my patches for device access controller, right?
Quoting Oren Laadan (orenl@xxxxxxxxxxxxxxx):Yes, that works to disallow all device files from a mounted file system.
I hate to bring this again, but what if the admin in the containerMiklos' user mount patches enforced that if !capable(CAP_MKNOD),
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 ?
then mnt->mnt_flags |= MNT_NODEV. So that's no problem.
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 devicesBy that you mean more along the lines of Pavel's patch than my whitelist
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.
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.
If you mean this one:
http://openvz.org/pipermail/devel/2007-September/007647.html
then ack :)
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.
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
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- From: Pavel Emelyanov
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- References:
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- From: Serge E. Hallyn
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- From: Tetsuo Handa
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- From: Serge E. Hallyn
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- From: Oren Laadan
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- From: Serge E. Hallyn
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- From: Oren Laadan
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- From: Pavel Emelyanov
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- From: Serge E. Hallyn
- Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- Prev by Date: Re: printf internals
- Next by Date: Re: [patch, rfc] mm.h, security.h, key.h and preventing namespace poisoning
- Previous by thread: Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- Next by thread: Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.
- Index(es):
Relevant Pages
|