All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Karl MacMillan <kmacmillan@mentalrootkit.com>
Cc: James Morris <jmorris@namei.org>, SE Linux <selinux@tycho.nsa.gov>
Subject: Re: Per Domain Permissive Mode
Date: Tue, 19 Jun 2007 12:11:36 -0400	[thread overview]
Message-ID: <46780038.9040208@redhat.com> (raw)
In-Reply-To: <1182267849.21615.103.camel@localhost.localdomain>

Karl MacMillan wrote:
> On Tue, 2007-06-19 at 11:19 -0400, James Morris wrote:
>   
>> On Tue, 19 Jun 2007, James Morris wrote:
>>
>>     
>>> On Tue, 19 Jun 2007, Daniel J Walsh wrote:
>>>
>>>       
>>>> Thoughts...
>>>>         
>>> We can do this in policy: define a domain which runs with all accessess 
>>> allowed, and also optionally logged for profiling purposes.
>>>       
>> Actually, this is not entirely useful for development -- perhaps some kind 
>> of abstraction can be used to hide all of the allow rules, so it just 
>> appears to the policy developer that the domain is in permissive mode.
>>
>>     
>
> The complicated bit is actually the auditallow rules to get similar
> auditing to permissive. We only want to add auditallow rules for the
> extra access allowed to make the domain unconfined not for all access
> allowed by the domain. That basically means parsing the module, figuring
> out what was allowed, and adding auditallow for the difference between
> that access and unconfined.
>
> Sepolgen is almost at a point it can do this. Slide, as far as I know,
> doesn't parse the access in sufficient detail to do this yet.
>
> One downside to this approach is teaching policy generation tools to
> generate access for granted messages in the log. It also makes explicit
> auditallow somewhat useless.
>
> Karl
>
>   
One interesting twist would be if dontaudit rules were enforced.  For 
example when an app uses pam, it attempts to read/write /etc/shadow.
Most apps have this dontaudited so a different code path gets walked 
within pam.  If we just run the app totally in permissive mode, the app
will not hit this code path, until it gets out in the wild in enforcing 
mode.


So the algorithm should be something like the following

newallowrules = unconfined_domain - ( allowrules + dontauditrules )

permissiveconfineddomain = newallowrules + allowrules + dontauditrules + 
{ auditallow newallowrules }


--
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:[~2007-06-19 16:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19 14:55 Per Domain Permissive Mode Daniel J Walsh
2007-06-19 15:13 ` Joshua Brindle
2007-06-19 15:17 ` James Morris
2007-06-19 15:19   ` James Morris
2007-06-19 15:44     ` Karl MacMillan
2007-06-19 16:11       ` Daniel J Walsh [this message]
2007-06-20 11:43       ` Stephen Smalley
2007-06-20 11:48         ` James Morris
2007-06-20 13:09           ` Stephen Smalley

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=46780038.9040208@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=jmorris@namei.org \
    --cc=kmacmillan@mentalrootkit.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.