All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Eric Paris <eparis@redhat.com>,
	Daniel J Walsh <dwalsh@redhat.com>,
	selinux@tycho.nsa.gov
Subject: Re: concept of a permissive domain
Date: Mon, 24 Sep 2007 10:59:02 -0400	[thread overview]
Message-ID: <1190645942.4732.30.camel@localhost.localdomain> (raw)
In-Reply-To: <1190147094.14037.135.camel@moss-spartans.epoch.ncsc.mil>

On Tue, 2007-09-18 at 16:24 -0400, Stephen Smalley wrote:
> On Thu, 2007-09-13 at 16:16 -0400, Eric Paris wrote:
> > On Thu, 2007-09-13 at 15:38 -0400, Stephen Smalley wrote:
> > > On Thu, 2007-09-13 at 15:25 -0400, Daniel J Walsh wrote:

[...]

> > We need denial rules, we just don't have to call them that.  We just
> > need to define how dontaudit and auditallow rules work in this new type
> > of domain.  Then decide if that somehow interferes if the domain is not
> > a permissive domain.  Aside from Karl's little flub, noone is arguing we
> > should change anything having to do with enforcing=0 or enforcing=1 and
> > a non-permissive-domain.  We don't need to rewrite how dontaudit rules
> > affect enforcing domains or non-enforcing-systems, we just need an
> > extended definition for permissive domains.  Seems dontaudit and
> > auditallow can work very nicely to solve real practical problems
> > constraining large applications in environments which may not be friends
> > to problems introduced by SELinux.  Everyone agrees running an
> > application and just allowing whatever it asks for isn't the best way to
> > write policy, but when it's all you have, and all you are going to
> > reasonably have I'm not hearing a argument why we can't do what Dan
> > wants, other than 'that's not what it means today.'
> > 
> > dontaudit as an 'implicit denial in permissive domains' isn't what we
> > have today, but then again, we don't have permissive domains today.
> 
> I think we need to be careful that we aren't making SELinux harder to
> understand.  You are introducing a new construct that doesn't correspond
> precisely with either "unconfined" domains under enforcing mode or all
> domains under permissive mode today, and then you'll have to explain to
> users how they each differ and how to use them in a coherent way.


I understand the concern, but I think that the concept is pretty simple
to understand. What is harder is the subtle operational differences.

>   Maybe
> it would be useful to talk again about why we can't go with the "make
> the domain unconfined in policy and use auditallow" approach.  There is
> the log-once aspect of permissive mode, but possibly that could be made
> selectable for domains, and there is the difference in the log messages
> (granted vs. denied), but the tools can certainly deal with that.
> 

To get a tool to do this you would essentially need to work on the final
policy. It would:

1. Determine the set of all possible access (which requires the ability
to enumerate all classes/perms and types).

2. Determine the set of access explicitly allowed for the permissive
domain.

3. Take the difference of those sets and insert auditallow rules for
that access.

Note that this would be different that unconfined because it would
likely allow all perms for all object classes for all types.
Alternatively we could try to determine what access an unconfined domain
is granted and use that set instead. The main problem is that access is
only available in the preprocessed policy (e.g., to sepolgen), while
this tool really needs to operate on the final, expanded policy.

The downsides of this approach:

1) Lots of additional rules.
2) The tool will be somewhat painful to write - not clear who will do
that.
3) Correctness seems harder to achieve versus the kernel route to me.
4) Absent a way to generate single denial rules via policy, we will also
have to change sepolgen to use granted rules. This will end up exposed
to the user (they will have to ask for it) and it means that we can't
use auditallow rules for these domains in general.

> Also, one other thing to keep in mind for the permissive domain concept
> is that permission checks don't always fall neatly into the domain-type
> form and that domains tend to flow to related objects (sockets, packets,
> proc inodes, etc), so it is possibly insufficient and/or unsafe to
> determine whether to apply permissive mode on the source context in all
> cases.  Requires some investigation of all of the checks today.
> 

Yeah - that's going to be tricky. The tool would have the same problem -
it would have to generate some rules with the domain as target.

Karl


