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 910756 - unbound: error: could not open autotrust file for writing, /etc/unbound/root.anchor.14085-0: Permission denied
Summary: unbound: error: could not open autotrust file for writing, /etc/unbound/root....
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: unbound
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tomáš Hozza
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-13 13:46 UTC by Milos Malik
Modified: 2014-06-13 12:47 UTC (History)
0 users

Fixed In Version: unbound-1.4.20-3.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:47:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milos Malik 2013-02-13 13:46:27 UTC
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-3.11.1-75.el7.noarch
selinux-policy-devel-3.11.1-75.el7.noarch
selinux-policy-doc-3.11.1-75.el7.noarch
selinux-policy-minimum-3.11.1-75.el7.noarch
selinux-policy-mls-3.11.1-75.el7.noarch
selinux-policy-targeted-3.11.1-75.el7.noarch
unbound-1.4.19-1.el7.x86_64
unbound-libs-1.4.19-1.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. get a RHEL-7 machine where targeted policy is active
2. yum -y install unbound
3. service unbound start
4. search for AVCs

Actual results:
----
type=PATH msg=audit(02/13/2013 14:40:43.647:9644) : item=0 name=/etc/unbound/root.anchor.13774-0 inode=524744 dev=08:04 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:named_conf_t:s0 
type=CWD msg=audit(02/13/2013 14:40:43.647:9644) :  cwd=/ 
type=SYSCALL msg=audit(02/13/2013 14:40:43.647:9644) : arch=x86_64 syscall=open success=no exit=-13(Permission denied) a0=0x7ffff8a56050 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0x1b6 a3=0x238 items=1 ppid=1 pid=13774 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root ses=unset tty=(none) comm=unbound-anchor exe=/usr/sbin/unbound-anchor subj=system_u:system_r:named_t:s0 key=(null) 
type=AVC msg=audit(02/13/2013 14:40:43.647:9644) : avc:  denied  { write } for  pid=13774 comm=unbound-anchor name=unbound dev="sda4" ino=524744 scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:named_conf_t:s0 tclass=dir 
----

Expected results:
 * no AVCs

Comment 1 Milos Malik 2013-02-13 13:50:23 UTC
Here are AVCs caught in permissive mode:
----
time->Wed Feb 13 14:48:48 2013
type=PATH msg=audit(1360763328.154:9661): item=2 name=(null) inode=524731 dev=08:04 mode=0100644 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:named_conf_t:s0
type=PATH msg=audit(1360763328.154:9661): item=1 name=(null) inode=524744 dev=08:04 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:named_conf_t:s0
type=PATH msg=audit(1360763328.154:9661): item=0 name="/etc/unbound/root.anchor.14433-0" inode=524744 dev=08:04 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:named_conf_t:s0
type=CWD msg=audit(1360763328.154:9661):  cwd="/"
type=SYSCALL msg=audit(1360763328.154:9661): arch=c000003e syscall=2 success=yes exit=10 a0=7fff6027a5e0 a1=241 a2=1b6 a3=238 items=3 ppid=1 pid=14433 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm="unbound-anchor" exe="/usr/sbin/unbound-anchor" subj=system_u:system_r:named_t:s0 key=(null)
type=AVC msg=audit(1360763328.154:9661): avc:  denied  { write } for  pid=14433 comm="unbound-anchor" path="/etc/unbound/root.anchor.14433-0" dev="sda4" ino=524731 scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:named_conf_t:s0 tclass=file
type=AVC msg=audit(1360763328.154:9661): avc:  denied  { create } for  pid=14433 comm="unbound-anchor" name="root.anchor.14433-0" scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:named_conf_t:s0 tclass=file
type=AVC msg=audit(1360763328.154:9661): avc:  denied  { add_name } for  pid=14433 comm="unbound-anchor" name="root.anchor.14433-0" scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:named_conf_t:s0 tclass=dir
type=AVC msg=audit(1360763328.154:9661): avc:  denied  { write } for  pid=14433 comm="unbound-anchor" name="unbound" dev="sda4" ino=524744 scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:named_conf_t:s0 tclass=dir
----
time->Wed Feb 13 14:48:48 2013
type=PATH msg=audit(1360763328.154:9662): item=4 name="/etc/unbound/root.anchor" inode=524731 dev=08:04 mode=0100644 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:named_conf_t:s0
type=PATH msg=audit(1360763328.154:9662): item=3 name="/etc/unbound/root.anchor" inode=525165 dev=08:04 mode=0100644 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:named_conf_t:s0
type=PATH msg=audit(1360763328.154:9662): item=2 name="/etc/unbound/root.anchor.14433-0" inode=524731 dev=08:04 mode=0100644 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:named_conf_t:s0
type=PATH msg=audit(1360763328.154:9662): item=1 name="/etc/unbound/" inode=524744 dev=08:04 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:named_conf_t:s0
type=PATH msg=audit(1360763328.154:9662): item=0 name="/etc/unbound/" inode=524744 dev=08:04 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:named_conf_t:s0
type=CWD msg=audit(1360763328.154:9662):  cwd="/"
type=SYSCALL msg=audit(1360763328.154:9662): arch=c000003e syscall=82 success=yes exit=0 a0=7fff6027a5e0 a1=25a7db0 a2=25a7db0 a3=3f84db1798 items=5 ppid=1 pid=14433 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm="unbound-anchor" exe="/usr/sbin/unbound-anchor" subj=system_u:system_r:named_t:s0 key=(null)
type=AVC msg=audit(1360763328.154:9662): avc:  denied  { unlink } for  pid=14433 comm="unbound-anchor" name="root.anchor" dev="sda4" ino=525165 scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:named_conf_t:s0 tclass=file
type=AVC msg=audit(1360763328.154:9662): avc:  denied  { rename } for  pid=14433 comm="unbound-anchor" name="root.anchor.14433-0" dev="sda4" ino=524731 scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:named_conf_t:s0 tclass=file
type=AVC msg=audit(1360763328.154:9662): avc:  denied  { remove_name } for  pid=14433 comm="unbound-anchor" name="root.anchor.14433-0" dev="sda4" ino=524731 scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:named_conf_t:s0 tclass=dir
----

Comment 2 Miroslav Grepl 2013-02-14 07:03:40 UTC
This should be fixed in unbound pkg as we did it in Fedora.

Comment 4 Tomáš Hozza 2013-06-04 07:40:19 UTC
Works OK with:
unbound-1.4.20-3.el7.x86_64
unbound-libs-1.4.20-3.el7.x86_64
selinux-policy-3.12.1-44.el7.noarch

Comment 6 Ludek Smid 2014-06-13 12:47:55 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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