Bug 966542 - SELinux is preventing /usr/sbin/unbound-checkconf from 'read' accesses on the file example.com.key.
Summary: SELinux is preventing /usr/sbin/unbound-checkconf from 'read' accesses on the...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:ea63f4db2551534425ae3c60321...
: 966543 966552 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-23 12:54 UTC by Moez Roy
Modified: 2013-05-31 04:25 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.11.1-97.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-31 04:25:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Moez Roy 2013-05-23 12:54:13 UTC
Description of problem:
SELinux is preventing /usr/sbin/unbound-checkconf from 'read' accesses on the file example.com.key.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that unbound-checkconf should be allowed read access on the example.com.key file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep unbound-checkco /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:initrc_t:s0
Target Context                system_u:object_r:dnssec_t:s0
Target Objects                example.com.key [ file ]
Source                        unbound-checkco
Source Path                   /usr/sbin/unbound-checkconf
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           unbound-1.4.19-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-96.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.2-200.fc18.x86_64 #1 SMP Mon
                              May 13 13:59:47 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-05-23 05:50:28 PDT
Last Seen                     2013-05-23 05:50:28 PDT
Local ID                      43258209-19d8-4800-b4f3-12186e9d0e53

Raw Audit Messages
type=AVC msg=audit(1369313428.948:320): avc:  denied  { read } for  pid=1271 comm="unbound-checkco" name="example.com.key" dev="sda2" ino=1320385 scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:object_r:dnssec_t:s0 tclass=file


type=SYSCALL msg=audit(1369313428.948:320): arch=x86_64 syscall=open success=no exit=EACCES a0=19bec10 a1=0 a2=1b6 a3=238 items=0 ppid=1 pid=1271 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=unbound-checkco exe=/usr/sbin/unbound-checkconf subj=system_u:system_r:initrc_t:s0 key=(null)

Hash: unbound-checkco,initrc_t,dnssec_t,file,read

audit2allow

#============= initrc_t ==============
allow initrc_t dnssec_t:file read;

audit2allow -R
require {
	type initrc_t;
}

#============= initrc_t ==============
bind_read_dnssec_keys(initrc_t)


Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.2-200.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-05-24 07:08:28 UTC
What does

# ps -eZ |grep initrc

# ls -Z /usr/sbin/unbound-checkconf

Comment 2 Moez Roy 2013-05-25 14:46:56 UTC
[user@localhost ~]$ sudo ps -eZ |grep initrc
system_u:system_r:initrc_t:s0     620 ?        00:00:00 VBoxService
[user@localhost ~]$ 
-----------------------------------------------------------
[user@localhost ~]$ ls -Z /usr/sbin/unbound-checkconf
-rwxr-xr-x. root root system_u:object_r:bin_t:s0       /usr/sbin/unbound-checkconf
[user@localhost ~]$

Comment 3 Miroslav Grepl 2013-05-28 08:20:10 UTC
Ok, I see the bug. Please execute

# chcon -t named_exec_t /usr/sbin/unbound-checkconf


Fixed.

commit c7c4e06b0fed4682eb2f525f610fd330614fa2d7
Author: Miroslav Grepl <mgrepl>
Date:   Tue May 28 10:19:54 2013 +0200

    Add labeling for /usr/sbin/unbound-checkconf

Comment 4 Miroslav Grepl 2013-05-28 08:20:23 UTC
*** Bug 966543 has been marked as a duplicate of this bug. ***

Comment 5 Miroslav Grepl 2013-05-28 08:20:28 UTC
*** Bug 966552 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Update System 2013-05-28 18:58:06 UTC
selinux-policy-3.11.1-97.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-97.fc18

Comment 7 Fedora Update System 2013-05-30 03:00:27 UTC
Package selinux-policy-3.11.1-97.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-97.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9612/selinux-policy-3.11.1-97.fc18
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-05-31 04:25:28 UTC
selinux-policy-3.11.1-97.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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