Bug 1109681

Summary: SELinux is preventing /usr/lib64/firefox/plugin-container from 'name_bind' accesses on the udp_socket .
Product: [Fedora] Fedora Reporter: Chris K. <kaspro>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:7beab7e954eb7c0f237de377cdbb88b93b813c0a77f8abefa0ca1c97ae6f86c9
Fixed In Version: selinux-policy-3.12.1-180.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-21 09:46:28 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 Chris K. 2014-06-16 06:35:04 UTC
Description of problem:
This starts to happen with the DNSSEC/TLSA Validator 2.1.1 Plugin for Firefox.
Although not directly related, I suppose it is logical that browsers have certain access to DNS validation - more so in the future. Not sure whether this tool does it right, though...
SELinux is preventing /usr/lib64/firefox/plugin-container from 'name_bind' accesses on the udp_socket .

*****  Plugin bind_ports (54.8 confidence) suggests   ************************

If you want to allow /usr/lib64/firefox/plugin-container to bind to network port 13030
Then you need to modify the port type.
Do
# semanage port -a -t  -p udp 13030

*****  Plugin mozplugger (41.2 confidence) suggests   ************************

If you want to use the plugin package
Then you must turn off SELinux controls on the Firefox plugins.
Do
# setsebool -P unconfined_mozilla_plugin_transition 0

*****  Plugin catchall_boolean (4.84 confidence) suggests   ******************

If you want to allow system to run with NIS
Then you must tell SELinux about this by enabling the 'nis_enabled' boolean.
You can read 'None' man page for more details.
Do
setsebool -P nis_enabled 1

*****  Plugin catchall (1.04 confidence) suggests   **************************

If you believe that plugin-container should be allowed name_bind access on the  udp_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:unreserved_port_t:s0
Target Objects                 [ udp_socket ]
Source                        plugin-containe
Source Path                   /usr/lib64/firefox/plugin-container
Port                          13030
Host                          (removed)
Source RPM Packages           firefox-30.0-4.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-166.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.14.7-200.fc20.x86_64 #1 SMP Wed
                              Jun 11 22:38:05 UTC 2014 x86_64 x86_64
Alert Count                   22269
First Seen                    2014-05-29 20:04:23 CEST
Last Seen                     2014-06-16 08:23:14 CEST
Local ID                      71f04232-f04d-4b27-9022-a7a65234a8a4

Raw Audit Messages
type=AVC msg=audit(1402899794.559:1426): avc:  denied  { name_bind } for  pid=4992 comm="plugin-containe" src=13030 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=udp_socket


type=SYSCALL msg=audit(1402899794.559:1426): arch=x86_64 syscall=bind success=no exit=EACCES a0=16 a1=7ffe2b6b9190 a2=10 a3=7ffe2c07be40 items=0 ppid=3164 pid=4992 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=plugin-containe exe=/usr/lib64/firefox/plugin-container subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: plugin-containe,mozilla_plugin_t,unreserved_port_t,udp_socket,name_bind

Additional info:
reporter:       libreport-2.2.2
hashmarkername: setroubleshoot
kernel:         3.14.7-200.fc20.x86_64
type:           libreport

Potential duplicate: bug 970466

Comment 1 Daniel Walsh 2014-06-17 20:51:16 UTC
Miroslav I am thinking we may want to allow this for can_network?

Comment 3 Fedora Update System 2014-08-13 12:09:08 UTC
selinux-policy-3.12.1-180.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-180.fc20

Comment 4 Fedora Update System 2014-08-16 00:30:29 UTC
Package selinux-policy-3.12.1-180.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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.12.1-180.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-9454/selinux-policy-3.12.1-180.fc20
then log in and leave karma (feedback).

Comment 5 Chris K. 2014-08-19 14:30:04 UTC
The SELinux warning disappeared now - works for me, thanks!

Comment 6 Chris K. 2014-08-21 06:46:57 UTC
After installing the latest updates (I suppose kernel-3.15.10-200.fc20.x86_64 etc.)the SELinux error appears again.
I'm further investigating, please don't close the bug yet, thanks.

Comment 7 Fedora Update System 2014-08-21 09:46:28 UTC
selinux-policy-3.12.1-180.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.