From: Joshua Brindle <method@manicmethod.com>
To: Chad Sellers <csellers@tresys.com>
Cc: Eric Paris <eparis@redhat.com>,
Stephen Smalley <sds@tycho.nsa.gov>,
selinux@tycho.nsa.gov, James Morris <jmorris@namei.org>,
Eric Paris <eparis@parisplace.org>,
Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: access(2) vs. SELinux
Date: Mon, 20 Apr 2009 10:35:45 -0400 [thread overview]
Message-ID: <49EC8841.7050305@manicmethod.com> (raw)
In-Reply-To: <C60D0537.A684E%csellers@tresys.com>
Chad Sellers wrote:
> On 4/16/09 2:10 PM, "Eric Paris" <eparis@redhat.com> wrote:
>> He's some concerns/thoughts.
>>
>> domain_t calls access(W_OK) on file_t.
>>
>> This generates a denial
>>
>> denied { access_write } scontext=domain_t tcontext=file_t tclass=file
>>
>> Which audit2allow will gladly turn into:
>>
>> allow domain_t file_t:file { access_write }
>>
>> Load that module and then, POP the next time
>>
>> denied { write } scontext=domain_t tcontext=file_t tclass=file
>>
>> So somewhere we need some sort of synchronization.
>>
>> ---
>>
>> I suggested to Dan that audit2allow should should, given the above
>> access_write denial output:
>> allow domain_t file_t:file { write }
>>
>> and the tool chain just automatically maps all write rule to both allow
>> bits for BOTH write and access_write.
>>
>> ---
>>
>> We could also have the tool chain just run in both directions and leave
>> audit2allow alone. Any rule with access_write would cause the tool
>> chain to add write and any rule with write would cause us to add
>> access_write.
>>
>>> From the point of view of policy analysis I think think that makes
>> things worse. Now the access_write rule really means something. That's
>> fine with me, but I have a feeling the people who care about policy
>> analysis might not like that idea.....
>>
> I think these issues point to how inelegant this solution is. Relying on the
> toolchain to special case this and modify all results is going to be
> painful. Another example of this comes up when applying analysis tools to
> the policy. SETools will now show rules in a binary policy that can only be
> traced back to the source policy if you understand how the compiler mangling
> works. Managed policy has allowed us to decrease the amount of policy
> mangling we do, and this strategy seems to be going the other direction.
>
> I'd like to put in a vote for having access call the _noaudit interface to
> suppress the audit record. I agree with Alexey though that it would need to
> have something in /selinux to toggle this on/off. Then, when debugging a
> policy and not getting denials, you'd throw this switch when to the point of
> disabling dontaudits. We could even have semodule -D toggle this as well, if
> we really want to bake this into the toolchain somewhere. As far as probing
> attacks go, systems with more stringent security requirements that want to
> see all possible probing attacks could turn this flag on all the time.
>
>
I agree with this, Eric's description of what needs to happen above makes me
cringe. There is very limited utility to having 2 parallel sets of permissions
that need to be synchronized by the toolchain and quite a bit of potential pain.
One example of horrific pain would be if both the access_write and write rules
were present in policy, and someone wanted to remove the write access. They do
the necessary searching and find where write is granted, remove it and viola -
nothing happens, write access is still granted. Very confusing, I could see even
experienced policy writers getting bitten by this enough to curse the day these
permissions were added.
--
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.
next prev parent reply other threads:[~2009-04-20 14:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-15 15:51 access(2) vs. SELinux Stephen Smalley
2009-04-15 16:41 ` Eric Paris
2009-04-15 20:13 ` Stephen Smalley
2009-04-16 17:08 ` Stephen Smalley
2009-04-16 18:10 ` Eric Paris
2009-04-16 19:54 ` Chad Sellers
2009-04-20 14:35 ` Joshua Brindle [this message]
2009-04-20 15:11 ` Eric Paris
2009-04-20 15:30 ` Joshua Brindle
2009-04-20 17:21 ` Eric Paris
2009-04-20 17:35 ` Chad Sellers
2009-04-20 18:11 ` [RFC PATCH] " Eric Paris
2009-04-20 19:41 ` Stephen Smalley
2009-04-20 22:24 ` Eric Paris
2009-04-21 0:57 ` Eric Paris
2009-04-20 18:55 ` James Carter
2009-04-20 19:08 ` Eric Paris
2009-04-20 19:28 ` James Carter
2009-04-20 19:49 ` Eric Paris
2009-04-20 20:41 ` James Carter
2009-04-22 11:31 ` selinux
2009-04-22 12:41 ` Alexey S
2009-04-16 6:46 ` Alexey S
2009-04-16 12:51 ` 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=49EC8841.7050305@manicmethod.com \
--to=method@manicmethod.com \
--cc=csellers@tresys.com \
--cc=dwalsh@redhat.com \
--cc=eparis@parisplace.org \
--cc=eparis@redhat.com \
--cc=jmorris@namei.org \
--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.