All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Eamon Walsh <ewalsh@tycho.nsa.gov>,
	SE Linux <selinux@tycho.nsa.gov>, Steve Grubb <sgrubb@redhat.com>
Subject: Re: Permissive mode for xace is broken.
Date: Thu, 28 Feb 2008 14:00:24 -0500	[thread overview]
Message-ID: <47C704C8.2090602@redhat.com> (raw)
In-Reply-To: <1204224665.31790.179.camel@moss-spartans.epoch.ncsc.mil>

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

Stephen Smalley wrote:
> On Thu, 2008-02-28 at 13:48 -0500, Eamon Walsh wrote:
>> Stephen Smalley wrote:
>>> On Mon, 2008-02-25 at 20:12 -0500, Eamon Walsh wrote:
>>>   
>>>> Eamon Walsh wrote:
>>>>     
>>>>> The X object manager logs all avc's and status messages (including the 
>>>>> AVC netlink stuff) through the audit system using libaudit calls 
>>>>> (audit_log_user_avc_message, etc.)   I disavow all responsibility for 
>>>>> the messages once they enter libaudit
>>>>>       
>>>> It's being black-holed in rawhide.  To see for yourself, add the 
>>>> attached patch to the spec file and rebuild the xserver from SRPM.  It 
>>>> will tee the avc messages into /var/log/Xorg.0.log.
>>>>     
>>> Looking at the corresponding code in dbus, I see that dbus is calling
>>> both audit_log_user_avc_message() (if HAVE_LIBAUDIT) and
>>> vsyslog(LOG_INFO...) with the message.
>>>   
>> Should the X server do this also?  Why does it need to be logged twice?
>>
>>> Can you verify that the X server was able to create the audit socket
>>> successfully?
>>>   
>> Yes, because when I actually install the audit package, things started 
>> appearing in /var/log/audit/audit.log.  I did not have the audit package 
>> installed.  Why isn't it redirecting to /var/log/messages in this case?  
>> This is the behavior I was led to believe would happen, and this is what 
>> happens with kernel AVC's.
> 
> That's what I would expect, but I don't know.  Safest thing would seem
> to be to follow dbus' example.  The audit calls there are also
> conditionally compiled, so they can be entirely omitted on systems
> without libaudit, whereas the system logging is unconditional.
> 
>>> Things that could go wrong:
>>> - X server uses privilege bracketing (switching uids or capabilities)
>>> and lacks the necessary audit capabilities.
>>> - X server shuts down all descriptors _after_ you've opened the audit
>>> socket, thereby closing it down too.
>>> - Policy doesn't allow X server to write audit messages (requires
>>> audit_write capability and netlink_audit_socket perms).
>>>   
>>
dbus is not a setuid application so when it runs in userspace it does
not have the right to send an auditmessage.  When it gets a reload
policy, the user space dbus program sends the message to syslog.  I
don't think X needs to do this.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkfHBMgACgkQrlYvE4MpobOnBACgqabWxmdBqQfRbK9MJ8SxoB1U
h3kAoNMQRNLtcv6z7Jo8bBCDdxr8ab1R
=HuVz
-----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:[~2008-02-28 19:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-25 14:09 Permissive mode for xace is broken Daniel J Walsh
2008-02-25 14:12 ` Stephen Smalley
2008-02-25 14:24   ` Stephen Smalley
2008-02-25 14:48     ` Daniel J Walsh
2008-02-25 18:49       ` Stephen Smalley
2008-02-25 19:28         ` Daniel J Walsh
2008-02-25 20:12           ` Daniel J Walsh
2008-02-25 22:04             ` Eamon Walsh
2008-02-25 20:33           ` Eamon Walsh
2008-02-26  1:12             ` Eamon Walsh
2008-02-26 12:59               ` Stephen Smalley
2008-02-26 13:09                 ` Daniel J Walsh
2008-02-27  2:31                   ` Eamon Walsh
     [not found]                     ` <FD5B0C7C-60A9-46F4-8986-A8EB31BABDC8@nall.com>
2008-02-27  3:46                       ` Eamon Walsh
2008-02-28 18:48                 ` Eamon Walsh
2008-02-28 18:51                   ` Stephen Smalley
2008-02-28 19:00                     ` Daniel J Walsh [this message]
2008-02-28 21:17                     ` Steve Grubb
2008-02-28 21:34                       ` Daniel J Walsh
2008-02-29  1:58                       ` Eamon Walsh
2008-02-29  2:02                       ` Eamon Walsh
2008-03-17 20:11                         ` Steve Grubb
2008-03-20  3:56                           ` Eamon Walsh
2008-02-26 14:34               ` Daniel J Walsh
  -- strict thread matches above, loose matches on Subject: below --
2008-03-24 15:55 Steve G
2008-03-24 19:59 ` Stephen Smalley
2008-03-24 20:28   ` Steve Grubb
2008-03-27 20:08 ` Eamon 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=47C704C8.2090602@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=ewalsh@tycho.nsa.gov \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=sgrubb@redhat.com \
    /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.