Bug 1272835

Summary: SELinux is preventing /usr/sbin/named from 'name_bind' accesses on the udp_socket port 61000.
Product: [Fedora] Fedora Reporter: vikram goyal <vikigoyal>
Component: selinux-policyAssignee: Vit Mojzis <vmojzis>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: 22CC: chinwen_lin, dominick.grift, dwalsh, lvrabec, mgrepl, mstevens, plautrba, vmojzis
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:550ad5df669ae00dd636893272f98b72b99fca2fcc49a5ef411cf1ffe65bb1ff;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-128.21.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-27 03:53:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description vikram goyal 2015-10-19 04:14:16 UTC
Description of problem:
SELinux is preventing /usr/sbin/named from 'name_bind' accesses on the udp_socket port 61000.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow system to run with NIS
Then you must tell SELinux about this by enabling the 'nis_enabled' boolean.
You can read 'named_selinux' man page for more details.
Do
setsebool -P nis_enabled 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If you believe that named should be allowed name_bind access on the port 61000 udp_socket 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 named /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:object_r:ephemeral_port_t:s0
Target Objects                port 61000 [ udp_socket ]
Source                        named
Source Path                   /usr/sbin/named
Port                          61000
Host                          (removed)
Source RPM Packages           bind-9.10.2-5.P4.fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.16.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.2.3-200.fc22.x86_64 #1 SMP Thu
                              Oct 8 03:23:55 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-10-19 01:28:44 IST
Last Seen                     2015-10-19 01:28:44 IST
Local ID                      085fb678-fb39-4b1c-b8aa-23e2d336cadc

Raw Audit Messages
type=AVC msg=audit(1445198324.198:1040): avc:  denied  { name_bind } for  pid=1725 comm="named" src=61000 scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:ephemeral_port_t:s0 tclass=udp_socket permissive=1


type=SYSCALL msg=audit(1445198324.198:1040): arch=x86_64 syscall=bind success=yes exit=0 a0=212 a1=7f3e29ad3450 a2=10 a3=7f3e29ad3238 items=0 ppid=1 pid=1725 auid=4294967295 uid=25 gid=25 euid=25 suid=25 fsuid=25 egid=25 sgid=25 fsgid=25 tty=(none) ses=4294967295 comm=named exe=/usr/sbin/named subj=system_u:system_r:named_t:s0 key=(null)

Hash: named,named_t,ephemeral_port_t,udp_socket,name_bind

Version-Release number of selected component:
selinux-policy-3.13.1-128.16.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.3-200.fc22.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2015-11-10 08:38:44 UTC
We have fixes in Fedora Rawhide.

Vit,
could you please backport them? Thank you.

Comment 3 Vit Mojzis 2015-11-19 09:02:44 UTC
*** Bug 1276231 has been marked as a duplicate of this bug. ***

Comment 4 Vit Mojzis 2015-11-19 09:11:43 UTC
*** Bug 1221677 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2015-11-20 13:12:00 UTC
selinux-policy-3.13.1-128.21.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-1bbd3df966

Comment 6 Fedora Update System 2015-11-21 17:51:06 UTC
selinux-policy-3.13.1-128.21.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update selinux-policy'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-1bbd3df966

Comment 7 Fedora Update System 2015-11-27 03:52:03 UTC
selinux-policy-3.13.1-128.21.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.