Bug 591928

Summary: SELinux is preventing /bin/hostname "name_bind" access .
Product: [Fedora] Fedora Reporter: Joe Sapp <sapp>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:23db66f838a916233b48cd1790c054f0c867105fd55d8c8acdb9d52ee3a10598
Fixed In Version: selinux-policy-3.6.32-116.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-04 18:58:05 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 Joe Sapp 2010-05-13 13:52:27 UTC
Summary:

SELinux is preventing /bin/hostname "name_bind" access .

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by dnsdomainname. It is not expected that this
access is required by dnsdomainname and this access may signal an intrusion
attempt. It is also possible that the specific version or configuration of the
application is causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                unconfined_u:system_r:hostname_t:s0
Target Context                system_u:object_r:hi_reserved_port_t:s0
Target Objects                None [ udp_socket ]
Source                        dnsdomainname
Source Path                   /bin/hostname
Port                          726
Host                          (removed)
Source RPM Packages           net-tools-1.60-99.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-113.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32.11-99.fc12.x86_64 #1 SMP Mon
                              Apr 5 19:59:38 UTC 2010 x86_64 x86_64
Alert Count                   2
First Seen                    Tue 11 May 2010 09:47:26 AM EDT
Last Seen                     Tue 11 May 2010 09:47:26 AM EDT
Local ID                      4b9edc90-63a7-42f8-bbe9-04227575bff5
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1273585646.640:1192): avc:  denied  { name_bind } for  pid=26838 comm="dnsdomainname" src=726 scontext=unconfined_u:system_r:hostname_t:s0 tcontext=system_u:object_r:hi_reserved_port_t:s0 tclass=udp_socket

node=(removed) type=AVC msg=audit(1273585646.640:1192): avc:  denied  { node_bind } for  pid=26838 comm="dnsdomainname" src=726 scontext=unconfined_u:system_r:hostname_t:s0 tcontext=system_u:object_r:node_t:s0 tclass=udp_socket

node=(removed) type=SYSCALL msg=audit(1273585646.640:1192): arch=c000003e syscall=49 success=yes exit=128 a0=4 a1=7fffbae99480 a2=10 a3=4560 items=0 ppid=26835 pid=26838 auid=62678 uid=62678 gid=23 euid=62678 suid=62678 fsuid=62678 egid=23 sgid=23 fsgid=23 tty=pts0 ses=145 comm="dnsdomainname" exe="/bin/hostname" subj=unconfined_u:system_r:hostname_t:s0 key=(null)



Hash String generated from  catchall,dnsdomainname,hostname_t,hi_reserved_port_t,udp_socket,name_bind
audit2allow suggests:

#============= hostname_t ==============
allow hostname_t hi_reserved_port_t:udp_socket name_bind;
allow hostname_t node_t:udp_socket node_bind;

Comment 1 Daniel Walsh 2010-05-13 14:59:29 UTC
Are you running in an NIS environment?

Comment 2 Joe Sapp 2010-05-13 15:13:36 UTC
Yes, but I don't know more about it than basic configuration of my machine.

Comment 3 Daniel Walsh 2010-05-13 15:27:33 UTC
Miroslav, 

add

optional_policy(`
	nis_use_ypbind(hostname_t)
')

Comment 4 Miroslav Grepl 2010-05-21 11:25:13 UTC
Fixed in selinux-policy-3.6.32-116.fc12

Comment 5 Fedora Update System 2010-05-21 13:52:30 UTC
selinux-policy-3.6.32-116.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-116.fc12

Comment 6 Fedora Update System 2010-05-24 19:34:32 UTC
selinux-policy-3.6.32-116.fc12 has been pushed to the Fedora 12 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 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-116.fc12

Comment 7 Fedora Update System 2010-06-04 18:57:20 UTC
selinux-policy-3.6.32-116.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.