selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris PeBenito <pebenito@ieee.org>
To: "Sugar, David" <dsugar@tresys.com>,
	"selinux-refpolicy@vger.kernel.org" 
	<selinux-refpolicy@vger.kernel.org>
Subject: Re: [PATCH] New interface to dontaudit access to cert_t
Date: Sat, 16 Feb 2019 14:40:38 -0500	[thread overview]
Message-ID: <4563f4e3-7525-f19c-55a6-45caca5786f7@ieee.org> (raw)
In-Reply-To: <e74efb79-5354-a997-cce1-c82b82b2c699@tresys.com>

On 2/14/19 8:56 AM, Sugar, David wrote:
> 
> 
> On 2/13/19 6:42 PM, Chris PeBenito wrote:
>> On 2/12/19 8:05 AM, Sugar, David wrote:
>>> I'm seeing a bunch of denials for various processes (some refpolicy
>>> domains, some my own application domains) attempting to access
>>> /etc/pki.  They seem to be working OK even with the denial.  Adding
>>> interface to dontaudit this stuff and calling the interface.
>>>
>>> type=AVC msg=audit(1549932300.668:266): avc:  denied  { search } for
>>> pid=7077 comm="X" name="pki" dev="dm-1" ino=138
>>> scontext=system_u:system_r:xserver_t:s0-s0:c0.c1023
>>> tcontext=system_u:object_r:cert_t:s0 tclass=dir permissive=0
>>> type=AVC msg=audit(1549932306.553:430): avc:  denied  { search } for
>>> pid=7345 comm="clamd" name="pki" dev="dm-1" ino=138
>>> scontext=system_u:system_r:clamd_t:s0:c1
>>> tcontext=system_u:object_r:cert_t:s0 tclass=dir permissive=0
>>
>> My guess is there is some common library between them (maybe glibc)
>> which is triggering this.  It seems like this might potentially cover up
>> legitimate access.  It's just hard to tell by just dir searches.
>>
> 
> Digging into this I have found a few things, and please note that I am
> not seeing this denial in permissive.
> 
> Looking at strace for clamd I see an attempt to open the (non-existent)
> file /etc/pki/tls/legacy-settings.  I think this would explain the
> denial on dir search.
> 
> If I create that file (even empty) labeled cert_t I see denials (in
> permissive) for clamd_t cert_t:file { getattr open read }.
> 
> audit2allow suggests the boolean 'authlogin_nsswitch_use_ldap' should
> resolve the issue (for clamd_t).  This makes sense as clamd uses the
> interface auth_use_nsswitch(clamd_t).
> 
> So, assuming that I don't want to enable 'authlogin_nsswitch_use_ldap'
> is there a way to quiet this denial?

The dontaudit could go in the else block for that tunable.

-- 
Chris PeBenito

  reply	other threads:[~2019-02-16 19:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 13:05 [PATCH] New interface to dontaudit access to cert_t Sugar, David
2019-02-13 23:42 ` Chris PeBenito
2019-02-14 13:56   ` Sugar, David
2019-02-16 19:40     ` Chris PeBenito [this message]
2019-02-17 16:34       ` Sugar, David
2019-02-20  3:33         ` Chris PeBenito

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=4563f4e3-7525-f19c-55a6-45caca5786f7@ieee.org \
    --to=pebenito@ieee.org \
    --cc=dsugar@tresys.com \
    --cc=selinux-refpolicy@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).