All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: selinux@tycho.nsa.gov
Subject: Re: [PATCH] SELINUX: new permission controlling the ability to set suid
Date: Mon, 26 Apr 2010 11:19:49 -0400	[thread overview]
Message-ID: <4BD5AF15.8000301@redhat.com> (raw)
In-Reply-To: <20100426143933.GU21894@myhost.felk.cvut.cz>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/26/2010 10:39 AM, Michal Svoboda wrote:
> Daniel J Walsh wrote:
>> First my example was sort of a gross oversimplification.  It would not
>> only effect unconfined_t but any other domain that could use the
>> setuid bit to gain additional privs.
> 
> If a domain can use uid=0 to get additional privileges then the MAC
> policy has holes... like cheese and relies on DAC to plumb them. That
> significantly reduces the utility of the MAC.
>
You have to look at this domain by domain, and the goal of users with
MAC is to "target" certain domains.  If we went full lock down on every
domain then we would not have > 70% of the fedora community running with
SELinux enabeled in enforcing mode.

>> unconfined_t to a user means, give him all the power of a normal user
>> with SELinux disabled.  You are still protected by DAC.  I would argue
>> that you want to make sure there are limited setuid apps around when
>> running with unconfined_t.  But if you give him unconfined_t and
>> "chcon 4755"  as a confined user running as root, then you make it
>> easy for him to become unconfined_t running as UID=0.
> 
> The problem with this reasoning is thus:
> 
> 1) you give the user unconfined_t, well, okay, sad but perhaps necessary
> 2) you give the user root
> 3) you wonder that the user has root & unconfined
> 
> I know that the root in (2) is 'bundled in' a MAC restricted domain but
> since root is a DAC concept it propagates ('leaks') back to the DAC
> world.
> 
> You now want the MAC to stop the leak, but IMO that is a futile attempt.
> It would take some serious analysis to find out how many ways 'root' can
> leak out. I bet suid is not the only one. How about screwing up the web
> server so that it runs as root and listens for your commands.
> 
We are building higher fences around the prison.  I am not going for the
perfect, since this is the enemy of the good.  We have lots of domains
that require DAC privs.  It is the combination of DAC and MAC that make
SELinux powerful.  Are goal is not to remove DAC checks in any way.
>> If we want people to experiment with confined admins, allow unconfined_t
>> - -> sudo_exec_t -> confined_admin_t is a good thing.
> 
> People can experiment with confined admins as they like, but they should
> note that as long as they have an unconfined element in the game the
> system simply won't be secure. Default allow has never worked.
> 
This is not default allow.  It is DAC + MAC as opposed to the way most
people run, which is just DAC. I am trying to make setattr check better.

DAC + sudo versus DAC + MAC + SUDO.
> Simply put I don't like this from systemic sense, but perhaps the demand
> is so high that you should go ahead (with a big fat red warning).
> 
> 
> Michal Svoboda
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkvVrxUACgkQrlYvE4MpobOxgACfX4LLT9tm0uhXE6uoTv1LuHRw
eTwAoNtDnyTC3O+XIIODLAF8dYE5AWei
=Kg4/
-----END PGP SIGNATURE-----

--
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-26 15:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22 20:46 [PATCH] SELINUX: new permission controlling the ability to set suid Eric Paris
2010-04-22 21:35 ` Stephen Smalley
2010-04-23 12:03   ` Daniel J Walsh
2010-04-23 13:51     ` Stephen Smalley
2010-04-26  6:18     ` Michal Svoboda
2010-04-26 12:52       ` Daniel J Walsh
2010-04-26 14:39         ` Michal Svoboda
2010-04-26 15:19           ` Daniel J Walsh [this message]
2010-04-28 14:32             ` Karl MacMillan
2010-04-28 15:39               ` Daniel J Walsh
2010-04-28 17:57                 ` Karl MacMillan
2010-04-28 18:07                   ` Stephen Smalley
2010-04-28 18:31                     ` Karl MacMillan
2010-04-28 18:41                       ` Daniel J Walsh
2010-04-28 18:45                       ` Stephen Smalley
2010-04-28 16:18             ` Michal Svoboda
2010-04-28 17:32               ` Daniel J Walsh
2010-04-28 18:54                 ` Michal Svoboda
2010-04-28 19:02                   ` Daniel J Walsh

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=4BD5AF15.8000301@redhat.com \
    --to=dwalsh@redhat.com \
    --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.