Bug 910756
| Summary: | unbound: error: could not open autotrust file for writing, /etc/unbound/root.anchor.14085-0: Permission denied | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Milos Malik <mmalik> |
| Component: | unbound | Assignee: | Tomáš Hozza <thozza> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Milos Malik <mmalik> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | ||
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | unbound-1.4.20-3.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 12:47:55 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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
----
This should be fixed in unbound pkg as we did it in Fedora. 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 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. |
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