Bug 969533

Summary: SELinux is preventing /usr/bin/xauth from 'remove_name' accesses on the directory xauth-1000-_0-c.
Product: [Fedora] Fedora Reporter: Christian <christian>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: christian, dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:f72e1afd8fefdefa9fe58ff42efd67871717dc1d00639993e0f0a8b12e404d04
Fixed In Version: selinux-policy-3.11.1-98.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-25 00:38:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christian 2013-05-31 17:50:54 UTC
Description of problem:
This happens every time I log into my KDE session. I've tried to follow the instructions for whitelisting this problem, but they fail:

libsepol.context_from_record: type amanda_unit_file_t is not defined
libsepol.context_from_record: could not create context structure
libsepol.context_from_string: could not create context structure
libsepol.sepol_context_to_sid: could not convert system_u:object_r:amanda_unit_file_t:s0 to sid
invalid context system_u:object_r:amanda_unit_file_t:s0
libsemanage.semanage_install_active: setfiles returned error code 1.
semodule:  Failed!

I've now disabled SELinux completely ... what a usability nightmare.
SELinux is preventing /usr/bin/xauth from 'remove_name' accesses on the directory xauth-1000-_0-c.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that xauth should be allowed remove_name access on the xauth-1000-_0-c directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep xauth /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:xauth_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:config_home_t:s0
Target Objects                xauth-1000-_0-c [ dir ]
Source                        xauth
Source Path                   /usr/bin/xauth
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           xorg-x11-xauth-1.0.7-2.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-96.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.4-200.fc18.x86_64 #1 SMP Fri
                              May 24 20:10:49 UTC 2013 x86_64 x86_64
Alert Count                   14
First Seen                    2013-05-27 16:09:39 PDT
Last Seen                     2013-05-31 10:45:50 PDT
Local ID                      ed58af5c-6d19-4d65-9012-814e69f3031e

Raw Audit Messages
type=AVC msg=audit(1370022350.274:320): avc:  denied  { remove_name } for  pid=2895 comm="xauth" name="xauth-1000-_0-c" dev="dm-3" ino=9437250 scontext=unconfined_u:unconfined_r:xauth_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:config_home_t:s0 tclass=dir


type=AVC msg=audit(1370022350.274:320): avc:  denied  { unlink } for  pid=2895 comm="xauth" name="xauth-1000-_0-c" dev="dm-3" ino=9437250 scontext=unconfined_u:unconfined_r:xauth_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:config_home_t:s0 tclass=file


type=SYSCALL msg=audit(1370022350.274:320): arch=x86_64 syscall=unlink success=yes exit=0 a0=7fffea067360 a1=108d010 a2=7fffea067770 a3=3266346433613833 items=0 ppid=2889 pid=2895 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=1 tty=pts6 comm=xauth exe=/usr/bin/xauth subj=unconfined_u:unconfined_r:xauth_t:s0-s0:c0.c1023 key=(null)

Hash: xauth,xauth_t,config_home_t,dir,remove_name

audit2allow

#============= xauth_t ==============
allow xauth_t config_home_t:dir remove_name;
allow xauth_t config_home_t:file unlink;

audit2allow -R
require {
	type xauth_t;
}

#============= xauth_t ==============
gnome_delete_home_config(xauth_t)
gnome_delete_home_config_dirs(xauth_t)


Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.4-200.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-06-04 12:53:46 UTC
Please could you try to execute

# yum reinstall selinux-policy-targeted 

to see if it blows up.

Comment 2 Christian 2013-06-05 04:17:43 UTC
Hi there ... are you referring to the package installation, or the subsequent SELinux behavior? Fwiw, the RPM installed fine.

Comment 3 Miroslav Grepl 2013-06-14 06:05:46 UTC
A fix has been added.

Comment 4 Fedora Update System 2013-06-27 13:34:41 UTC
selinux-policy-3.11.1-98.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-98.fc18

Comment 5 Fedora Update System 2013-06-28 06:08:56 UTC
Package selinux-policy-3.11.1-98.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-98.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11859/selinux-policy-3.11.1-98.fc18
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-07-25 00:38:43 UTC
selinux-policy-3.11.1-98.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.