From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Dave Hansen <dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: "containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
"Tanaka,
Thomas" <thomas.tanaka-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: Building a SECURE cointainer using Cgroups ?
Date: Mon, 13 Oct 2008 14:29:21 -0500 [thread overview]
Message-ID: <20081013192921.GA10814@us.ibm.com> (raw)
In-Reply-To: <1223922341.29877.29.camel@nimitz>
Quoting Dave Hansen (dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org):
> On Mon, 2008-10-13 at 11:01 -0700, Tanaka, Thomas wrote:
> > Yes absolutely that is what I am trying to achieve.
>
> I'm going to put on my Serge hat and bet that you can do it with
> security modules. :)
Right, your goal is still not very precise, but a security module -
smack or selinux - might be your best bet.
> There's nothing that cgroups or containers gives you that will help with
> your problem. We actually haven't touched the fs namespaces at all, yet
> because they work great as they stand today.
No, but there is the device whitelist cgroup and capability bounding
sets - perhaps that is what he is asking about?
If you have a normal chroot - or a container created with
clone(CLONE_NEWNS) followed by pivot_root into a completely isolated
file system tree (say, created using debootstrap), then a root user in
that pivot_root can simply mount /dev/hda1 /mnt and chroot back into
that.
So to make the above a little more secure, you can
1. restrict the container's device whitelist so that it can't
create or use the devices representing the hard drive.
or
2. take CAP_MKNOD and CAP_SYS_ADMIN out of the containers'
capability bounding set and pI, so that root can neither
mount any filesystems nor create any devices. (Of course,
also make sure /dev is suitably empty) The problem with
this one is that we still don't have a check upstream to
force mounts by a user who does not have CAP_MKNOD to be
nodev. That's one reason I keep trying to push on the
user mounts patchset - it brings that check.
-serge
next prev parent reply other threads:[~2008-10-13 19:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-13 17:03 Building a SECURE cointainer using Cgroups ? Tanaka, Thomas
[not found] ` <0A97A441BFADC74EA1E299A79C69DF9212D3F6C9E2-osO9UTpF0UQ64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-10-13 17:54 ` Dave Hansen
2008-10-13 18:01 ` Tanaka, Thomas
[not found] ` <0A97A441BFADC74EA1E299A79C69DF9212D3F6CA1B-osO9UTpF0UQ64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-10-13 18:25 ` Dave Hansen
2008-10-13 19:29 ` Serge E. Hallyn [this message]
[not found] ` <20081013192921.GA10814-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-10-13 20:57 ` Tanaka, Thomas
[not found] ` <0A97A441BFADC74EA1E299A79C69DF9212D3F6CA82-osO9UTpF0UQ64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-10-13 21:04 ` Serge E. Hallyn
[not found] ` <20081013210420.GA26529-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-10-13 21:13 ` Tanaka, Thomas
2008-10-14 8:53 ` Daniel P. Berrange
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=20081013192921.GA10814@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=thomas.tanaka-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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