Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1366649 - IdM DNSSEC component is broken because too restrictive SELinux policy
Summary: IdM DNSSEC component is broken because too restrictive SELinux policy
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
high
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-12 14:12 UTC by Petr Spacek
Modified: 2016-11-04 02:36 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-94.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 02:36:48 UTC


Attachments (Terms of Use)


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

Description Petr Spacek 2016-08-12 14:12:07 UTC
Description of problem:


Version-Release number of selected component (if applicable):
ipa-server-4.4.0-7.el7.x86_64
selinux-policy-3.13.1-93.el7.noarch
opendnssec-1.4.7-3.el7.x86_64


How reproducible:
100 %

Steps to Reproduce:
1. install IdM/IPA
$ ipa-server-install --ds-password="$ADMINPW" --admin-password="$ADMINPW" "--domain=$(echo $DOMAIN | tr "[:upper:]" "[:lower:]")" --realm="$(echo $DOMAIN | tr "[:lower:]" "[:upper:]")" --unattended --setup-dns --auto-forwarders

2. install DNSSEC component of FreeIPA: ipa-dns-install --unattended --dnssec-master --forwarder=<IP address of an DNS server>

3. add a DNS zone into IdM
$ ipa dnszone-add test.

4. enable DNSSEC for a DNS zone
$ ipa dnszone-mod test. --dnssec=1


Actual results:
* ipa-dnskeysyncd service fails with following error message:
ipa-dnskeysyncd: subprocess.CalledProcessError: Command 'ods-ksmutil zonelist export' returned non-zero exit status 1
ipa-dnskeysyncd.service: main process exited, code=exited, status=1/FAILURE


Expected results:
It should not fail.


Additional info:
Here are messages from permissive mode:

$ sudo ausearch -m avc | grep AVC 
type=AVC msg=audit(1471009482.193:261): avc:  denied  { write } for  pid=3013 comm="ods-ksmutil" name="opendnssec" dev="dm-0" ino=25942765 scontext=system_u:system_r:ipa_dnskey_t:s0 tcontext=system_u:object_r:opendnssec_conf_t:s0 tclass=dir
type=AVC msg=audit(1471009482.222:262): avc:  denied  { add_name } for  pid=3013 comm="ods-ksmutil" name="zonelist.xml.backup" scontext=system_u:system_r:ipa_dnskey_t:s0 tcontext=system_u:object_r:opendnssec_conf_t:s0 tclass=dir
type=AVC msg=audit(1471009482.237:263): avc:  denied  { open } for  pid=3017 comm="ods-control" path="/proc/meminfo" dev="proc" ino=4026532028 scontext=system_u:system_r:opendnssec_t:s0 tcontext=system_u:object_r:proc_t:s0 tclass=file
type=AVC msg=audit(1471009482.237:263): avc:  denied  { read } for  pid=3017 comm="ods-control" name="meminfo" dev="proc" ino=4026532028 scontext=system_u:system_r:opendnssec_t:s0 tcontext=system_u:object_r:proc_t:s0 tclass=file
type=AVC msg=audit(1471009482.238:264): avc:  denied  { getattr } for  pid=3017 comm="ods-control" path="/proc/meminfo" dev="proc" ino=4026532028 scontext=system_u:system_r:opendnssec_t:s0 tcontext=system_u:object_r:proc_t:s0 tclass=file
type=AVC msg=audit(1471009483.150:265): avc:  denied  { read write } for  pid=2783 comm="ods-enforcerd" name="tmp" dev="dm-0" ino=69 scontext=system_u:system_r:opendnssec_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir
type=AVC msg=audit(1471009483.150:266): avc:  denied  { write open } for  pid=2783 comm="ods-enforcerd" path="/var/tmp/etilqs_Z8VMXybe1SlKscu" dev="dm-0" ino=322643 scontext=system_u:system_r:opendnssec_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file
type=AVC msg=audit(1471009483.150:266): avc:  denied  { create } for  pid=2783 comm="ods-enforcerd" name="etilqs_Z8VMXybe1SlKscu" scontext=system_u:system_r:opendnssec_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file
type=AVC msg=audit(1471009483.150:266): avc:  denied  { add_name } for  pid=2783 comm="ods-enforcerd" name="etilqs_Z8VMXybe1SlKscu" scontext=system_u:system_r:opendnssec_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir
type=AVC msg=audit(1471009483.151:267): avc:  denied  { unlink } for  pid=2783 comm="ods-enforcerd" name="etilqs_Z8VMXybe1SlKscu" dev="dm-0" ino=322643 scontext=system_u:system_r:opendnssec_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file
type=AVC msg=audit(1471009483.151:267): avc:  denied  { remove_name } for  pid=2783 comm="ods-enforcerd" name="etilqs_Z8VMXybe1SlKscu" dev="dm-0" ino=322643 scontext=system_u:system_r:opendnssec_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir



Interestingly, this is different from Fedora 24 bug 1366640. In Fedora there is a problem with systemd socket activation but I cannot see other AVCs like the ones listed above. On the other hand, the Fedora problem is not present in RHEL because the socket activation seems to work in RHEL but we have other problems in RHEL.

Maybe if you combine rules from Fedora 24 and RHEL together it could start working.

Comment 7 Petr Spacek 2016-08-17 15:02:38 UTC
I confirm it started to work with:

$ rpm -q ipa-server selinux-policy-targeted opendnssec softhsm bind
ipa-server-4.4.0-7.el7.x86_64
selinux-policy-targeted-3.13.1-94.el7.noarch
opendnssec-1.4.7-3.el7.x86_64
softhsm-2.1.0-2.el7.x86_64
bind-9.9.4-36.el7.x86_64

Comment 11 errata-xmlrpc 2016-11-04 02:36:48 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.