isolate selinux_enforcing
Casey Schaufler
casey at schaufler-ca.com
Mon Mar 13 16:05:38 UTC 2017
On 3/13/2017 12:06 AM, James Morris wrote:
> On Thu, 9 Mar 2017, Eric W. Biederman wrote:
>
>> My expectation is that a container would run as essentially all one
>> label from a global perspective.
>>
> Keep in mind that a different classes of objects may have distinct
> labeling in SELinux. e.g. a process and a file typically have different
> labels (say, sshd_t vs. sshd_key_t).
>
> Also, I think you will want to have the global namespace always use the
> original security labels. If accessing an object from outside the
> container, the original global policy should always apply. Really, this
> needs to be an invariant property.
>
> I'd suggest implementing an orthogonal 2nd set of security labels which
> are only ever used within the container.
The work that's been done for Smack namespaces
https://lwn.net/Articles/652320
may come in handy during during your deliberations for
SELinux. Conceptually you can create aliases for your
base labels, and use those within the container. Very
much like the UID mapping of user namespaces. Labels that
don't have an alias can't be accessed within the namespace.
>> To implement this would require a revision on the selinux labels xattrs
>> so that they can be marked as being part of a container... But having
>> the labels look ordinary inside the container.
>>
>> We almost have a patch that implements something like that for the
>> capability xattr.
> It'll be interesting to see.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the Linux-security-module-archive
mailing list