All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Michal Svoboda <michal.svoboda@agents.felk.cvut.cz>
Cc: "selinux@tycho.nsa.gov" <selinux@tycho.nsa.gov>
Subject: Re: Cannot not open session
Date: Tue, 13 Apr 2010 15:48:05 -0400	[thread overview]
Message-ID: <1271188085.9577.97.camel@moss-pluto.epoch.ncsc.mil> (raw)
In-Reply-To: <20100409125223.GV1518@myhost.felk.cvut.cz>

On Fri, 2010-04-09 at 14:52 +0200, Michal Svoboda wrote:
> Stephen Smalley wrote:
> > Early Fedora and RHEL-4 put pam_selinux in /etc/pam.d/su in an effort to
> > automatically change contexts upon user identity changes.  This proved
> > to be a mistake in practice (and a deviation from the original SELinux
> > approach), and was subsequently removed in later Fedora and RHEL-5.
> 
> BTW, is there any further explanation of why this is a mistake? And
> question #2, I think sudo still does this, isn't that a mistake too?

With the original (and current approach), su isn't especially trusted
with respect to SELinux, the set of reachable contexts within a login
session can be bounded with respect to the starting context, and you can
switch Linux uid while staying in the same SELinux context.  With
pam_selinux in /etc/pam.d/su, su becomes highly trusted with respect to
SELinux, any context can potentially be reached from any other context,
and you cannot switch Linux uid while staying in the same SELinux
context (at least via su).

The sudo SELinux support differs in that:
- by default (in the absence of command line options or sudoers
configuration), there is no context change, so we retain the ability to
sudo while staying in context, and
- sudo only supports switching role (and type), not SELinux user or
level, so reachable contexts remain bounded based on the SELinux user
and level is preserved, and the amount of trust extended to sudo is more
alike to that of newrole than to that of login.

-- 
Stephen Smalley
National Security Agency


--
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:[~2010-04-13 19:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-09 12:16 Cannot not open session Alan Rouse
2010-04-09 12:38 ` Stephen Smalley
2010-04-09 12:52   ` Michal Svoboda
2010-04-13 19:48     ` Stephen Smalley [this message]

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=1271188085.9577.97.camel@moss-pluto.epoch.ncsc.mil \
    --to=sds@tycho.nsa.gov \
    --cc=michal.svoboda@agents.felk.cvut.cz \
    --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.