From: Casey Schaufler <casey@schaufler-ca.com>
To: Stephen Smalley <sds@tycho.nsa.gov>, selinux@tycho.nsa.gov
Cc: James Morris <jmorris@namei.org>,
Eric Paris <eparis@parisplace.org>,
"Serge E. Hallyn" <serue@us.ibm.com>
Subject: Re: [RFC][PATCH] selinux: enable authoritative granting of capabilities
Date: Tue, 12 Jun 2007 08:08:58 -0700 (PDT) [thread overview]
Message-ID: <749740.73121.qm@web36607.mail.mud.yahoo.com> (raw)
In-Reply-To: <1181652652.17547.82.camel@moss-spartans.epoch.ncsc.mil>
--- Stephen Smalley <sds@tycho.nsa.gov> wrote:
> On Mon, 2007-06-11 at 15:55 -0400, Stephen Smalley wrote:
> > Extend SELinux to allow capabilities to be granted authoritatively.
> > Introduces a new cap_override access vector to indicate when the
> > secondary module (i.e. capability or dummy) check should be skipped.
> > Handle the new class gracefully even if the policy does not yet have
> > it defined.
>
> I was asked privately to explain what motivated this patch. As the
> answer is likely of general interest, here is a summary of (and
> expansion upon) my reply. I'll likely fold some of this text into the
> description that goes with the final form of this patch.
Thank you for taking the time to provide this.
> The idea of using SELinux RBAC/TE to completely manage Linux
> capabilities has always been desirable from our point of view, and was
> described in the earliest discussions on selinux list (see archives). A
> similar approach to superuser privilege overrides was even implemented
> in a predecessor of SELinux, the DTOS system. We had held off on it
> originally in SELinux because of the potential danger in weakening the
> base system restrictions, but it has always remained a goal, deferred
> until SELinux was more fully integrated and policy was more mature.
>
> The motivation for creating this patch now has been the flurry of
> interest/activity in file capabilities (currently a patch in -mm), which
> provide an alternative (and in our view inferior) way to achieve the
> same end - being able to grant capabilities to programs without them
> needing to be suid root. But the file capabilities approach lacks a
> centralized and analyzable policy, the flexibility and control of domain
> transitions for changes in capability state (vs. the hardcoded
> capability evolution logic), and the ability to protect and confine the
> processes that are given these capabilities.
The file capabilty mechanism has been through two CC evaluations
for which I have the certificates, so I think that you may have
trouble substantiating your claim that it lacks an analyzable policy.
> This patch as implemented makes the distinction very clear:
> allow ping_t self:capability net_raw; still means what it used to
> mean, and SELinux will only authoritatively grant the capability if you
> add a new cap_override rule to the policy, e.g.
> allow ping_t self:cap_override new_raw;
>
> Thus, by default (in the absence of new policy), nothing changes, and
> anyone can easily audit their policy to see whether and where they are
> granting capabilities authoritatively.
>
> Further, as the code uses the _noaudit interface to apply the
> cap_override check, these permissions will only be allowed by explicit
> choice of the administrator, not by automated policy generation tools
> like audit2allow. The use of the _noaudit interface was also motivated
> by the fact that this check must occur before the base capability check
> and would otherwise need to be pervasively dontaudit'd to avoid noise in
> the audit logs.
>
> At present, the patch clones the capability permissions into the
> cap_override class; I would have moved them to a common definition and
> inherited them into both but that would have prevented policy reload on
> existing kernels.
Well, I don't like it, but I do appreciate the fact that the
disintegration is explicit.
Do y'all plan to let the rest of the world know what you're up
to, or do you plan to present this as a feit accompli?
Casey Schaufler
casey@schaufler-ca.com
--
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.
next prev parent reply other threads:[~2007-06-12 15:09 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 19:55 [RFC][PATCH] selinux: enable authoritative granting of capabilities Stephen Smalley
2007-06-11 20:39 ` James Morris
2007-06-11 20:43 ` Serge E. Hallyn
2007-06-11 21:43 ` Casey Schaufler
2007-06-11 22:20 ` James Morris
2007-06-12 0:00 ` Casey Schaufler
2007-06-12 11:46 ` Stephen Smalley
2007-06-11 22:24 ` Serge E. Hallyn
2007-06-12 9:20 ` Russell Coker
2007-06-12 15:44 ` Serge E. Hallyn
2007-06-12 15:57 ` Stephen Smalley
2007-06-13 11:16 ` Russell Coker
2007-06-13 12:31 ` Stephen Smalley
2007-06-14 9:44 ` Russell Coker
2007-06-14 11:03 ` Stephen Smalley
2007-06-14 14:50 ` Stephen Smalley
2007-06-14 14:54 ` Joshua Brindle
2007-06-14 13:54 ` Casey Schaufler
2007-06-14 14:50 ` Joshua Brindle
2007-06-14 15:05 ` Stephen Smalley
2007-06-12 11:43 ` Stephen Smalley
2007-06-12 11:31 ` Stephen Smalley
2007-06-12 9:27 ` Russell Coker
2007-06-12 12:09 ` Stephen Smalley
2007-06-12 12:50 ` Stephen Smalley
2007-06-12 15:08 ` Casey Schaufler [this message]
2007-06-12 15:33 ` Stephen Smalley
2007-06-12 16:38 ` Casey Schaufler
2007-06-12 17:49 ` James Morris
2007-06-12 19:56 ` Casey Schaufler
2007-06-12 16:03 ` Serge E. Hallyn
2007-06-12 13:24 ` Stephen Smalley
2007-06-12 20:50 ` Stephen Smalley
2007-06-12 21:12 ` Stephen Smalley
2007-06-13 14:31 ` Stephen Smalley
2007-06-13 15:06 ` Christopher J. PeBenito
2007-06-13 15:28 ` Stephen Smalley
2007-06-13 18:46 ` Christopher J. PeBenito
2007-06-13 19:20 ` Stephen Smalley
2007-06-14 19:19 ` Christopher J. PeBenito
2007-06-15 11:50 ` Stephen Smalley
2007-06-13 19:10 ` Eric Paris
2007-06-13 19:22 ` Stephen Smalley
2007-06-13 19:50 ` Daniel J Walsh
2007-06-13 20:00 ` Stephen Smalley
2007-06-13 20:22 ` Daniel J Walsh
2007-06-12 13:32 ` Stephen Smalley
2007-06-14 15:40 ` Chad Sellers
2007-06-14 15:55 ` Stephen Smalley
2007-06-14 16:03 ` Stephen Smalley
2007-06-14 16:13 ` Karl MacMillan
2007-06-14 16:52 ` James Morris
2007-06-14 17:28 ` Chad Sellers
2007-06-14 17:35 ` James Morris
2007-06-14 17:43 ` Chad Sellers
2007-06-14 17:47 ` Stephen Smalley
2007-06-14 20:02 ` Casey Schaufler
2007-06-14 17:46 ` Stephen Smalley
2007-06-14 18:18 ` James Morris
2007-06-14 15:55 ` Karl MacMillan
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=749740.73121.qm@web36607.mail.mud.yahoo.com \
--to=casey@schaufler-ca.com \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=serue@us.ibm.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.