Bug 478301

Summary: Xen services are blocked by enforcing SElinux
Product: [Fedora] Fedora Reporter: Felix Schwarz <fschwarz>
Component: xennerAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: berrange, kraxel
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-05 11:15:12 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 Felix Schwarz 2008-12-27 16:36:34 UTC
If I install Xenner on F10, the xenstored does not start due to SElinux denials. As soon as I switch to 'permissive',all services start as expected.

Raw SElinux log messages from setroubleshoot:
node=ws2.schwarz.lokal type=AVC msg=audit(1230394606.979:9): avc:  denied  { write } for  pid=4776 comm="xenstored" name="evtchnd" dev=dm-0 ino=1086154 scontext=system_u:system_r:xenstored_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file

node=ws2.schwarz.lokal type=AVC msg=audit(1230394606.979:9): avc:  denied  { connectto } for  pid=4776 comm="xenstored" path="/var/run/evtchnd" scontext=system_u:system_r:xenstored_t:s0 tcontext=system_u:system_r:initrc_t:s0 tclass=unix_stream_socket

node=ws2.schwarz.lokal type=SYSCALL msg=audit(1230394606.979:9): arch=c000003e syscall=42 success=yes exit=0 a0=b a1=7ffff0d93d80 a2=6e a3=37d4d6da70 items=0 ppid=1 pid=4776 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="xenstored" exe="/usr/sbin/xenstored" subj=system_u:system_r:xenstored_t:s0 key=(null)


Using audit2allow I get this policies:
#============= xenstored_t ==============
allow xenstored_t initrc_t:unix_stream_socket connectto;
allow xenstored_t self:capability sys_tty_config;
allow xenstored_t self:tcp_socket create;
allow xenstored_t var_run_t:sock_file write;


How reproducible:
Always

Steps to Reproduce:
1. Install F10
2. yum install xenner
3. reboot system
  
Actual results:
Some Xen services (xenstored) don't start if SElinux is enforcing.

Comment 1 Gerd Hoffmann 2009-01-05 11:15:12 UTC

*** This bug has been marked as a duplicate of bug 450723 ***