Bug 829477

Summary: SELinux is preventing /usr/lib64/xulrunner-2/plugin-container from 'name_connect' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: Colin J Thomson <colin.thomson>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:9d836eb2f247f47083f24c37d01fa4296c80dc76c6b6ac7a4a590464ee7e7121
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-17 00:03:36 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 Colin J Thomson 2012-06-06 20:59:58 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.0-1.fc17.x86_64
time:           Wed 06 Jun 2012 21:59:19 BST

description:
:SELinux is preventing /usr/lib64/xulrunner-2/plugin-container from 'name_connect' accesses on the tcp_socket .
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that plugin-container 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 plugin-containe /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c
:                              0.c1023
:Target Context                system_u:object_r:ircd_port_t:s0
:Target Objects                 [ tcp_socket ]
:Source                        plugin-containe
:Source Path                   /usr/lib64/xulrunner-2/plugin-container
:Port                          6667
:Host                          (removed)
:Source RPM Packages           xulrunner-13.0-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-128.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.0-1.fc17.x86_64 #1 SMP
:                              Sun Jun 3 06:35:17 UTC 2012 x86_64 x86_64
:Alert Count                   5
:First Seen                    Wed 06 Jun 2012 21:57:09 BST
:Last Seen                     Wed 06 Jun 2012 21:58:40 BST
:Local ID                      e2835bc5-45b2-496b-9677-d46b547a98fc
:
:Raw Audit Messages
:type=AVC msg=audit(1339016320.828:173): avc:  denied  { name_connect } for  pid=16454 comm="plugin-containe" dest=6667 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:ircd_port_t:s0 tclass=tcp_socket
:
:
:type=SYSCALL msg=audit(1339016320.828:173): arch=x86_64 syscall=connect success=no exit=EACCES a0=19 a1=7f66b83a5588 a2=10 a3=7f66a84ff9d0 items=0 ppid=2120 pid=16454 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=1 comm=plugin-containe exe=/usr/lib64/xulrunner-2/plugin-container subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)
:
:Hash: plugin-containe,mozilla_plugin_t,ircd_port_t,tcp_socket,name_connect
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Miroslav Grepl 2012-06-07 13:22:11 UTC
Do you know what you were doing when this happened?

Comment 2 Daniel Walsh 2012-06-07 15:54:28 UTC
I would figure this is some kind of irc chat application and I think we should allow this access.

Fixed in selinux-policy-3.10.0-129.fc17

Comment 3 Colin J Thomson 2012-06-07 16:56:43 UTC
(In reply to comment #1)
> Do you know what you were doing when this happened?

Just watching a live stream on Ustream.tv

Comment 4 Daniel Walsh 2012-06-07 18:58:08 UTC
Strange that it would connect to that port.  Did your video work fine?

Comment 5 Colin J Thomson 2012-06-07 19:09:53 UTC
(In reply to comment #4)
> Strange that it would connect to that port.  Did your video work fine?

It puzzled me, the Video stream worked fine but the chat never, it just sat there "connecting"

Comment 6 Daniel Walsh 2012-06-07 19:11:12 UTC
Ok so we need to allow chat.

You can allow this for now using 

# grep ircd /var/log/audit/audit.log | audit2allow -M mymozilla
# semodule -i mymozilla.pp

Comment 7 Colin J Thomson 2012-06-07 19:42:20 UTC
(In reply to comment #6)
> Ok so we need to allow chat.
> 
> You can allow this for now using 
> 
> # grep ircd /var/log/audit/audit.log | audit2allow -M mymozilla
> # semodule -i mymozilla.pp

OK thanks.. I'll test with selinux-policy-3.10.0-129.fc17 when it appears.

Comment 8 Colin J Thomson 2012-06-08 16:15:53 UTC
I just updated to selinux-policy-3.10.0-129.fc17, the warnings have gone and Ustream chat now works. Thanks..

Comment 9 Daniel Walsh 2012-06-11 14:09:46 UTC
Please update karma when this package becomes available.

Comment 10 Fedora Update System 2012-06-11 21:01:27 UTC
selinux-policy-3.10.0-130.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-130.fc17

Comment 11 Fedora Update System 2012-06-15 23:58:39 UTC
Package selinux-policy-3.10.0-130.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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-130.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-9520/selinux-policy-3.10.0-130.fc17
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2012-06-17 00:03:36 UTC
selinux-policy-3.10.0-130.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.