Bug 652692

Summary: SELinux is preventing /usr/sbin/lxdm-binary "unlink" access on /var/run/lxdm/lxdm.sock.
Product: [Fedora] Fedora Reporter: Erwan Legrand <redhat>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:0bf4ef41b187bdf98220fa0facf4321f164da433e7e6af76c1752f0b5965a30b
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-27 14:14:00 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 Erwan Legrand 2010-11-12 14:57:06 UTC
Summary:

SELinux is preventing /usr/sbin/lxdm-binary "unlink" access on
/var/run/lxdm/lxdm.sock.

Detailed Description:

SELinux denied access requested by lxdm-binary. It is not expected that this
access is required by lxdm-binary 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
report.

Additional Information:

Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_run_t:s0
Target Objects                /var/run/lxdm/lxdm.sock [ sock_file ]
Source                        lxdm-binary
Source Path                   /usr/sbin/lxdm-binary
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           lxdm-0.3.0-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-10.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux erwan-desktop 2.6.35.6-48.fc14.x86_64 #1 SMP
                              Fri Oct 22 15:36:08 UTC 2010 x86_64 x86_64
Alert Count                   10
First Seen                    Fri 12 Nov 2010 11:04:34 AM CET
Last Seen                     Fri 12 Nov 2010 11:04:35 AM CET
Local ID                      9bd9c259-01d0-4af3-a76f-8a145acb5df7
Line Numbers                  

Raw Audit Messages            

node=erwan-desktop type=AVC msg=audit(1289556275.169:72): avc:  denied  { unlink } for  pid=2010 comm="lxdm-binary" name="lxdm.sock" dev=dm-0 ino=7126 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file

node=erwan-desktop type=SYSCALL msg=audit(1289556275.169:72): arch=c000003e syscall=87 success=no exit=-13 a0=4090a7 a1=22fafe0 a2=30a3d05b50 a3=20 items=0 ppid=1 pid=2010 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="lxdm-binary" exe="/usr/sbin/lxdm-binary" subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,lxdm-binary,xdm_t,var_run_t,sock_file,unlink
audit2allow suggests:

#============= xdm_t ==============
allow xdm_t var_run_t:sock_file unlink;

Comment 1 Daniel Walsh 2010-11-12 15:12:12 UTC
Miroslav xservre.fc has

/var/run/lxdm(/*.)?		gen_context(system_u:object_r:xdm_var_run_t,s0)

It should have

/var/run/lxdm(/.*)?		gen_context(system_u:object_r:xdm_var_run_t,s0)

Comment 2 Miroslav Grepl 2010-11-15 09:56:18 UTC
Fixed in selinux-policy-3.9.7-13.fc14