Bug 1148572

Summary: SELinux prevents zebra from communicating with sssd
Product: Red Hat Enterprise Linux 6 Reporter: Milos Malik <mmalik>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.6CC: dwalsh, kyle, mgrepl, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-261.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 07:08:40 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:

Description Milos Malik 2014-10-01 18:36:31 UTC
Description of problem:
 * zebra attempts to look up the quaggavt group (and other users/groups) upon starting. However, if sssd is used to look up group information, this fails due to selinux policy prohibiting zebra from connecting to the sssd socket.

Version-Release number of selected component (if applicable):
selinux-policy-mls-3.7.19-260.el6.noarch
selinux-policy-targeted-3.7.19-260.el6.noarch
selinux-policy-doc-3.7.19-260.el6.noarch
selinux-policy-minimum-3.7.19-260.el6.noarch
selinux-policy-3.7.19-260.el6.noarch
quagga-0.99.15-7.el6_3.2.x86_64

How reproducible:
 * always

Steps to Reproduce:
1. install both quagga and sssd
2. configure the system to leverage sssd for user/group look-ups
3. service sssd start
4. service zebra start

Actual results (enforcing mode):
----
type=PATH msg=audit(10/01/2014 20:29:09.710:321) : item=0 name=(null) inode=25543 dev=fc:03 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sssd_var_lib_t:s0 nametype=NORMAL 
type=SOCKADDR msg=audit(10/01/2014 20:29:09.710:321) : saddr=local /var/lib/sss/pipes/nss 
type=SYSCALL msg=audit(10/01/2014 20:29:09.710:321) : arch=x86_64 syscall=connect success=no exit=-13(Permission denied) a0=0x4 a1=0x7fff63f0ed70 a2=0x6e a3=0x7fff63f0ea00 items=1 ppid=6713 pid=6714 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts1 ses=6 comm=zebra exe=/usr/sbin/zebra subj=unconfined_u:system_r:zebra_t:s0 key=(null) 
type=AVC msg=audit(10/01/2014 20:29:09.710:321) : avc:  denied  { search } for  pid=6714 comm=zebra name=sss dev=vda3 ino=25543 scontext=unconfined_u:system_r:zebra_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=dir 
----

Expected results:
 * no AVCs

Comment 1 Milos Malik 2014-10-01 18:40:03 UTC
Actual results (permissive mode):
----
type=PATH msg=audit(10/01/2014 20:38:55.281:323) : item=0 name=/var/lib/sss/mc/group inode=6382 dev=fc:03 mode=file,644 ouid=root ogid=root rdev=00:00 obj=unconfined_u:object_r:sssd_public_t:s0 nametype=NORMAL 
type=CWD msg=audit(10/01/2014 20:38:55.281:323) :  cwd=/ 
type=SYSCALL msg=audit(10/01/2014 20:38:55.281:323) : arch=x86_64 syscall=open success=yes exit=4 a0=0x7f9e49fcc070 a1=O_RDONLY|O_CLOEXEC a2=0x7fff05983a7c a3=0x7fff05983730 items=1 ppid=6940 pid=6941 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts1 ses=6 comm=zebra exe=/usr/sbin/zebra subj=unconfined_u:system_r:zebra_t:s0 key=(null) 
type=AVC msg=audit(10/01/2014 20:38:55.281:323) : avc:  denied  { open } for  pid=6941 comm=zebra name=group dev=vda3 ino=6382 scontext=unconfined_u:system_r:zebra_t:s0 tcontext=unconfined_u:object_r:sssd_public_t:s0 tclass=file 
type=AVC msg=audit(10/01/2014 20:38:55.281:323) : avc:  denied  { read } for  pid=6941 comm=zebra name=group dev=vda3 ino=6382 scontext=unconfined_u:system_r:zebra_t:s0 tcontext=unconfined_u:object_r:sssd_public_t:s0 tclass=file 
type=AVC msg=audit(10/01/2014 20:38:55.281:323) : avc:  denied  { search } for  pid=6941 comm=zebra name=mc dev=vda3 ino=25545 scontext=unconfined_u:system_r:zebra_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=dir 
type=AVC msg=audit(10/01/2014 20:38:55.281:323) : avc:  denied  { search } for  pid=6941 comm=zebra name=sss dev=vda3 ino=25543 scontext=unconfined_u:system_r:zebra_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=dir 
----
type=PATH msg=audit(10/01/2014 20:38:55.283:324) : item=0 name=(null) inode=6380 dev=fc:03 mode=socket,666 ouid=root ogid=root rdev=00:00 obj=unconfined_u:object_r:sssd_var_lib_t:s0 nametype=NORMAL 
type=SOCKADDR msg=audit(10/01/2014 20:38:55.283:324) : saddr=local /var/lib/sss/pipes/nss 
type=SYSCALL msg=audit(10/01/2014 20:38:55.283:324) : arch=x86_64 syscall=connect success=yes exit=0 a0=0x5 a1=0x7fff05983a30 a2=0x6e a3=0x7fff059836c0 items=1 ppid=6940 pid=6941 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts1 ses=6 comm=zebra exe=/usr/sbin/zebra subj=unconfined_u:system_r:zebra_t:s0 key=(null) 
type=AVC msg=audit(10/01/2014 20:38:55.283:324) : avc:  denied  { connectto } for  pid=6941 comm=zebra path=/var/lib/sss/pipes/nss scontext=unconfined_u:system_r:zebra_t:s0 tcontext=unconfined_u:system_r:sssd_t:s0 tclass=unix_stream_socket 
type=AVC msg=audit(10/01/2014 20:38:55.283:324) : avc:  denied  { write } for  pid=6941 comm=zebra name=nss dev=vda3 ino=6380 scontext=unconfined_u:system_r:zebra_t:s0 tcontext=unconfined_u:object_r:sssd_var_lib_t:s0 tclass=sock_file 
----

Comment 3 Miroslav Grepl 2015-03-02 14:35:49 UTC
commit 2d9fc47c5a2b6769828d9e260eaa001b9458c072
Author: Simon Sekidde <ssekidde>
Date:   Sat Oct 18 18:59:57 2014 -0400

    Allow zebra to communicate with sssd

Comment 6 errata-xmlrpc 2015-07-22 07:08:40 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.

https://rhn.redhat.com/errata/RHBA-2015-1375.html