Bug 1599726 - selinux blocks slapd access to cracklib
Summary: selinux blocks slapd access to cracklib
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.7-Alt
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-10 12:43 UTC by mreynolds
Modified: 2018-10-30 10:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:06:46 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:07:19 UTC

Description mreynolds 2018-07-10 12:43:35 UTC
Description of problem:

We can not use cracklib dictionary checking in our aplication (389-ds-base and freeipa) because selinux blocks access to the cracklib dictionary files.  This was supposed to be fixed in RHEL 6, but it's a problem on RHEL and Fedora 28.

BZ - 1175188 - selinux blocks slapd access to cracklib

I tested with:

selinux-policy-3.14.1-32.fc28.noarch
libselinux-2.8-1.fc28.x86_64

Comment 2 Milos Malik 2018-07-10 12:48:43 UTC
Please collect SELinux denials triggered by your scenario:

# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today

and attach them here.

Comment 3 mreynolds 2018-07-10 13:06:51 UTC
Here it is (thanks!):


[root@localhost password]# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today
----
type=AVC msg=audit(07/10/2018 07:57:30.870:1886) : avc:  denied  { search } for  pid=24383 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 07:57:30.870:1887) : avc:  denied  { search } for  pid=24383 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 07:57:30.871:1888) : avc:  denied  { search } for  pid=24383 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 07:57:30.871:1889) : avc:  denied  { search } for  pid=24383 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:16:06.290:1896) : avc:  denied  { search } for  pid=6089 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:16:06.290:1897) : avc:  denied  { search } for  pid=6089 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:16:06.293:1898) : avc:  denied  { search } for  pid=6089 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:16:06.293:1899) : avc:  denied  { search } for  pid=6089 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:20:41.530:1902) : avc:  denied  { search } for  pid=13180 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:20:41.530:1903) : avc:  denied  { search } for  pid=13180 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:20:41.536:1904) : avc:  denied  { search } for  pid=13180 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:20:41.536:1905) : avc:  denied  { search } for  pid=13180 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:22:39.080:1908) : avc:  denied  { search } for  pid=20443 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:22:39.080:1909) : avc:  denied  { search } for  pid=20443 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:22:39.083:1910) : avc:  denied  { search } for  pid=20443 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:22:39.083:1911) : avc:  denied  { search } for  pid=20443 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:28:54.318:1914) : avc:  denied  { search } for  pid=10460 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:28:54.318:1915) : avc:  denied  { search } for  pid=10460 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:28:54.319:1916) : avc:  denied  { search } for  pid=10460 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=AVC msg=audit(07/10/2018 08:28:54.319:1917) : avc:  denied  { search } for  pid=10460 comm=ns-slapd name=cracklib dev="dm-0" ino=527843 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=dir permissive=0 
----
type=USER_AVC msg=audit(07/10/2018 08:29:00.958:1920) : pid=831 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  received setenforce notice (enforcing=0)  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
----
type=USER_AVC msg=audit(07/10/2018 08:29:05.127:1921) : pid=1 uid=root auid=unset ses=unset subj=system_u:system_r:init_t:s0 msg='avc:  received setenforce notice (enforcing=0)  exe=/usr/lib/systemd/systemd sauid=root hostname=? addr=? terminal=?' 
----
type=AVC msg=audit(07/10/2018 08:29:09.623:1923) : avc:  denied  { read } for  pid=10728 comm=ns-slapd name=pw_dict.pwd dev="dm-0" ino=529312 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1 
----
type=AVC msg=audit(07/10/2018 08:29:09.623:1924) : avc:  denied  { open } for  pid=10728 comm=ns-slapd path=/usr/share/cracklib/pw_dict.pwd dev="dm-0" ino=529312 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1 
----
type=AVC msg=audit(07/10/2018 08:29:09.623:1925) : avc:  denied  { getattr } for  pid=10728 comm=ns-slapd path=/usr/share/cracklib/pw_dict.pwi dev="dm-0" ino=529313 scontext=system_u:system_r:dirsrv_t:s0 tcontext=system_u:object_r:crack_db_t:s0 tclass=file permissive=1

Comment 7 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


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