RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1236616 - SELinux prevents systemd-networkd from communicating with sssd
Summary: SELinux prevents systemd-networkd from communicating with sssd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 7.2
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-29 14:42 UTC by Milos Malik
Modified: 2015-11-19 10:38 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-43.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 10:38:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2300 0 normal SHIPPED_LIVE selinux-policy bug fix update 2015-11-19 09:55:26 UTC

Description Milos Malik 2015-06-29 14:42:58 UTC
Description of problem:
 * when /etc/nsswitch.conf is configured in such a way that system services communicate with SSSD

Version-Release number of selected component (if applicable):
selinux-policy-mls-3.13.1-29.el7.noarch
selinux-policy-sandbox-3.13.1-29.el7.noarch
selinux-policy-targeted-3.13.1-29.el7.noarch
selinux-policy-doc-3.13.1-29.el7.noarch
selinux-policy-3.13.1-29.el7.noarch
selinux-policy-devel-3.13.1-29.el7.noarch
selinux-policy-minimum-3.13.1-29.el7.noarch

How reproducible:
always

Steps to Reproduce:
# ps -efZ | grep networkd
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 5060 2199  0 16:39 pts/0 00:00:00 grep --color=auto networkd
# service systemd-networkd start
Redirecting to /bin/systemctl start  systemd-networkd.service
# ps -efZ | grep networkd
system_u:system_r:systemd_networkd_t:s0 systemd+ 5076 1  0 16:39 ?     00:00:00 /usr/lib/systemd/systemd-networkd
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 5176 2199  0 16:39 pts/0 00:00:00 grep --color=auto networkd
#

Actual results (enforcing mode):
----
type=PATH msg=audit(06/29/2015 16:36:03.276:228) : item=0 name=/var/lib/sss/mc/passwd inode=17910099 dev=fd:03 mode=file,644 ouid=sssd ogid=sssd rdev=00:00 obj=system_u:object_r:sssd_public_t:s0 objtype=NORMAL 
type=CWD msg=audit(06/29/2015 16:36:03.276:228) :  cwd=/ 
type=SYSCALL msg=audit(06/29/2015 16:36:03.276:228) : arch=x86_64 syscall=open success=yes exit=5 a0=0x7f8bbca1d260 a1=O_RDONLY|O_CLOEXEC a2=0x7ffd54ceafe4 a3=0x7ffd54cead20 items=1 ppid=1 pid=4890 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemd-network exe=/usr/lib/systemd/systemd-networkd subj=system_u:system_r:systemd_networkd_t:s0 key=(null) 
type=AVC msg=audit(06/29/2015 16:36:03.276:228) : avc:  denied  { open } for  pid=4890 comm=systemd-network path=/var/lib/sss/mc/passwd dev="vda3" ino=17910099 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file 
type=AVC msg=audit(06/29/2015 16:36:03.276:228) : avc:  denied  { read } for  pid=4890 comm=systemd-network name=passwd dev="vda3" ino=17910099 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file 
----
type=SYSCALL msg=audit(06/29/2015 16:36:03.281:229) : arch=x86_64 syscall=fstat success=yes exit=0 a0=0x5 a1=0x7ffd54ceaff0 a2=0x7ffd54ceaff0 a3=0x7ffd54cead50 items=0 ppid=1 pid=4890 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemd-network exe=/usr/lib/systemd/systemd-networkd subj=system_u:system_r:systemd_networkd_t:s0 key=(null) 
type=AVC msg=audit(06/29/2015 16:36:03.281:229) : avc:  denied  { getattr } for  pid=4890 comm=systemd-network path=/var/lib/sss/mc/passwd dev="vda3" ino=17910099 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file 
----
type=PATH msg=audit(06/29/2015 16:36:03.281:230) : item=0 name=/var/lib/sss/pipes/nss inode=34398181 dev=fd:03 mode=socket,666 ouid=sssd ogid=sssd rdev=00:00 obj=system_u:object_r:sssd_var_lib_t:s0 objtype=NORMAL 
type=CWD msg=audit(06/29/2015 16:36:03.281:230) :  cwd=/ 
type=SOCKADDR msg=audit(06/29/2015 16:36:03.281:230) : saddr=local /var/lib/sss/pipes/nss 
type=SYSCALL msg=audit(06/29/2015 16:36:03.281:230) : arch=x86_64 syscall=connect success=no exit=-111(Connection refused) a0=0x6 a1=0x7ffd54ceafb0 a2=0x6e a3=0x7ffd54ceacd0 items=1 ppid=1 pid=4890 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemd-network exe=/usr/lib/systemd/systemd-networkd subj=system_u:system_r:systemd_networkd_t:s0 key=(null) 
type=AVC msg=audit(06/29/2015 16:36:03.281:230) : avc:  denied  { write } for  pid=4890 comm=systemd-network name=nss dev="vda3" ino=34398181 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=sock_file 
----

