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 1155617 - nslcd generates AVCs when started
Summary: nslcd generates AVCs when started
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-22 13:21 UTC by David Spurek
Modified: 2015-03-05 10:46 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-7.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:46:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0458 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2015-03-05 15:17:00 UTC

Description David Spurek 2014-10-22 13:21:05 UTC
Description of problem:
authconfig generate AVC when changes environment


[test]getsebool -a | grep nsswitch
authlogin_nsswitch_use_ldap --> off
[test]ausearch -m avc -ts recent
<no matches>
[test]authconfig --update --enableldap --enableldapauth --disablekrb5 --disablecache --disablenis --ldapserver my-domain.com --ldapbasedn dc=my-domain,dc=com --enableforcelegacy
[test]ausearch -m avc -ts recent
----
time->Wed Oct 22 09:09:35 2014
type=SYSCALL msg=audit(1413983375.455:1015): arch=80000015 syscall=106 success=no exit=-13 a0=3fff99aa9090 a1=3fffc1e53978 a2=3fffc1e53978 a3=0 items=0 ppid=1 pid=7819 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nslcd" exe="/usr/sbin/nslcd" subj=system_u:system_r:nslcd_t:s0 key=(null)
type=AVC msg=audit(1413983375.455:1015): avc:  denied  { getattr } for  pid=7819 comm="nslcd" path="/dev/urandom" dev="devtmpfs" ino=1032 scontext=system_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
----
time->Wed Oct 22 09:09:35 2014
type=SYSCALL msg=audit(1413983375.455:1016): arch=80000015 syscall=11 success=no exit=-13 a0=3fffc1e55977 a1=3fffc1e55a80 a2=1003c6c2490 a3=6e69622f items=0 ppid=7819 pid=7820 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nslcd" exe="/usr/sbin/nslcd" subj=system_u:system_r:nslcd_t:s0 key=(null)
type=AVC msg=audit(1413983375.455:1016): avc:  denied  { execute } for  pid=7820 comm="nslcd" name="netstat" dev="dm-0" ino=136704895 scontext=system_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file
----
time->Wed Oct 22 09:09:35 2014
type=SYSCALL msg=audit(1413983375.455:1014): arch=80000015 syscall=5 success=no exit=-13 a0=3fff99aa9090 a1=0 a2=1b6 a3=0 items=0 ppid=1 pid=7819 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nslcd" exe="/usr/sbin/nslcd" subj=system_u:system_r:nslcd_t:s0 key=(null)
type=AVC msg=audit(1413983375.455:1014): avc:  denied  { read } for  pid=7819 comm="nslcd" name="urandom" dev="devtmpfs" ino=1032 scontext=system_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
----
time->Wed Oct 22 09:09:35 2014
type=SYSCALL msg=audit(1413983375.455:1017): arch=80000015 syscall=11 success=no exit=-13 a0=3fffc1e55973 a1=3fffc1e55a80 a2=1003c6c2490 a3=7273752f items=0 ppid=7819 pid=7820 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nslcd" exe="/usr/sbin/nslcd" subj=system_u:system_r:nslcd_t:s0 key=(null)
type=AVC msg=audit(1413983375.455:1017): avc:  denied  { execute } for  pid=7820 comm="nslcd" name="netstat" dev="dm-0" ino=136704895 scontext=system_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file
----
time->Wed Oct 22 09:09:35 2014
type=SYSCALL msg=audit(1413983375.455:1018): arch=80000015 syscall=5 success=no exit=-13 a0=3fff99aa9090 a1=0 a2=1b6 a3=0 items=0 ppid=1 pid=7819 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nslcd" exe="/usr/sbin/nslcd" subj=system_u:system_r:nslcd_t:s0 key=(null)
type=AVC msg=audit(1413983375.455:1018): avc:  denied  { read } for  pid=7819 comm="nslcd" name="urandom" dev="devtmpfs" ino=1032 scontext=system_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
----
time->Wed Oct 22 09:09:35 2014
type=SYSCALL msg=audit(1413983375.465:1019): arch=80000015 syscall=106 success=no exit=-13 a0=3fffc1e555f8 a1=3fffc1e55568 a2=3fffc1e55568 a3=0 items=0 ppid=1 pid=7819 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nslcd" exe="/usr/sbin/nslcd" subj=system_u:system_r:nslcd_t:s0 key=(null)
type=AVC msg=audit(1413983375.465:1019): avc:  denied  { getattr } for  pid=7819 comm="nslcd" path="/etc/lvm" dev="dm-0" ino=135786857 scontext=system_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:lvm_etc_t:s0 tclass=dir
[test]getsebool -a | grep nsswitch
authlogin_nsswitch_use_ldap --> on


