Bug 773772 - SELinux is preventing /usr/sbin/httpd.worker from 'name_bind' accesses on the tcp_socket .
Summary: SELinux is preventing /usr/sbin/httpd.worker from 'name_bind' accesses on the...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:1a81d33be711d785aa36b72b81a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-12 21:18 UTC by geminic86
Modified: 2012-01-16 17:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-16 17:03:35 UTC
Type: ---


Attachments (Terms of Use)

Description geminic86 2012-01-12 21:18:59 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.0-7.fc16.i686
reason:         SELinux is preventing /usr/sbin/httpd.worker from 'name_bind' accesses on the tcp_socket .
time:           Thu 12 Jan 2012 04:40:11 PM EST

description:
:SELinux is preventing /usr/sbin/httpd.worker from 'name_bind' accesses on the tcp_socket .
:
:*****  Plugin bind_ports (92.2 confidence) suggests  *************************
:
:If you want to allow /usr/sbin/httpd.worker to bind to network port 9830
:Then you need to modify the port type.
:Do
:# semanage port -a -t PORT_TYPE -p tcp 9830
:    where PORT_TYPE is one of the following: ntop_port_t, http_cache_port_t, http_port_t, puppet_port_t, jboss_management_port_t.
:
:*****  Plugin catchall_boolean (7.83 confidence) suggests  *******************
:
:If you want to allow system to run with NIS
:Then you must tell SELinux about this by enabling the 'allow_ypbind' boolean.
:Do
:setsebool -P allow_ypbind 1
:
:*****  Plugin catchall (1.41 confidence) suggests  ***************************
:
:If you believe that httpd.worker should be allowed name_bind access on the  tcp_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 httpd.worker /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:httpd_t:s0
:Target Context                system_u:object_r:unreserved_port_t:s0
:Target Objects                 [ tcp_socket ]
:Source                        httpd.worker
:Source Path                   /usr/sbin/httpd.worker
:Port                          9830
:Host                          (removed)
:Source RPM Packages           httpd-2.2.21-1.fc16
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-71.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.1.0-7.fc16.i686 #1 SMP Tue Nov 1
:                              21:00:16 UTC 2011 i686 i686
:Alert Count                   1
:First Seen                    Thu 12 Jan 2012 04:38:24 PM EST
:Last Seen                     Thu 12 Jan 2012 04:38:24 PM EST
:Local ID                      8cdb2a1c-a180-4d85-b494-f0da81f0f20d
:
:Raw Audit Messages
:type=AVC msg=audit(1326404304.640:568): avc:  denied  { name_bind } for  pid=2762 comm="httpd.worker" src=9830 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket
:
:
:type=SYSCALL msg=audit(1326404304.640:568): arch=i386 syscall=socketcall success=no exit=EACCES a0=2 a1=bf89b260 a2=2ec1fc a3=21f045a8 items=0 ppid=2760 pid=2762 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=httpd.worker exe=/usr/sbin/httpd.worker subj=system_u:system_r:httpd_t:s0 key=(null)
:
:Hash: httpd.worker,httpd_t,unreserved_port_t,tcp_socket,name_bind
:
:audit2allow
:
:#============= httpd_t ==============
:#!!!! This avc can be allowed using the boolean 'allow_ypbind'
:
:allow httpd_t unreserved_port_t:tcp_socket name_bind;
:
:audit2allow -R
:
:#============= httpd_t ==============
:#!!!! This avc can be allowed using the boolean 'allow_ypbind'
:
:allow httpd_t unreserved_port_t:tcp_socket name_bind;
:

Comment 1 Miroslav Grepl 2012-01-16 08:44:59 UTC
Is this a default port for cloud? Does it work with

$ semanage permissive -a httpd_t

Are you getting more AVC msgs?

Comment 2 Daniel Walsh 2012-01-16 17:03:26 UTC
If you actually need apache to listen on this port you would have to use semanage as described in the alert.


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