Bug 960283 - SELinux is preventing /usr/sbin/unbound from using the 'net_admin' capabilities.
Summary: SELinux is preventing /usr/sbin/unbound from using the 'net_admin' capabilities.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:268692968de9510c782228429b7...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-06 21:29 UTC by monts
Modified: 2013-05-21 08:42 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.11.1-95.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-19 11:17:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description monts 2013-05-06 21:29:07 UTC
Description of problem:
service unbound restart triggers a selinux error unbound should have the net_admin capability by default
SELinux is preventing /usr/sbin/unbound from using the 'net_admin' capabilities.

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

If you believe that unbound should have the net_admin capability 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 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:named_t:s0
Target Context                system_u:system_r:named_t:s0
Target Objects                 [ capability ]
Source                        unbound
Source Path                   /usr/sbin/unbound
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           unbound-1.4.20-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-92.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.0-0.rc0.git15.1.fc20.x86_64
                              #1 SMP Sat May 4 11:56:41 UTC 2013 x86_64 x86_64
Alert Count                   3
First Seen                    2013-05-07 02:54:04 IST
Last Seen                     2013-05-07 02:54:33 IST
Local ID                      132a245a-3d58-4cae-a3f1-1090fe3cfe78

Raw Audit Messages
type=AVC msg=audit(1367875473.681:370): avc:  denied  { net_admin } for  pid=2209 comm="unbound" capability=12  scontext=system_u:system_r:named_t:s0 tcontext=system_u:system_r:named_t:s0 tclass=capability


type=SYSCALL msg=audit(1367875473.681:370): arch=x86_64 syscall=setsockopt success=no exit=EPERM a0=3 a1=1 a2=20 a3=7fff22738678 items=0 ppid=1 pid=2209 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=unbound exe=/usr/sbin/unbound subj=system_u:system_r:named_t:s0 key=(null)

Hash: unbound,named_t,named_t,capability,net_admin

audit2allow

#============= named_t ==============
allow named_t self:capability net_admin;

audit2allow -R
require {
	type named_t;
	class capability net_admin;
}

#============= named_t ==============
allow named_t self:capability net_admin;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.10.0-0.rc0.git15.1.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-05-07 13:04:30 UTC
commit d2174d96cb1a7de434f96cafb9261d0089c64665
Author: Miroslav Grepl <mgrepl>
Date:   Tue May 7 15:04:18 2013 +0200

    Allow unbound net_admin capability because of setsockopt syscal

Comment 2 Fedora Update System 2013-05-07 21:30:38 UTC
selinux-policy-3.11.1-94.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-94.fc18

Comment 3 Fedora Update System 2013-05-09 10:13:03 UTC
Package selinux-policy-3.11.1-94.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-94.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-7743/selinux-policy-3.11.1-94.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-05-17 11:02:17 UTC
selinux-policy-3.11.1-95.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-95.fc18

Comment 5 monts 2013-05-19 11:17:48 UTC
selinux-policy-3.11.1-95.fc18 fixes the issue +1 karma

Comment 6 Fedora Update System 2013-05-21 08:42:28 UTC
selinux-policy-3.11.1-95.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.