Version-Release number of selected component (if applicable):
authconfig-6.2.8-9.bs4.ppc64le

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Tomas Mraz 2014-10-22 13:41:19 UTC
I do not think this is authconfig bug. It is bug in SELinux policy.

Comment 2 David Spurek 2014-10-22 14:04:49 UTC
I had following packages installed:
selinux-policy-3.13.1-2.bs4.noarch
nss-pam-ldapd-0.8.13-8.bs4.ppc64le

Comment 4 Lukas Vrabec 2014-10-29 13:41:00 UTC
Milos, 
What about permissive mode?

Comment 5 Milos Malik 2014-10-29 17:28:55 UTC
Here are AVCs caught in permissive mode:
----
time->Wed Oct 29 18:25:49 2014
type=PATH msg=audit(1414603549.528:479): item=0 name="/dev/urandom" inode=4553 dev=00:05 mode=020666 ouid=0 ogid=0 rdev=01:09 obj=system_u:object_r:urandom_device_t:s0 objtype=NORMAL
type=CWD msg=audit(1414603549.528:479):  cwd="/"
type=SYSCALL msg=audit(1414603549.528:479): arch=c000003e syscall=2 success=yes exit=3 a0=7f1f0ffb0f42 a1=0 a2=1b6 a3=7fffc2717e50 items=1 ppid=1 pid=12771 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nslcd" exe="/usr/sbin/nslcd" subj=system_u:system_r:nslcd_t:s0 key=(null)
type=AVC msg=audit(1414603549.528:479): avc:  denied  { open } for  pid=12771 comm="nslcd" path="/dev/urandom" dev="devtmpfs" ino=4553 scontext=system_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
type=AVC msg=audit(1414603549.528:479): avc:  denied  { read } for  pid=12771 comm="nslcd" name="urandom" dev="devtmpfs" ino=4553 scontext=system_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
----
time->Wed Oct 29 18:25:49 2014
type=PATH msg=audit(1414603549.528:480): item=0 name="/dev/urandom" inode=4553 dev=00:05 mode=020666 ouid=0 ogid=0 rdev=01:09 obj=system_u:object_r:urandom_device_t:s0 objtype=NORMAL
type=CWD msg=audit(1414603549.528:480):  cwd="/"
type=SYSCALL msg=audit(1414603549.528:480): arch=c000003e syscall=4 success=yes exit=0 a0=7f1f0ffb0f42 a1=7fffc2713f70 a2=7fffc2713f70 a3=7fffc2713ce0 items=1 ppid=1 pid=12771 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="nslcd" exe="/usr/sbin/nslcd" subj=system_u:system_r:nslcd_t:s0 key=(null)
type=AVC msg=audit(1414603549.528:480): avc:  denied  { getattr } for  pid=12771 comm="nslcd" path="/dev/urandom" dev="devtmpfs" ino=4553 scontext=system_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
----

Comment 6 Miroslav Grepl 2014-11-03 09:30:39 UTC
Lukas,
did you add any changes?

Comment 7 Lukas Vrabec 2014-11-03 09:35:19 UTC
no

Comment 8 Miroslav Grepl 2014-11-03 10:50:29 UTC
commit a56884f58d9bda3b5112d3cd05219f62569e2fbd
Author: Miroslav Grepl <mgrepl>
Date:   Mon Nov 3 11:49:39 2014 +0100

    Allow nslcd to execute netstat.

commit 3cc957a29f8c80f36bea7c5334bff3e4d9807795
Author: Miroslav Grepl <mgrepl>
Date:   Mon Nov 3 10:23:52 2014 +0100

    Allow nslcd to read /dev/urandom.

Comment 17 errata-xmlrpc 2015-03-05 10:46:21 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-0458.html


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