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 1583086 - SELinux is preventing /usr/sbin/nscd from map access on the file /usr/sbin/nscd
Summary: SELinux is preventing /usr/sbin/nscd from map access on the file /usr/sbin/nscd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.6
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-28 08:16 UTC by Lukas Slebodnik
Modified: 2018-10-30 10:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:04:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3111 0 None None None 2018-10-30 10:04:48 UTC

Description Lukas Slebodnik 2018-05-28 08:16:25 UTC
SELinux is preventing /usr/sbin/nscd from map access on the file /usr/sbin/nscd.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that nscd should be allowed map access on the nscd file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'nscd' --raw | audit2allow -M my-nscd
# semodule -i my-nscd.pp


Additional Information:
Source Context                system_u:unconfined_r:groupadd_t:s0
Target Context                system_u:object_r:nscd_exec_t:s0
Target Objects                /usr/sbin/nscd [ file ]
Source                        nscd
Source Path                   /usr/sbin/nscd
Port                          <Unknown>
Host                          bkr-hv01-guest24.example.com
Source RPM Packages           nscd-2.17-245.el7.x86_64
Target RPM Packages           nscd-2.17-245.el7.x86_64
Policy RPM                    selinux-policy-3.13.1-197.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     bkr-hv01-guest24.example.com
Platform                      Linux bkr-hv01-guest24.example.com
                              3.10.0-893.el7.x86_64 #1 SMP Thu May 24 21:37:14
                              UTC 2018 x86_64 x86_64
Alert Count                   5
First Seen                    2018-05-26 09:13:22 EDT
Last Seen                     2018-05-26 09:14:36 EDT
Local ID                      5ba95aa1-d997-44c1-8b6d-9bbf92ce3b92

Raw Audit Messages
type=AVC msg=audit(1527340476.193:101): avc:  denied  { map } for  pid=13537 comm="nscd" path="/usr/sbin/nscd" dev="dm-0" ino=33554509 scontext=system_u:unconfined_r:groupadd_t:s0 tcontext=system_u:object_r:nscd_exec_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1527340476.193:101): arch=x86_64 syscall=execve success=yes exit=0 a0=5617f58c3fe3 a1=7ffe6b7cbd10 a2=7ffe6b7cbd00 a3=7f8eb8808b10 items=0 ppid=13536 pid=13537 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:unconfined_r:nscd_t:s0 key=(null)

Hash: nscd,groupadd_t,nscd_exec_t,file,map

Comment 2 Lukas Slebodnik 2018-05-28 08:24:54 UTC
Similar AVC with useradd

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

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that nscd should be allowed map access on the nscd file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'nscd' --raw | audit2allow -M my-nscd
# semodule -i my-nscd.pp


Additional Information:
Source Context                system_u:unconfined_r:useradd_t:s0
Target Context                system_u:object_r:nscd_exec_t:s0
Target Objects                /usr/sbin/nscd [ file ]
Source                        nscd
Source Path                   /usr/sbin/nscd
Port                          <Unknown>
Host                          bkr-hv01-guest24.example.com
Source RPM Packages           
Target RPM Packages           nscd-2.17-245.el7.x86_64
Policy RPM                    selinux-policy-3.13.1-197.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     bkr-hv01-guest24.example.com
Platform                      Linux bkr-hv01-guest24.example.com
                              3.10.0-893.el7.x86_64 #1 SMP Thu May 24 21:37:14
                              UTC 2018 x86_64 x86_64
Alert Count                   5
First Seen                    2018-05-26 09:13:22 EDT
Last Seen                     2018-05-26 09:14:36 EDT
Local ID                      8fa028fb-d6ce-40d1-ba45-461a6d77cff0

Raw Audit Messages
type=AVC msg=audit(1527340476.221:103): avc:  denied  { map } for  pid=13544 comm="nscd" path="/usr/sbin/nscd" dev="dm-0" ino=33554509 scontext=system_u:unconfined_r:useradd_t:s0 tcontext=system_u:object_r:nscd_exec_t:s0 tclass=file permissive=1


Hash: nscd,useradd_t,nscd_exec_t,file,map

Comment 3 Milos Malik 2018-06-12 14:53:14 UTC
Seen during the installation of memcached package:
----
type=PROCTITLE msg=audit(06/12/2018 10:49:32.477:418) : proctitle=(null) 
type=PATH msg=audit(06/12/2018 10:49:32.477:418) : item=1 name=/lib64/ld-linux-x86-64.so.2 inode=309380 dev=fd:00 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ld_so_t:s0 objtype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=PATH msg=audit(06/12/2018 10:49:32.477:418) : item=0 name=/usr/sbin/nscd inode=2890058 dev=fd:00 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:nscd_exec_t:s0 objtype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=CWD msg=audit(06/12/2018 10:49:32.477:418) :  cwd=/ 
type=SYSCALL msg=audit(06/12/2018 10:49:32.477:418) : arch=x86_64 syscall=execve success=no exit=EACCES(Permission denied) a0=0x561a2e47b9c3 a1=0x7ffd35235cd0 a2=0x7ffd35235cc0 a3=0x7f7441a45b10 items=2 ppid=14688 pid=14692 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts0 ses=3 comm=nscd exe=/usr/sbin/nscd subj=unconfined_u:unconfined_r:useradd_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(06/12/2018 10:49:32.477:418) : avc:  denied  { map } for  pid=14692 comm=nscd path=/usr/sbin/nscd dev="dm-0" ino=2890058 scontext=unconfined_u:unconfined_r:useradd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:nscd_exec_t:s0 tclass=file permissive=0 
----

Both sssd and nscd were stopped.

Comment 4 Milos Malik 2018-06-12 14:56:15 UTC
If memcached user/group do not exist then:

Downloading packages:
memcached-1.4.15-10.el7_3.1.x86_64.rpm                     |  85 kB   00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
groupadd: nscd did not terminate normally (signal 9)
groupadd: nscd did not terminate normally (signal 9)
groupadd: nscd did not terminate normally (signal 9)
useradd: nscd did not terminate normally (signal 9)
useradd: nscd did not terminate normally (signal 9)
useradd: nscd did not terminate normally (signal 9)
useradd: nscd did not terminate normally (signal 9)
  Installing : memcached-1.4.15-10.el7_3.1.x86_64                           1/1 
  Verifying  : memcached-1.4.15-10.el7_3.1.x86_64                           1/1 

Installed:
  memcached.x86_64 0:1.4.15-10.el7_3.1                                          

Complete!

Comment 8 errata-xmlrpc 2018-10-30 10:04:11 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


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