Bug 603326 - SELinux is preventing /usr/sbin/httpd "name_bind" access .
Summary: SELinux is preventing /usr/sbin/httpd "name_bind" access .
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:1abf6869c9a...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-12 12:08 UTC by Ricky
Modified: 2010-11-03 15:08 UTC (History)
3 users (show)

Clone Of:
Last Closed: 2010-11-03 15:08:43 UTC

Attachments (Terms of Use)

Description Ricky 2010-06-12 12:08:24 UTC

SELinux is preventing /usr/sbin/httpd "name_bind" access .

Detailed Description:

SELinux denied access requested by httpd. It is not expected that this access is
required by httpd 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

Additional Information:

Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:transproxy_port_t:s0
Target Objects                None [ tcp_socket ]
Source                        httpd
Source Path                   /usr/sbin/httpd
Port                          8081
Host                          (removed)
Source RPM Packages           httpd-2.2.15-1.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-23.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) #1
                              SMP Thu May 27 02:56:20 UTC 2010 i686 i686
Alert Count                   2
First Seen                    Fri 11 Jun 2010 10:13:05 PM EST
Last Seen                     Fri 11 Jun 2010 10:13:05 PM EST
Local ID                      2f344b3a-18d0-4092-8aa6-08fc6504cfcc
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1276258385.845:398): avc:  denied  { name_bind } for  pid=5930 comm="httpd" src=8081 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:transproxy_port_t:s0 tclass=tcp_socket

node=(removed) type=SYSCALL msg=audit(1276258385.845:398): arch=40000003 syscall=102 success=no exit=-13 a0=2 a1=bfcd0e80 a2=cca1e4 a3=1ccb078 items=0 ppid=5929 pid=5930 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null)

Hash String generated from  catchall,httpd,httpd_t,transproxy_port_t,tcp_socket,name_bind
audit2allow suggests:

#============= httpd_t ==============
allow httpd_t transproxy_port_t:tcp_socket name_bind;

Comment 1 Miroslav Grepl 2010-06-14 09:37:32 UTC
Would you consider this should be allowed by httpd_can_network_relay?  Or is
this just a random port that you can proxy through httpd?

Comment 2 Miroslav Grepl 2010-06-14 09:39:13 UTC
you can allow it using

# grep httpd_t /var/log/audit/audit.log | audit2allow -M myhttp
# semodule -i myhttp.pp

Comment 3 Joe Orton 2010-06-14 09:46:18 UTC
This is a failed attempt to bind to a "transproxy" port, right?  How will httpd_can_network_relay help?

Comment 4 Miroslav Grepl 2010-06-14 10:14:04 UTC

(In reply to comment #3)
> This is a failed attempt to bind to a "transproxy" port, right? 

> How will
> httpd_can_network_relay help?    

We can add appropriate interface to this boolean which will allow it.

Comment 5 Joe Orton 2010-06-14 10:29:31 UTC
Why does can_network_relay() affect bind()?  I thought it affects only connect().

Comment 6 Miroslav Grepl 2010-06-14 14:23:50 UTC
Yes and I am asking for your opinion whether it should be allowed by httpd_can_network_relay.

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