Bug 823100

Summary: SELinux is preventing /usr/bin/polipo from 'name_connect' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: smitna
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:4ac5ead8466dd9e4e17924b47c9f7f301f501cad6a7bc36dad5abd59e84218b3
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-26 03:53:45 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 smitna 2012-05-19 04:47:27 UTC
libreport version: 2.0.8
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.3.5-2.fc16.x86_64
reason:         SELinux is preventing /usr/bin/polipo from 'name_connect' accesses on the tcp_socket .
time:           Sat 19 May 2012 12:46:25 AM EDT

description:
:SELinux is preventing /usr/bin/polipo from 'name_connect' accesses on the tcp_socket .
:
:*****  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 'allow_ypbind'boolean.
:Do
:setsebool -P allow_ypbind 1
:
:*****  Plugin catchall (11.6 confidence) suggests  ***************************
:
:If you believe that polipo should be allowed name_connect 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 polipo /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:polipo_t:s0
:Target Context                system_u:object_r:http_port_t:s0
:Target Objects                 [ tcp_socket ]
:Source                        polipo
:Source Path                   /usr/bin/polipo
:Port                          80
:Host                          (removed)
:Source RPM Packages           polipo-1.0.4.1-6.fc16.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-84.fc16.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.5-2.fc16.x86_64 #1 SMP Tue
:                              May 8 11:24:50 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Sat 19 May 2012 12:43:57 AM EDT
:Last Seen                     Sat 19 May 2012 12:43:57 AM EDT
:Local ID                      099e2c24-0ef1-450e-b914-72f99543fed4
:
:Raw Audit Messages
:type=AVC msg=audit(1337402637.818:415): avc:  denied  { name_connect } for  pid=7556 comm="polipo" dest=80 scontext=system_u:system_r:polipo_t:s0 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket
:
:
:type=SYSCALL msg=audit(1337402637.818:415): arch=x86_64 syscall=connect success=no exit=ENETUNREACH a0=4 a1=7fff67493330 a2=1c a3=57 items=0 ppid=1 pid=7556 auid=4294967295 uid=995 gid=992 euid=995 suid=995 fsuid=995 egid=992 sgid=992 fsgid=992 tty=(none) ses=4294967295 comm=polipo exe=/usr/bin/polipo subj=system_u:system_r:polipo_t:s0 key=(null)
:
:Hash: polipo,polipo_t,http_port_t,tcp_socket,name_connect
:
:audit2allow
:
:#============= polipo_t ==============
:#!!!! This avc can be allowed using the boolean 'allow_ypbind'
:
:allow polipo_t http_port_t:tcp_socket name_connect;
:
:audit2allow -R
:
:#============= polipo_t ==============
:#!!!! This avc can be allowed using the boolean 'allow_ypbind'
:
:allow polipo_t http_port_t:tcp_socket name_connect;
:

Comment 1 Miroslav Grepl 2012-05-21 08:09:03 UTC
Did it happen by default?

Comment 2 Daniel Walsh 2012-05-21 14:20:39 UTC
Or is there a configuration that you changed to get polipo to connect to a web server?

Comment 3 smitna 2012-06-18 14:26:12 UTC
Sorry for the late reply and thank you for the follow up.

I do not recall making any configuration changes to the polipo package.

$ rpm --verify polipo
.M...U...    /var/run/polipo

Comment 4 Dominick Grift 2012-06-18 14:32:43 UTC
# Uncomment this if you want to use a parent proxy:

# parentProxy = "squid.example.org:3128"

# Uncomment this if you want to use a parent SOCKS proxy:

# socksParentProxy = "localhost:9050"
# socksProxyType = socks5

I am not aware of the need for polipo to connect to port 80, Although we probably should give it access to connect to 3128 for squid access? (see above config snippet)

Comment 5 Dominick Grift 2012-06-18 14:34:59 UTC
Actually since its a web caching proxy it makes sense that it connect to tcp:80

I only tested it with Tor.

Comment 6 Miroslav Grepl 2012-06-18 15:39:40 UTC
Fixed in  selinux-policy-3.10.0-132.fc17.noarch

Comment 7 Fedora Update System 2012-07-02 08:48:19 UTC
selinux-policy-3.10.0-90.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-90.fc16

Comment 8 Fedora Update System 2012-07-03 15:50:07 UTC
Package selinux-policy-3.10.0-90.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-90.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10203/selinux-policy-3.10.0-90.fc16
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-07-26 03:53:45 UTC
selinux-policy-3.10.0-90.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.