All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert Cahalan <albert@users.sourceforge.net>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: Albert Cahalan <albert@users.sourceforge.net>, SELinux@tycho.nsa.gov
Subject: Re: threads
Date: 20 Jan 2004 20:11:15 -0500	[thread overview]
Message-ID: <1074647474.953.40407.camel@cube> (raw)
In-Reply-To: <1072712224.845.66.camel@moss-spartans.epoch.ncsc.mil>

On Mon, 2003-12-29 at 10:37, Stephen Smalley wrote:
> On Fri, 2003-12-26 at 10:54, Albert Cahalan wrote:
> > Normal Linux security data (uid, capability bits)
> > is per-thread. There are at least two reasons for
> > this:
> > 
> > 1. Multi-threaded server daemons can rely on
> >    kernel-enforced security.
> > 
> > 2. Race conditions are eliminated without locking.
> >    This deals with the problem of two threads
> >    simultaneously updating the security data, or
> >    one thread updating while another thread uses.
> > 
> > I'm told that SE Linux enforces shared security
> > data. I suppose this is mostly required when
> > implementing a mandatory system. Is this race-free?
> > Is there a capability that would allow a suitably
> > privileged process to have per-thread contexts?
> 
> For MAC, per-thread contexts make little sense
> since you cannot enforce any separation of the memory.

This is not quite right. A server daemon using
per-thread contexts is clearly within your trusted
computing base, just as the kernel is. This can
improve security over the obvious alternative of
having the server run in a context that can do
anything.

> > Also, I'm told that a security context can only
> > change during exec. WHAT???? Besides the case of
> > a suitably privileged process, what about the
> > need to move some sort of watermark? AFAIK, your
> > security context needs to be tainted when you
> > read low-integrity data and so on.
> 
> Limiting security context transitions to execve allows the inheritance
> of state between the contexts and the initialization of the process in
> the new security context to be precisely controlled, including the
> particular entrypoint program used to enter the new context. A
> setuid(2)-like call for contexts would lack such controls and would
> provide no real separation between the two contexts. Introducing such an
> operation into the system would yield two different sets of controls and
> behaviors for context transitions.
> The omission of such an operation from SELinux was noted in the original
> design documentation, and has been discussed on the list before.

I was assuming you wouldn't hand out such
privilige willy-nilly.


> With regard to "tainting", you are thinking about it the wrong way.  A
> high integrity process shouldn't be allowed to read low integrity data
> (if that is your security goal), not magically migrated to a low
> integrity label upon performing such a read.

Isn't this the way LOMAC works?



--
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:[~2004-01-21  1:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-26 15:54 threads Albert Cahalan
2003-12-29 15:37 ` threads Stephen Smalley
2004-01-21  1:11   ` Albert Cahalan [this message]
2004-01-21  5:09     ` threads Russell Coker
2004-01-21 13:47     ` threads Stephen Smalley
  -- strict thread matches above, loose matches on Subject: below --
2005-11-06  6:17 threads Fabio Andres Miranda
2005-11-06  8:41 ` threads Steve Graegert
2001-03-06 23:55 Ying Chen
2001-03-07  0:07 ` threads J . A . Magallon
2000-11-10 15:03 threads M.Kiran Babu
2000-11-10 15:39 ` threads Matti Aarnio
2000-11-10 16:05 ` threads Reto Baettig

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=1074647474.953.40407.camel@cube \
    --to=albert@users.sourceforge.net \
    --cc=SELinux@tycho.nsa.gov \
    --cc=sds@epoch.ncsc.mil \
    /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.