--
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.

  parent reply	other threads:[~2007-09-24 14:59 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-11 19:13 concept of a permissive domain Eric Paris
2007-09-11 20:31 ` Daniel J Walsh
2007-09-11 21:26   ` Karl MacMillan
2007-09-11 21:47     ` Eric Paris
2007-09-12 13:27       ` Karl MacMillan
2007-09-12 13:57         ` Daniel J Walsh
2007-09-13 14:08     ` Stephen Smalley
2007-09-13 14:46       ` Karl MacMillan
2007-09-13 14:57         ` Stephen Smalley
2007-09-13 15:25           ` Karl MacMillan
2007-09-13 19:25           ` Daniel J Walsh
2007-09-13 19:38             ` Stephen Smalley
2007-09-13 20:16               ` Eric Paris
2007-09-18 20:24                 ` Stephen Smalley
2007-09-18 20:50                   ` Joshua Brindle
2007-09-18 21:54                   ` Chad Sellers
2007-09-19 12:56                     ` Daniel J Walsh
2007-09-19 14:22                       ` Chad Sellers
2007-10-12 13:50                       ` Daniel J Walsh
2007-10-12 17:49                         ` Joshua Brindle
2007-10-12 18:07                           ` Eric Paris
2007-10-12 19:03                             ` Karl MacMillan
2007-10-12 19:09                               ` Stephen Smalley
2007-10-12 18:40                         ` Chad Sellers
2007-10-12 19:05                           ` Karl MacMillan
2007-10-12 20:43                             ` Chad Sellers
2007-10-12 21:01                               ` Stephen Smalley
2007-10-12 21:21                               ` Karl MacMillan
2007-10-12 23:38                                 ` Chad Sellers
2007-10-13 13:38                                   ` Daniel J Walsh
2007-10-14 10:14                                     ` Stefan Schulze Frielinghaus
2007-10-15 12:40                                       ` Daniel J Walsh
2007-10-15 16:52                                         ` Brett Lentz
2007-10-15 16:58                                           ` Stephen Smalley
2007-10-15 18:32                                             ` Daniel J Walsh
2007-10-15 18:40                                               ` Stephen Smalley
2007-10-15 18:57                                                 ` Karl MacMillan
2007-10-15 19:09                                                 ` Eric Paris
2007-10-17 19:47                                                   ` Stephen Smalley
2007-10-17 21:50                                                     ` Recurring SELinux events for similar violations Hasan Rezaul-CHR010
2007-10-17 22:18                                                       ` Eric Paris
2007-10-17 22:22                                                         ` Hasan Rezaul-CHR010
2007-10-18 13:13                                                           ` Stephen Smalley
2007-10-18 14:32                                                             ` Hasan Rezaul-CHR010
2007-11-29 20:06                                                             ` Hasan Rezaul-CHR010
2007-11-29 20:16                                                               ` Stephen Smalley
2007-11-29 21:26                                                                 ` Hasan Rezaul-CHR010
2007-11-29 21:32                                                                   ` Stephen Smalley
2007-11-29 21:45                                                                     ` Stephen Smalley
2007-10-15 17:26                                           ` concept of a permissive domain Chad Sellers
2007-10-12 19:07                           ` Stephen Smalley
2007-10-12 19:30                             ` Stephen Smalley
2007-09-19 16:35                     ` Martin Orr
2007-09-19 16:41                       ` Eric Paris
2007-09-20 14:41                         ` Joshua Brindle
2007-09-20 14:46                           ` Joshua Brindle
2007-09-19 16:52                       ` Stephen Smalley
2007-09-24 14:59                   ` Karl MacMillan [this message]
2007-09-13 20:25               ` Karl MacMillan
2007-09-14 14:15               ` James Carter
2007-09-14 14:45                 ` Joshua Brindle
2007-09-14 15:15                   ` Karl MacMillan
2007-09-11 22:57 ` Joshua Brindle
2007-09-12 13:26   ` Karl MacMillan
2007-09-13 13:11 ` Stephen Smalley
2007-09-13 13:19   ` Karl MacMillan
2007-09-13 13:25     ` Stephen Smalley
2007-09-13 13:59       ` Eric Paris
2007-09-13 14:23         ` Stephen Smalley
2007-09-13 14:36           ` Stephen Smalley
2007-09-13 14:42           ` 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=1190645942.4732.30.camel@localhost.localdomain \
    --to=kmacmillan@mentalrootkit.com \
    --cc=dwalsh@redhat.com \
    --cc=eparis@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --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.