All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: Stephen Smalley <sds@tycho.nsa.gov>,
	"Serge E. Hallyn" <serue@us.ibm.com>
Cc: James Morris <jmorris@namei.org>,
	selinux@tycho.nsa.gov, Eric Paris <eparis@parisplace.org>
Subject: Re: [RFC][PATCH] selinux:  support 64-bit capabilities
Date: Thu, 7 Feb 2008 08:14:41 -0800 (PST)	[thread overview]
Message-ID: <863373.64505.qm@web36615.mail.mud.yahoo.com> (raw)
In-Reply-To: <1202397357.27371.246.camel@moss-spartans.epoch.ncsc.mil>


--- Stephen Smalley <sds@tycho.nsa.gov> wrote:

> 
> On Thu, 2008-02-07 at 08:03 -0600, Serge E. Hallyn wrote:
> > Quoting Stephen Smalley (sds@tycho.nsa.gov):
> > > 
> > > On Thu, 2008-02-07 at 11:04 +1100, James Morris wrote:
> > > > On Wed, 6 Feb 2008, Stephen Smalley wrote:
> > > > 
> > > > > 
> > > > > > +	switch (CAP_TO_INDEX(cap)) {
> > > > > > +	case 0:
> > > > > > +		sclass = SECCLASS_CAPABILITY;
> > > > > > +		break;
> > > > > > +	case 1:
> > > > > > +		sclass = SECCLASS_CAPABILITY2;
> > > > > > +		break;
> > > > > > +	default:
> > > > > > +		return -EPERM;
> > > > > 
> > > > > Should likely make this something like:
> > > > > 	printk(KERN_WARNING "SELinux:  unknown capability %d\n", cap);
> > > > > 	if (selinux_enforcing)
> > > > > 		return -EPERM;
> > > > > 	else
> > > > > 		return 0;
> > > > > 
> > > > > Then, if/when people introduce capabilities without updating SELinux,
> > > > > we'll get a warning but permissive mode will allow the operation to
> > > > > proceed.
> > > > 
> > > > Agreed, perhaps also suggest upgrading policy in the message.
> > > 
> > > Policy upgrade won't help in that case - it requires code changes to
> > > allow SELinux to deal with higher capabilities beyond its supported
> > > range (the printk here is in the default: case, where we've gone beyond
> > > CAP_INDEX() of 0 or 1, i.e. capability value >= 64).
> > > 
> > > Alternatively, possibly we could cause a build failure in some way if
> > > CAP_INDEX(CAP_LAST_CAP) > 1, and make the default case a BUG().
> > 
> > That sounds good.  And maybe add a comment near CAP_LAST_CAP pointing
> > out that it's only responsible for any new caps to be added to
> > security/selinux/include/av_perm_to_string.h
> 
> Well, I think we'd just insert a polite request there to send an email
> to the SELinux maintainers and/or the entire LSM list to notify all LSM
> maintainers that they need to deal with a new capability.

That wouldn't be a bad idea, maybe put something in Documentation, too.

> We don't
> really want people directly patching the generated headers though - we
> need to keep them in sync with policy (and avoid the Fedora fiasco with
> taking permissions that never got reserved upstream in policy).

Yes, patching generated headers is a bad idea.


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.

  reply	other threads:[~2008-02-07 16:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06 16:22 [RFC][PATCH] selinux: support 64-bit capabilities Stephen Smalley
2008-02-06 17:15 ` Serge E. Hallyn
2008-02-06 18:28 ` Stephen Smalley
2008-02-07  0:04   ` James Morris
2008-02-07 13:53     ` Stephen Smalley
2008-02-07 14:03       ` Serge E. Hallyn
2008-02-07 15:15         ` Stephen Smalley
2008-02-07 16:14           ` Casey Schaufler [this message]
2008-02-07  0:52   ` Joshua Brindle
2008-02-07 13:55     ` Stephen Smalley
2008-02-07  6:22   ` James Morris

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=863373.64505.qm@web36615.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.