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 1349791 - nsd runs openssl which triggers a SELinux denial
Summary: nsd runs openssl which triggers a SELinux denial
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-24 09:36 UTC by Milos Malik
Modified: 2016-11-04 02:32 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-84.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 02:32:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2283 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2016-11-03 13:36:25 UTC

Description Milos Malik 2016-06-24 09:36:31 UTC
Description of problem:

Version-Release number of selected component (if applicable):
nsd-4.1.8-1.el7.x86_64
selinux-policy-3.13.1-81.el7.noarch
selinux-policy-mls-3.13.1-81.el7.noarch
selinux-policy-targeted-3.13.1-81.el7.noarch
openssl-libs-1.0.1e-58.el7.x86_64
openssl-1.0.1e-58.el7.x86_64

How reproducible:
 * always

Steps to Reproduce:
1. get a RHEL-7.3 machine with active targeted policy
2. service nsd start
3. service nsd status
4. search for SELinux denials

Actual results (enforcing mode):
----
time->Fri Jun 24 09:31:48 2016
type=SYSCALL msg=audit(1466753508.910:776): arch=c000003e syscall=2 success=no exit=-13 a0=7fff858f7f5a a1=241 a2=1b6 a3=24 items=0 ppid=31467 pid=31468 auid=4294967295 uid=0 gid=984 euid=0 suid=0 fsuid=0 egid=984 sgid=984 fsgid=984 tty=(none) ses=4294967295 comm="openssl" exe="/usr/bin/openssl" subj=system_u:system_r:nsd_t:s0 key=(null)
type=AVC msg=audit(1466753508.910:776): avc:  denied  { write } for  pid=31468 comm="openssl" name="nsd" dev="dm-0" ino=101382461 scontext=system_u:system_r:nsd_t:s0 tcontext=system_u:object_r:nsd_conf_t:s0 tclass=dir
----
# ls -ild /etc/nsd/
101382461 drwxr-xr-x. 4 root root 52 Jun 24 08:26 /etc/nsd/
#

Expected results:
* no SELinux denials

Comment 1 Milos Malik 2016-06-24 09:41:24 UTC
Caught in enforcing mode:
----
time->Fri Jun 24 09:38:14 2016
type=PATH msg=audit(1466753894.914:799): item=1 name="nsd_server.key" objtype=CREATE
type=PATH msg=audit(1466753894.914:799): item=0 name="/etc/nsd" inode=101382461 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:nsd_conf_t:s0 objtype=PARENT
type=CWD msg=audit(1466753894.914:799):  cwd="/etc/nsd"
type=SYSCALL msg=audit(1466753894.914:799): arch=c000003e syscall=2 success=no exit=-13 a0=7ffc74b06f5a a1=241 a2=1b6 a3=24 items=2 ppid=17010 pid=17011 auid=4294967295 uid=0 gid=984 euid=0 suid=0 fsuid=0 egid=984 sgid=984 fsgid=984 tty=(none) ses=4294967295 comm="openssl" exe="/usr/bin/openssl" subj=system_u:system_r:nsd_t:s0 key=(null)
type=AVC msg=audit(1466753894.914:799): avc:  denied  { write } for  pid=17011 comm="openssl" name="nsd" dev="dm-0" ino=101382461 scontext=system_u:system_r:nsd_t:s0 tcontext=system_u:object_r:nsd_conf_t:s0 tclass=dir
----

