Bug 1600528

Summary: SELinux is preventing /usr/sbin/nscd from map access on the file /etc/group
Product: Red Hat Enterprise Linux 7 Reporter: Sergey Kolosov <skolosov>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: lvrabec, mgrepl, mmalik, plautrba, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:06:46 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 Sergey Kolosov 2018-07-12 12:43:26 UTC
Description of problem:

SELinux is preventing /usr/sbin/nscd from map access on the file /etc/group

time->Thu Jul 12 08:34:20 2018
type=PROCTITLE msg=audit(1531398860.144:717): proctitle="/usr/sbin/nscd"
type=SYSCALL msg=audit(1531398860.144:717): arch=c000003e syscall=9 success=no exit=-13 a0=0 a1=231 a2=1 a3=1 items=0 ppid=5974 pid=5975 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nscd" exe="/usr/sbin/nscd" subj=system_u:system_r:nscd_t:s0 key=(null)
type=AVC msg=audit(1531398860.144:717): avc:  denied  { map } for  pid=5975 comm="nscd" path="/etc/group" dev="vda1" ino=781799 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file permissive=0
----
time->Thu Jul 12 08:34:20 2018
type=PROCTITLE msg=audit(1531398860.144:718): proctitle="/usr/sbin/nscd"
type=SYSCALL msg=audit(1531398860.144:718): arch=c000003e syscall=9 success=no exit=-13 a0=0 a1=231 a2=1 a3=1 items=0 ppid=5974 pid=5975 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nscd" exe="/usr/sbin/nscd" subj=system_u:system_r:nscd_t:s0 key=(null)
type=AVC msg=audit(1531398860.144:718): avc:  denied  { map } for  pid=5975 comm="nscd" path="/etc/group" dev="vda1" ino=781799 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file permissive=0

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-207.el7.noarch

How reproducible:

Steps to Reproduce:
1. In /etc/nsswitch.conf:

group: compat
group_compat: files

2. systemctl start nscd
3. ausearch -m AVC -m USER_AVC -m SELINUX_ERR

Actual results:
SELinux is preventing /usr/sbin/nscd from map access on the file /etc/group

Expected results:
No AVC

Additional info:

Comment 2 Milos Malik 2018-07-12 20:22:53 UTC
Caught in enforcing mode:
----
type=PROCTITLE msg=audit(07/12/2018 22:19:24.741:485) : proctitle=/usr/sbin/nscd 
type=MMAP msg=audit(07/12/2018 22:19:24.741:485) : fd=21 flags=MAP_SHARED 
type=SYSCALL msg=audit(07/12/2018 22:19:24.741:485) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x0 a1=0x6ce a2=PROT_READ a3=MAP_SHARED items=0 ppid=1 pid=67126 auid=unset uid=nscd gid=nscd euid=nscd suid=nscd fsuid=nscd egid=nscd sgid=nscd fsgid=nscd tty=(none) ses=unset comm=nscd exe=/usr/sbin/nscd subj=system_u:system_r:nscd_t:s0 key=(null) 
type=AVC msg=audit(07/12/2018 22:19:24.741:485) : avc:  denied  { map } for  pid=67126 comm=nscd path=/etc/group dev="vda3" ino=8670767 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file permissive=0 
----
type=PROCTITLE msg=audit(07/12/2018 22:20:01.611:496) : proctitle=//usr/libexec/dbus-1/dbus-daemon-launch-helper org.fedoraproject.Setroubleshootd 
type=MMAP msg=audit(07/12/2018 22:20:01.611:496) : fd=4 flags=MAP_SHARED 
type=SYSCALL msg=audit(07/12/2018 22:20:01.611:496) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x0 a1=0x34fc8 a2=PROT_READ a3=MAP_SHARED items=0 ppid=67181 pid=67183 auid=unset uid=dbus gid=dbus euid=root suid=root fsuid=root egid=dbus sgid=dbus fsgid=dbus tty=(none) ses=unset comm=dbus-daemon-lau exe=/usr/libexec/dbus-1/dbus-daemon-launch-helper subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(07/12/2018 22:20:01.611:496) : avc:  denied  { map } for  pid=67183 comm=dbus-daemon-lau path=/var/db/nscd/group dev="vda3" ino=9078131 scontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:nscd_var_run_t:s0 tclass=file permissive=0 
----

Comment 6 errata-xmlrpc 2018-10-30 10:06:46 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://access.redhat.com/errata/RHBA-2018:3111