Expected results:
 * no AVCs

Comment 1 Milos Malik 2015-06-29 14:46:04 UTC
Caught in permissive mode:
----
type=PATH msg=audit(06/29/2015 16:44:41.119:261) : item=0 name=/var/lib/sss/mc/passwd inode=17910099 dev=fd:03 mode=file,644 ouid=sssd ogid=sssd rdev=00:00 obj=system_u:object_r:sssd_public_t:s0 objtype=NORMAL 
type=CWD msg=audit(06/29/2015 16:44:41.119:261) :  cwd=/ 
type=SYSCALL msg=audit(06/29/2015 16:44:41.119:261) : arch=x86_64 syscall=open success=yes exit=5 a0=0x7fe99022f260 a1=O_RDONLY|O_CLOEXEC a2=0x7ffcd202f784 a3=0x7ffcd202f4c0 items=1 ppid=1 pid=5547 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemd-network exe=/usr/lib/systemd/systemd-networkd subj=system_u:system_r:systemd_networkd_t:s0 key=(null) 
type=AVC msg=audit(06/29/2015 16:44:41.119:261) : avc:  denied  { open } for  pid=5547 comm=systemd-network path=/var/lib/sss/mc/passwd dev="vda3" ino=17910099 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file 
type=AVC msg=audit(06/29/2015 16:44:41.119:261) : avc:  denied  { read } for  pid=5547 comm=systemd-network name=passwd dev="vda3" ino=17910099 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file 
----
type=SYSCALL msg=audit(06/29/2015 16:44:41.124:262) : arch=x86_64 syscall=fstat success=yes exit=0 a0=0x5 a1=0x7ffcd202f790 a2=0x7ffcd202f790 a3=0x7ffcd202f4f0 items=0 ppid=1 pid=5547 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemd-network exe=/usr/lib/systemd/systemd-networkd subj=system_u:system_r:systemd_networkd_t:s0 key=(null) 
type=AVC msg=audit(06/29/2015 16:44:41.124:262) : avc:  denied  { getattr } for  pid=5547 comm=systemd-network path=/var/lib/sss/mc/passwd dev="vda3" ino=17910099 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file 
----
type=PATH msg=audit(06/29/2015 16:44:41.124:263) : item=0 name=/var/lib/sss/pipes/nss inode=34398181 dev=fd:03 mode=socket,666 ouid=sssd ogid=sssd rdev=00:00 obj=system_u:object_r:sssd_var_lib_t:s0 objtype=NORMAL 
type=CWD msg=audit(06/29/2015 16:44:41.124:263) :  cwd=/ 
type=SOCKADDR msg=audit(06/29/2015 16:44:41.124:263) : saddr=local /var/lib/sss/pipes/nss 
type=SYSCALL msg=audit(06/29/2015 16:44:41.124:263) : arch=x86_64 syscall=connect success=no exit=-111(Connection refused) a0=0x6 a1=0x7ffcd202f750 a2=0x6e a3=0x7ffcd202f470 items=1 ppid=1 pid=5547 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemd-network exe=/usr/lib/systemd/systemd-networkd subj=system_u:system_r:systemd_networkd_t:s0 key=(null) 
type=AVC msg=audit(06/29/2015 16:44:41.124:263) : avc:  denied  { write } for  pid=5547 comm=systemd-network name=nss dev="vda3" ino=34398181 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=sock_file 
----

Comment 2 Lukas Vrabec 2015-06-30 08:15:53 UTC
commit 23a3000b996dbba22c9b0b93e9b297af41d4a2e5
Author: Lukas Vrabec <lvrabec>
Date:   Tue Jun 30 10:14:49 2015 +0200

    Add systemd_networkd_t to nsswitch domains. BZ(1236616)

Comment 4 Lukas Vrabec 2015-08-13 08:22:05 UTC
commit 045b55dafe27533df24c05e814400bacc47de353
Author: Lukas Vrabec <lvrabec>
Date:   Thu Aug 13 10:03:13 2015 +0200

    Allow systemd-networkd to send logs to systemd-journald.
    Resolves: #1236616

Comment 8 errata-xmlrpc 2015-11-19 10:38:26 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-2300.html


Note You need to log in before you can comment on or make changes to this bug.