From: James Bottomley <James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
To: Stefan Berger
<stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
"Eric W. Biederman"
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Cc: mkayaalp-4hyTIkVWTs8LubxHQvXPfYdd74u8MsAO@public.gmane.org,
Mehmet Kayaalp
<mkayaalp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
sunyuqiong1988-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
david.safford-JJi787mZWgc@public.gmane.org,
linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-ima-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
linux-integrity-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Yuqiong Sun <suny-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
zohar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Subject: Re: [RFC PATCH v2 1/3] ima: extend clone() with IMA namespace support
Date: Thu, 15 Mar 2018 10:33:12 -0700 [thread overview]
Message-ID: <1521135192.5348.64.camel@HansenPartnership.com> (raw)
In-Reply-To: <c18b6e92-57f0-5994-eb60-5fadc6671832-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
On Thu, 2018-03-15 at 11:26 -0400, Stefan Berger wrote:
> On 03/15/2018 06:40 AM, Eric W. Biederman wrote:
> >
> > Stefan Berger <stefanb@linux.vnet.ibm.com> writes:
> >
> > >
> > > From: Yuqiong Sun <suny@us.ibm.com>
> > >
> > > Add new CONFIG_IMA_NS config option. Let clone() create a new
> > > IMA namespace upon CLONE_NEWNS flag. Add ima_ns data structure in
> > > nsproxy. ima_ns is allocated and freed upon IMA namespace
> > > creation and exit. Currently, the ima_ns contains no useful IMA
> > > data but only a dummy interface. This patch creates the framework
> > > for namespacing the different aspects of IMA (eg. IMA-audit, IMA-
> > > measurement, IMA-appraisal).
> > IMA is not path based. The only thing that belongs to a mount
> > namespace are paths. Therefore IMA is completely inappropriate to
> > be joint with a mount namespace.
Just to be clear: The mount namespace is not only about paths it's also
about subtree properties. However, the point still stands that IMA has
a dependency on neither.
> IMA measures the files described by these paths. The files also may
> hold signatures (security.ima xattr) needed for IMA appraisal.
The xattr is an inode property, which isn't namespaced by the mount_ns.
When we had this discussion last year, we talked about possibly using
the user_ns instead. It makes sense because for IMA signatures you're
going to need some type of keyring namespace and there's already one
hanging off the user_ns:
commit f36f8c75ae2e7d4da34f4c908cebdb4aa42c977e
Author: David Howells <dhowells@redhat.com>
Date: Tue Sep 24 10:35:19 2013 +0100
KEYS: Add per-user_namespace registers for persistent per-UID
kerberos caches
> > I saw that Serge even recently mentioned that you need to take
> > this aspect of the changes back to the drawing board. With my
> > namespace maintainer hat on I repeat that.
>
> Drawing board is here now (tuning on the text...):
>
> http://kernsec.org/wiki/index.php/IMA_Namespacing_design_consideratio
> ns
You mention an abuse case here which is basically a way of relaxing
security policy. Cannot we fix that by making policy hierarchical, so
a child namespace must have the same or a more strict policy than the
parent?
> > From a 10,000 foot view I can already tell that this is hopeless.
> > So for binding IMA namspaces and CLONE_NEWNS:
> >
> > Nacked-by: "Eric W. Biederman" <ebiederm@xmission.com>
> >
> > I am not nacking IMA namespacing just inappropriately tying ima
> > namespaces to mount namespaces. These should be completely
> > separate entities.
>
> Let's say we go down the road of spawning it independently. Can we
> use the unused clone flag 0x1000? Or should we come up with new
> unshare2()/clone2() syscalls to extend the clone bits to 64 bit? Or
> use a sysfs/securityfs file to spawn a new IMA namespace? Make this a
> generic file not an IMA specific one?
If, as a result of discussions, it turns out that a separate namespace
is the correct way to proceed, I'm sure we can sort out the details of
how we cope with the flag paucity problem.
James
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/containers
next prev parent reply other threads:[~2018-03-15 17:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 20:14 [RFC PATCH v2 0/3] ima: namespacing IMA Stefan Berger
[not found] ` <20180309201421.6150-1-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-09 20:14 ` [RFC PATCH v2 1/3] ima: extend clone() with IMA namespace support Stefan Berger
2018-03-09 20:14 ` [RFC PATCH v2 2/3] ima: Add ns_status for storing namespaced iint data Stefan Berger
2018-03-09 20:14 ` [RFC PATCH v2 3/3] ima: mamespace audit status flags Stefan Berger
[not found] ` <20180309201421.6150-2-stefanb@linux.vnet.ibm.com>
[not found] ` <20180309201421.6150-2-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-15 10:40 ` [RFC PATCH v2 1/3] ima: extend clone() with IMA namespace support Eric W. Biederman
[not found] ` <87vadxfwqj.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2018-03-15 15:26 ` Stefan Berger
[not found] ` <c18b6e92-57f0-5994-eb60-5fadc6671832-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-15 17:33 ` James Bottomley [this message]
[not found] ` <1521135192.5348.64.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2018-03-15 18:26 ` Stefan Berger
[not found] ` <1521139535.5348.89.camel@HansenPartnership.com>
[not found] ` <1521139535.5348.89.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2018-03-15 18:51 ` Stefan Berger
[not found] ` <0dc5b856-8dc6-7b5a-eeac-febd19f6498c@linux.vnet.ibm.com>
[not found] ` <0dc5b856-8dc6-7b5a-eeac-febd19f6498c-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-15 19:01 ` James Bottomley
[not found] ` <1521140467.5348.94.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2018-03-15 19:15 ` Stefan Berger
[not found] ` <87sh915eo0.fsf@xmission.com>
[not found] ` <87sh915eo0.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2018-03-15 19:49 ` Stefan Berger
[not found] ` <19ecc296-b584-4e1a-5369-30090fbc7880-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-15 20:35 ` Eric W. Biederman
[not found] ` <87d10513id.fsf@xmission.com>
[not found] ` <87d10513id.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2018-03-21 15:19 ` Mimi Zohar
[not found] ` <056e5b9e-b4d3-1862-baea-06dda4bd0713-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-03-15 19:20 ` Eric W. Biederman
2018-03-16 17:04 ` Stefan Berger
2018-03-22 16:47 ` Stefan Berger
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=1521135192.5348.64.camel@HansenPartnership.com \
--to=james.bottomley-d9phhud1jfjcxq6kfmz53/egyhegw8jk@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=david.safford-JJi787mZWgc@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=linux-ima-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=linux-integrity-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mkayaalp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=mkayaalp-4hyTIkVWTs8LubxHQvXPfYdd74u8MsAO@public.gmane.org \
--cc=stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=suny-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=sunyuqiong1988-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=zohar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@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