Bug 1592016 - SELinux is preventing /usr/sbin/slapd from map access on the file /usr/share/pki/ca-trust-source/ca-bundle.trust.p11-kit
Summary: SELinux is preventing /usr/sbin/slapd from map access on the file /usr/share/...
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-06-16 08:22 UTC by Lukas Slebodnik
Modified: 2018-10-30 10:05 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-205.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:05:18 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3111 None None None 2018-10-30 10:05:41 UTC

Description Lukas Slebodnik 2018-06-16 08:22:31 UTC
SELinux is preventing /usr/sbin/slapd from map access on the file /usr/share/pki/ca-trust-source/ca-bundle.trust.p11-kit.

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

If you believe that slapd should be allowed map access on the ca-bundle.trust.p11-kit 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 'slapd' --raw | audit2allow -M my-slapd
# semodule -i my-slapd.pp


Additional Information:
Source Context                system_u:system_r:slapd_t:s0
Target Context                system_u:object_r:cert_t:s0
Target Objects                /usr/share/pki/ca-trust-source/ca-
                              bundle.trust.p11-kit [ file ]
Source                        slapd
Source Path                   /usr/sbin/slapd
Port                          <Unknown>
Host                          host.example.com
Source RPM Packages           openldap-servers-2.4.44-16.el7.x86_64
Target RPM Packages           ca-certificates-2018.2.22-70.0.el7_5.noarch
Policy RPM                    selinux-policy-3.13.1-204.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     host.example.com
Platform                      Linux host.example.com
                              3.10.0-905.el7.x86_64 #1 SMP Wed Jun 13 13:48:50
                              EDT 2018 x86_64 x86_64
Alert Count                   3
First Seen                    2018-06-16 04:18:45 EDT
Last Seen                     2018-06-16 04:20:06 EDT
Local ID                      b2d1ee97-1964-4f90-9440-2ffb8f59d619

Raw Audit Messages
type=AVC msg=audit(1529137206.516:508): avc:  denied  { map } for  pid=40790 comm="slapd" path="/usr/share/pki/ca-trust-source/ca-bundle.trust.p11-kit" dev="dm-0" ino=100688943 scontext=system_u:system_r:slapd_t:s0 tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1529137206.516:508): arch=x86_64 syscall=mmap success=no exit=EACCES a0=0 a1=ea0c4 a2=1 a3=2 items=0 ppid=1 pid=40790 auid=4294967295 uid=55 gid=55 euid=55 suid=55 fsuid=55 egid=55 sgid=55 fsgid=55 tty=(none) ses=4294967295 comm=slapd exe=/usr/sbin/slapd subj=system_u:system_r:slapd_t:s0 key=(null)

Hash: slapd,slapd_t,cert_t,file,map

Comment 2 Lukas Slebodnik 2018-06-16 08:24:04 UTC
AVC in enforcing mode:
sh# ausearch -m avc -i
type=PROCTITLE msg=audit(06/16/2018 04:18:45.968:490) : proctitle=/usr/sbin/slapd -u ldap -h ldapi:/// ldap:/// ldaps:/// 
type=SYSCALL msg=audit(06/16/2018 04:18:45.968:490) : arch=x86_64 syscall=mmap success=yes exit=140295990018048 a0=0x0 a1=0x3a4 a2=PROT_READ a3=MAP_PRIVATE items=0 ppid=1 pid=40285 auid=unset uid=ldap gid=ldap euid=ldap suid=ldap fsuid=ldap egid=ldap sgid=ldap fsgid=ldap tty=(none) ses=unset comm=slapd exe=/usr/sbin/slapd subj=system_u:system_r:slapd_t:s0 key=(null) 
type=AVC msg=audit(06/16/2018 04:18:45.968:490) : avc:  denied  { map } for  pid=40285 comm=slapd path=/etc/pki/ca-trust/source/README dev="dm-0" ino=67228331 scontext=system_u:system_r:slapd_t:s0 tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=1 


and in permissive mode

type=PROCTITLE msg=audit(06/16/2018 04:20:06.515:506) : proctitle=/usr/sbin/slapd -u ldap -h ldapi:/// ldap:/// ldaps:/// 
type=MMAP msg=audit(06/16/2018 04:20:06.515:506) : fd=15 flags=MAP_PRIVATE 
type=SYSCALL msg=audit(06/16/2018 04:20:06.515:506) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x0 a1=0x3a4 a2=PROT_READ a3=MAP_PRIVATE items=0 ppid=1 pid=40790 auid=unset uid=ldap gid=ldap euid=ldap suid=ldap fsuid=ldap egid=ldap sgid=ldap fsgid=ldap tty=(none) ses=unset comm=slapd exe=/usr/sbin/slapd subj=system_u:system_r:slapd_t:s0 key=(null) 
type=AVC msg=audit(06/16/2018 04:20:06.515:506) : avc:  denied  { map } for  pid=40790 comm=slapd path=/etc/pki/ca-trust/source/README dev="dm-0" ino=67228331 scontext=system_u:system_r:slapd_t:s0 tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=0 
----
type=PROCTITLE msg=audit(06/16/2018 04:20:06.516:507) : proctitle=/usr/sbin/slapd -u ldap -h ldapi:/// ldap:/// ldaps:/// 
type=MMAP msg=audit(06/16/2018 04:20:06.516:507) : fd=15 flags=MAP_PRIVATE 
type=SYSCALL msg=audit(06/16/2018 04:20:06.516:507) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x0 a1=0x3a9 a2=PROT_READ a3=MAP_PRIVATE items=0 ppid=1 pid=40790 auid=unset uid=ldap gid=ldap euid=ldap suid=ldap fsuid=ldap egid=ldap sgid=ldap fsgid=ldap tty=(none) ses=unset comm=slapd exe=/usr/sbin/slapd subj=system_u:system_r:slapd_t:s0 key=(null) 
type=AVC msg=audit(06/16/2018 04:20:06.516:507) : avc:  denied  { map } for  pid=40790 comm=slapd path=/usr/share/pki/ca-trust-source/README dev="dm-0" ino=100688942 scontext=system_u:system_r:slapd_t:s0 tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=0 
----
type=PROCTITLE msg=audit(06/16/2018 04:20:06.516:508) : proctitle=/usr/sbin/slapd -u ldap -h ldapi:/// ldap:/// ldaps:/// 
type=MMAP msg=audit(06/16/2018 04:20:06.516:508) : fd=15 flags=MAP_PRIVATE 
type=SYSCALL msg=audit(06/16/2018 04:20:06.516:508) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x0 a1=0xea0c4 a2=PROT_READ a3=MAP_PRIVATE items=0 ppid=1 pid=40790 auid=unset uid=ldap gid=ldap euid=ldap suid=ldap fsuid=ldap egid=ldap sgid=ldap fsgid=ldap tty=(none) ses=unset comm=slapd exe=/usr/sbin/slapd subj=system_u:system_r:slapd_t:s0 key=(null) 
type=AVC msg=audit(06/16/2018 04:20:06.516:508) : avc:  denied  { map } for  pid=40790 comm=slapd path=/usr/share/pki/ca-trust-source/ca-bundle.trust.p11-kit dev="dm-0" ino=100688943 scontext=system_u:system_r:slapd_t:s0 tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=0

Comment 6 errata-xmlrpc 2018-10-30 10:05:18 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.