Bug 854963

Summary: pand runs as initrc_t
Product: Red Hat Enterprise Linux 6 Reporter: Michal Trunecka <mtruneck>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: dwalsh, ebenes, mgrepl, mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-211.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 10:09:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 832330    

Description Michal Trunecka 2012-09-06 11:59:32 UTC
Description of problem:
When unconfined and unlabelednet modules are disabled, running automated test of lvmetad FAILs and causes AVCs. AVCs caused by test in permissive mode is listed below. The test PASSed with no AVCs with both mentioned modules enabled.

pand daemon is part of bluez-compat package.

----
time->Thu Sep  6 13:50:42 2012
type=SYSCALL msg=audit(1346932242.517:501): arch=c000003e syscall=41 success=no exit=-13 a0=1f a1=3 a2=4 a3=7fff322addb0 items=0 ppid=25800 pid=25801 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=7 comm="pand" exe="/usr/bin/pand" subj=unconfined_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1346932242.517:501): avc:  denied  { create } for  pid=25801 comm="pand" scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=socket
----
time->Thu Sep  6 13:50:43 2012
type=SYSCALL msg=audit(1346932243.871:502): arch=c000003e syscall=41 success=no exit=-13 a0=1f a1=3 a2=4 a3=7fffb306e170 items=0 ppid=25835 pid=25838 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=7 comm="pand" exe="/usr/bin/pand" subj=unconfined_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1346932243.871:502): avc:  denied  { create } for  pid=25838 comm="pand" scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=socket
----
time->Thu Sep  6 13:50:43 2012
type=SYSCALL msg=audit(1346932243.914:503): arch=c000003e syscall=41 success=no exit=-13 a0=1f a1=3 a2=4 a3=7fff920739b0 items=0 ppid=25845 pid=25846 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=7 comm="pand" exe="/usr/bin/pand" subj=unconfined_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1346932243.914:503): avc:  denied  { create } for  pid=25846 comm="pand" scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=socket
----
time->Thu Sep  6 13:50:45 2012
type=SYSCALL msg=audit(1346932245.133:504): arch=c000003e syscall=41 success=no exit=-13 a0=1f a1=3 a2=4 a3=7fffb6fb1970 items=0 ppid=25898 pid=25901 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=7 comm="pand" exe="/usr/bin/pand" subj=unconfined_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1346932245.133:504): avc:  denied  { create } for  pid=25901 comm="pand" scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=socket


Version-Release number of selected component (if applicable):
bluez-compat-4.66-1.el6.x86_64
selinux-policy-3.7.19-155.el6_3.noarch
selinux-policy-targeted-3.7.19-155.el6_3.noarch
selinux-policy-mls-3.7.19-155.el6_3.noarch

How reproducible:
always

Steps to Reproduce:
1. semodule -d unconfined; semodule -d unlabelednet
2. Run following automated test 
/CoreOS/selinux-policy/Regression/bz708604-bluetooth-and-similar

  
Actual results:
AVCs and pand service cannot be started with error message "Starting pand: Failed to open control socket: Permission denied"

Expected results:
No AVCs and pand service can be started

Comment 2 Daniel Walsh 2012-09-06 20:47:41 UTC
pand needs policy written for it.

Comment 7 Miroslav Grepl 2013-08-07 08:19:44 UTC
Fixes have been added to Fedora. We can back port them.

Comment 8 Miroslav Grepl 2013-08-21 13:44:56 UTC
Has been added to the latest build.

Comment 11 errata-xmlrpc 2013-11-21 10:09:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1598.html