Caught in permissive mode:
----
time->Fri Jun 24 09:40:23 2016
type=PATH msg=audit(1466754023.019:814): item=1 name="nsd_server.key" inode=101234802 dev=fd:00 mode=0100640 ouid=0 ogid=984 rdev=00:00 obj=system_u:object_r:nsd_conf_t:s0 objtype=CREATE
type=PATH msg=audit(1466754023.019:814): item=0 name="/etc/nsd" inode=101382461 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:nsd_conf_t:s0 objtype=PARENT
type=CWD msg=audit(1466754023.019:814):  cwd="/etc/nsd"
type=SYSCALL msg=audit(1466754023.019:814): arch=c000003e syscall=2 success=yes exit=3 a0=7fff78493f5a a1=241 a2=1b6 a3=24 items=2 ppid=2440 pid=2441 auid=4294967295 uid=0 gid=984 euid=0 suid=0 fsuid=0 egid=984 sgid=984 fsgid=984 tty=(none) ses=4294967295 comm="openssl" exe="/usr/bin/openssl" subj=system_u:system_r:nsd_t:s0 key=(null)
type=AVC msg=audit(1466754023.019:814): avc:  denied  { write } for  pid=2441 comm="openssl" path="/etc/nsd/nsd_server.key" dev="dm-0" ino=101234802 scontext=system_u:system_r:nsd_t:s0 tcontext=system_u:object_r:nsd_conf_t:s0 tclass=file
type=AVC msg=audit(1466754023.019:814): avc:  denied  { create } for  pid=2441 comm="openssl" name="nsd_server.key" scontext=system_u:system_r:nsd_t:s0 tcontext=system_u:object_r:nsd_conf_t:s0 tclass=file
type=AVC msg=audit(1466754023.019:814): avc:  denied  { add_name } for  pid=2441 comm="openssl" name="nsd_server.key" scontext=system_u:system_r:nsd_t:s0 tcontext=system_u:object_r:nsd_conf_t:s0 tclass=dir
type=AVC msg=audit(1466754023.019:814): avc:  denied  { write } for  pid=2441 comm="openssl" name="nsd" dev="dm-0" ino=101382461 scontext=system_u:system_r:nsd_t:s0 tcontext=system_u:object_r:nsd_conf_t:s0 tclass=dir
----
time->Fri Jun 24 09:40:24 2016
type=PATH msg=audit(1466754024.320:815): item=0 name="nsd_server.pem" inode=101234805 dev=fd:00 mode=0100640 ouid=0 ogid=984 rdev=00:00 obj=system_u:object_r:nsd_conf_t:s0 objtype=NORMAL
type=CWD msg=audit(1466754024.320:815):  cwd="/etc/nsd"
type=SYSCALL msg=audit(1466754024.320:815): arch=c000003e syscall=268 success=yes exit=0 a0=ffffffffffffff9c a1=159e0f0 a2=1a0 a3=7ffc61d47470 items=1 ppid=2440 pid=2449 auid=4294967295 uid=0 gid=984 euid=0 suid=0 fsuid=0 egid=984 sgid=984 fsgid=984 tty=(none) ses=4294967295 comm="chmod" exe="/usr/bin/chmod" subj=system_u:system_r:nsd_t:s0 key=(null)
type=AVC msg=audit(1466754024.320:815): avc:  denied  { setattr } for  pid=2449 comm="chmod" name="nsd_server.pem" dev="dm-0" ino=101234805 scontext=system_u:system_r:nsd_t:s0 tcontext=system_u:object_r:nsd_conf_t:s0 tclass=file
----
time->Fri Jun 24 09:40:24 2016
type=PATH msg=audit(1466754024.321:816): item=1 name="request.cfg" inode=101234804 dev=fd:00 mode=0100640 ouid=0 ogid=984 rdev=00:00 obj=system_u:object_r:nsd_conf_t:s0 objtype=DELETE
type=PATH msg=audit(1466754024.321:816): item=0 name="/etc/nsd" inode=101382461 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:nsd_conf_t:s0 objtype=PARENT
type=CWD msg=audit(1466754024.321:816):  cwd="/etc/nsd"
type=SYSCALL msg=audit(1466754024.321:816): arch=c000003e syscall=263 success=yes exit=0 a0=ffffffffffffff9c a1=15240c0 a2=0 a3=7fff7fe82f90 items=2 ppid=2440 pid=2450 auid=4294967295 uid=0 gid=984 euid=0 suid=0 fsuid=0 egid=984 sgid=984 fsgid=984 tty=(none) ses=4294967295 comm="rm" exe="/usr/bin/rm" subj=system_u:system_r:nsd_t:s0 key=(null)
type=AVC msg=audit(1466754024.321:816): avc:  denied  { unlink } for  pid=2450 comm="rm" name="request.cfg" dev="dm-0" ino=101234804 scontext=system_u:system_r:nsd_t:s0 tcontext=system_u:object_r:nsd_conf_t:s0 tclass=file
type=AVC msg=audit(1466754024.321:816): avc:  denied  { remove_name } for  pid=2450 comm="rm" name="request.cfg" dev="dm-0" ino=101234804 scontext=system_u:system_r:nsd_t:s0 tcontext=system_u:object_r:nsd_conf_t:s0 tclass=dir
----

Comment 6 errata-xmlrpc 2016-11-04 02:32:37 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-2016-2283.html


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