Bug 590765 - SELinux is preventing /usr/bin/xauth "open" access on .Xauthority.
Summary: SELinux is preventing /usr/bin/xauth "open" access on .Xauthority.
Alias: None
Product: Fedora
Classification: Fedora
Component: kdebase
Version: 12
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:e7eb1749868...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-10 16:13 UTC by Daniel Scott
Modified: 2010-12-03 14:51 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-12-03 14:51:20 UTC
Type: ---

Attachments (Terms of Use)

Description Daniel Scott 2010-05-10 16:13:41 UTC

SELinux is preventing /usr/bin/xauth "open" access on .Xauthority.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by xauth. It is not expected that this access is
required by xauth and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug

Additional Information:

Source Context                unconfined_u:unconfined_r:xauth_t:s0-s0:c0.c1023
Target Context                system_u:object_r:xdm_home_t:s0
Target Objects                .Xauthority [ file ]
Source                        xauth
Source Path                   /usr/bin/xauth
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           xorg-x11-xauth-1.0.2-7.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-113.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) #1
                              SMP Mon Apr 5 19:59:38 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Mon 10 May 2010 11:58:36 AM EDT
Last Seen                     Mon 10 May 2010 11:58:36 AM EDT
Local ID                      e7767081-7317-4f05-be91-63c56517fc53
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1273507116.465:5392): avc:  denied  { open } for  pid=17597 comm="xauth" name=".Xauthority" dev=dm-0 ino=134514 scontext=unconfined_u:unconfined_r:xauth_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xdm_home_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1273507116.465:5392): arch=c000003e syscall=2 success=yes exit=3 a0=105d010 a1=0 a2=1b6 a3=0 items=0 ppid=17596 pid=17597 auid=720 uid=720 gid=1100 euid=720 suid=720 fsuid=720 egid=1100 sgid=1100 fsgid=1100 tty=pts7 ses=713 comm="xauth" exe="/usr/bin/xauth" subj=unconfined_u:unconfined_r:xauth_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  catchall,xauth,xauth_t,xdm_home_t,file,open
audit2allow suggests:

#============= xauth_t ==============
allow xauth_t xdm_home_t:file open;

Comment 1 Daniel Walsh 2010-05-10 16:41:36 UTC
Are you running kdm?

Comment 2 Daniel Scott 2010-05-10 16:45:44 UTC

djscott@pc35:~$ ps -ef|grep kdm
root       588     2  0 Apr12 ?        00:03:15 [kdmflush]
root       592     2  0 Apr12 ?        00:00:26 [kdmflush]
root       596     2  0 Apr12 ?        00:00:00 [kdmflush]
root      2769     1  0 Apr12 ?        00:00:00 /usr/bin/kdm -nodaemon
root     17913  2769  4 12:06 tty7     00:01:44 /usr/bin/X -nr -nolisten tcp :0 vt7 -auth /var/run/kdm/A:0-lYN4v7
djscott  19772 18238  0 12:45 pts/2    00:00:00 grep --color=auto kdm

Comment 3 Daniel Walsh 2010-05-10 18:31:22 UTC
restorecon .Xauthority 

Will fix.

kdm should be creating the Xauthority file in a different location like gdm does.

Comment 4 Paul Johnson 2010-06-29 21:06:56 UTC
I don't use xdm. I use gdm and I also have sshd running.

When users try to log in with ssh -X, ssh tries to create ~/.Xauthority as well, and SELinux fights with it.  If gdm/kde aren't supposed to write in ~/, it seems to me that the ssh server should not do that either.



Comment 5 Daniel Walsh 2010-07-13 13:29:48 UTC
Seems like a legitimate argument could be made.  What does sshd label the .Xauthority file as?

Comment 6 Bug Zapper 2010-11-03 15:10:59 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 7 Bug Zapper 2010-12-03 14:51:20 UTC
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.