Bug 878395

Summary: SELinux is preventing /usr/lib64/firefox/firefox from 'name_connect' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: Amit Shah <amit.shah>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: amit.shah, dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:173572ee89f5a8a09d612fde055ea8f6dbe0b0c2ed60b1c9b516da631b0b69e0
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-07 04:32:17 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:
Attachments:
Description Flags
File: type
none
File: hashmarkername none

Description Amit Shah 2012-11-20 11:00:46 UTC
Description of problem:
Start firefox in a sandbox, this avc pops up.

Additional info:
libreport version: 2.0.17
kernel:         3.6.6-3.fc18.x86_64

description:
:SELinux is preventing /usr/lib64/firefox/firefox from 'name_connect' accesses on the tcp_socket .
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that firefox 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 536F636B657420546872656164 /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:unconfined_r:sandbox_web_client_t:s0:
:                              c734,c936
:Target Context                system_u:object_r:tor_socks_port_t:s0
:Target Objects                 [ tcp_socket ]
:Source                        536F636B657420546872656164
:Source Path                   /usr/lib64/firefox/firefox
:Port                          9050
:Host                          (removed)
:Source RPM Packages           firefox-16.0.2-1.fc18.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.11.1-50.fc18.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.6-3.fc18.x86_64 #1 SMP Mon Nov
:                              5 16:26:34 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    2012-11-20 16:29:23 IST
:Last Seen                     2012-11-20 16:29:23 IST
:Local ID                      4dddfb88-8dce-4dc3-a3ab-85c1a799a6d2
:
:Raw Audit Messages
:type=AVC msg=audit(1353409163.949:155): avc:  denied  { name_connect } for  pid=6488 comm=536F636B657420546872656164 dest=9050 scontext=unconfined_u:unconfined_r:sandbox_web_client_t:s0:c734,c936 tcontext=system_u:object_r:tor_socks_port_t:s0 tclass=tcp_socket
:
:
:type=SYSCALL msg=audit(1353409163.949:155): arch=x86_64 syscall=connect success=no exit=EACCES a0=1f a1=7f7c4f6e8468 a2=10 a3=1 items=0 ppid=6457 pid=6488 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=536F636B657420546872656164 exe=/usr/lib64/firefox/firefox subj=unconfined_u:unconfined_r:sandbox_web_client_t:s0:c734,c936 key=(null)
:
:Hash: 536F636B657420546872656164,sandbox_web_client_t,tor_socks_port_t,tcp_socket,name_connect
:
:audit2allow
:
:#============= sandbox_web_client_t ==============
:allow sandbox_web_client_t tor_socks_port_t:tcp_socket name_connect;
:
:audit2allow -R
:
:#============= sandbox_web_client_t ==============
:allow sandbox_web_client_t tor_socks_port_t:tcp_socket name_connect;
:

Comment 1 Amit Shah 2012-11-20 11:00:50 UTC
Created attachment 648385 [details]
File: type

Comment 2 Amit Shah 2012-11-20 11:00:53 UTC
Created attachment 648386 [details]
File: hashmarkername

Comment 3 Amit Shah 2012-11-20 19:26:46 UTC
Start firefox in a sandbox with a persistent home directory

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 4 Miroslav Grepl 2012-11-26 15:49:03 UTC
It has been added.

Comment 5 Miroslav Grepl 2012-11-26 15:49:21 UTC
commit 74f4902986ebf5bcd2f8a04da0cd8ff71021e088
Author: Dan Walsh <dwalsh>
Date:   Wed Nov 21 08:51:56 2012 -0500

    Allow web apps to connect to tor ports

Comment 6 Fedora Update System 2012-11-28 20:58:42 UTC
selinux-policy-3.11.1-57.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-57.fc18

Comment 7 Fedora Update System 2012-11-30 06:37:11 UTC
Package selinux-policy-3.11.1-57.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-57.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-57.fc18
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-12-02 19:31:08 UTC
Package selinux-policy-3.11.1-59.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-59.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-59.fc18
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-12-06 20:13:46 UTC
Package selinux-policy-3.11.1-60.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-60.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-60.fc18
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2012-12-07 04:32:19 UTC
selinux-policy-3.11.1-60.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.