All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: Eric Paris <eparis@parisplace.org>
Cc: Eric Paris <eparis@redhat.com>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	James Morris <jmorris@namei.org>,
	LSM List <linux-security-module@vger.kernel.org>,
	SE-Linux <selinux@tycho.nsa.gov>,
	John Johansen <john.johansen@canonical.com>,
	Kees Cook <keescook@chromium.org>,
	Casey Schaufler <casey@schaufler-ca.com>
Subject: Re: [PATCH v10] LSM: Multiple concurrent LSMs
Date: Wed, 12 Dec 2012 12:46:04 -0800	[thread overview]
Message-ID: <50C8ED0C.2010904@schaufler-ca.com> (raw)
In-Reply-To: <CACLa4pu89Sc7hiTE3aDhrLG0Q9ikwwdb2nkyBBfLm3zpa0hyrw@mail.gmail.com>

On 12/12/2012 10:47 AM, Eric Paris wrote:
> On Wed, Dec 12, 2012 at 1:25 PM, Casey Schaufler <casey@schaufler-ca.com> wrote:
>
>> Configure None as the presented LSM and all legacy userspace
>> will fail. Trouble for all.
> I think the question is when and how it fails.  I'd like SELinux to
> fail really early and in some clean way if it is non-present and you
> don't have new userspace.  I'd rather it fail on policy load than on
> some later /proc/*/attr/ issue.  I can do it myself even if you don't
> want to do it as part of the stacking work.

So the problem would be old userspace (new userspace can query
/sys/kernel/security/lsm and /sys/kernel/security/present) with
a kernel configured with present=apparmor.

You want loading SELinux policy to fail in this case, because
you know that the system isn't going to work properly. You are
suggesting a kernel change that inhibits loading the SELinux
policy unless userspace tells the kernel it is OK to do so
if present is not selinux.

I have no objection to such. You could look at CONFIG_PRESENT_SECURITY
in the SELinux initialization code and set a "don't load" trigger if
it isn't "selinux". Your selinuxfs (or some other) interface could
allow the trigger to get unset by the updated userspace.

 

>
> My current thought is a required ioctl before policy load if
> non-present otherwise reject policy load instead of the entirely new
> policy load file.
>
> -Eric
>
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
> the words "unsubscribe selinux" without quotes as the message.
>


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2012-12-12 20:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50C65DE2.5090909@schaufler-ca.com>
     [not found] ` <201212112128.ADI26010.OQJVLOFSOFtHMF@I-love.SAKURA.ne.jp>
2012-12-11 15:31   ` [PATCH v10] LSM: Multiple concurrent LSMs Casey Schaufler
     [not found]     ` <201212122159.CEC09839.HMOFtQFLJSVFOO@I-love.SAKURA.ne.jp>
2012-12-12 15:48       ` Casey Schaufler
2012-12-12 15:55         ` Eric Paris
2012-12-12 16:24           ` Casey Schaufler
2012-12-12 16:33             ` Eric Paris
2012-12-12 17:04               ` Casey Schaufler
2012-12-12 17:11                 ` Eric Paris
     [not found]                   ` <CAGXu5jLf+apZK5poD6GKzLkC+p6+mAqKhU3neoOZjr2JumvmpA@mail.gmail.com>
2012-12-12 17:22                     ` Eric Paris
2012-12-12 17:31                   ` Casey Schaufler
2012-12-12 17:47                     ` Eric Paris
2012-12-12 18:25                       ` Casey Schaufler
2012-12-12 18:47                         ` Eric Paris
2012-12-12 20:46                           ` Casey Schaufler [this message]
2012-12-12 20:51                             ` Eric Paris
2012-12-12 22:01                               ` Casey Schaufler
     [not found]                 ` <201212132106.AFI82338.QMFHFLSJOtOOFV@I-love.SAKURA.ne.jp>
2012-12-13 16:12                   ` Eric Paris
2012-12-13 16:31                     ` Casey Schaufler
     [not found]                       ` <CAGXu5jJf4NEvs6TjVCBxgd9e8cGwag_-viEntgTBUq85fULr8w@mail.gmail.com>
2012-12-16  3:06                         ` Casey Schaufler
     [not found]                     ` <201212142326.DDG90674.SFHFMOOVLFJtQO@I-love.SAKURA.ne.jp>
2012-12-14 15:07                       ` Eric Paris
2012-12-13 16:38                   ` 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=50C8ED0C.2010904@schaufler-ca.com \
    --to=casey@schaufler-ca.com \
    --cc=eparis@parisplace.org \
    --cc=eparis@redhat.com \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=keescook@chromium.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=selinux@tycho.nsa.gov \
    /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.