All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Morris <jmorris@namei.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Casey Schaufler <casey@schaufler-ca.com>,
	yangshukui <yangshukui@huawei.com>,
	selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org,
	Lizefan <lizefan@huawei.com>,
	paul@paul-moore.com, sds@tycho.nsa.gov, eparis@parisplace.org,
	james.l.morris@oracle.com, oleg@redhat.com,
	serge.hallyn@ubuntu.com
Subject: Re: isolate selinux_enforcing
Date: Mon, 13 Mar 2017 18:06:23 +1100 (AEDT)	[thread overview]
Message-ID: <alpine.LRH.2.20.1703131704400.3299@namei.org> (raw)
In-Reply-To: <87innidvko.fsf@xmission.com>

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.


> 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.

-- 
James Morris
<jmorris@namei.org>

WARNING: multiple messages have this Message-ID (diff)
From: jmorris@namei.org (James Morris)
To: linux-security-module@vger.kernel.org
Subject: isolate selinux_enforcing
Date: Mon, 13 Mar 2017 18:06:23 +1100 (AEDT)	[thread overview]
Message-ID: <alpine.LRH.2.20.1703131704400.3299@namei.org> (raw)
In-Reply-To: <87innidvko.fsf@xmission.com>

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.


> 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.

-- 
James Morris
<jmorris@namei.org>

--
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

  parent reply	other threads:[~2017-03-13  7:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <58732BCF.4090908@huawei.com>
     [not found] ` <58734284.1060504@huawei.com>
     [not found]   ` <b7f75f65-592a-5102-0ac5-4d3aa43f0b55@huawei.com>
2017-01-09 10:51     ` SELinux lead to soft lockup when pid 1 proceess reap child yangshukui
2017-01-09 18:12       ` Oleg Nesterov
2017-01-09 18:29         ` Oleg Nesterov
2017-01-09 18:43           ` Stephen Smalley
2017-01-09 23:49             ` Paul Moore
2017-01-10  0:26             ` Casey Schaufler
2017-03-09  9:03       ` isolate selinux_enforcing yangshukui
2017-03-09  9:03         ` yangshukui
2017-03-09 15:28         ` Stephen Smalley
2017-03-09 15:28           ` Stephen Smalley
2017-03-09 15:39           ` Stephen Smalley
2017-03-09 15:39             ` Stephen Smalley
2017-03-09 16:39         ` Casey Schaufler
2017-03-09 16:39           ` Casey Schaufler
2017-03-09 20:49           ` Eric W. Biederman
2017-03-09 20:49             ` Eric W. Biederman
2017-03-10  0:05             ` Paul Moore
2017-03-10  0:05               ` Paul Moore
2017-03-13  7:06             ` James Morris [this message]
2017-03-13  7:06               ` James Morris
2017-03-13 16:05               ` Casey Schaufler
2017-03-13 16:05                 ` Casey Schaufler

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=alpine.LRH.2.20.1703131704400.3299@namei.org \
    --to=jmorris@namei.org \
    --cc=casey@schaufler-ca.com \
    --cc=ebiederm@xmission.com \
    --cc=eparis@parisplace.org \
    --cc=james.l.morris@oracle.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=oleg@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=serge.hallyn@ubuntu.com \
    --cc=yangshukui@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.