Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 603326 - SELinux is preventing /usr/sbin/httpd "name_bind" access .
SELinux is preventing /usr/sbin/httpd "name_bind" access .
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-06-12 08:08 EDT by Ricky
Modified: 2010-11-03 11:08 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-03 11:08:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ricky 2010-06-12 08:08:24 EDT

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 05:37:32 EDT
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 05:39:13 EDT
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 05:46:18 EDT
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 06:14:04 EDT

(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 06:29:31 EDT
Why does can_network_relay() affect bind()?  I thought it affects only connect().
Comment 6 Miroslav Grepl 2010-06-14 10:23:50 EDT
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.