RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1545844 - [SELinux] Firefox tabs crashing over X11 forwarding
Summary: [SELinux] Firefox tabs crashing over X11 forwarding
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.4
Hardware: x86_64
OS: Unspecified
low
high
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-15 17:02 UTC by Joe Wright
Modified: 2022-01-05 22:35 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-30 12:19:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Joe Wright 2018-02-15 17:02:07 UTC
Description of problem:
- Firefox tabs will crash when 

Version-Release number of selected component (if applicable):
- firefox-52.6.0-1.el7_4.x86_64
- kernel-3.10.0-693.11.6.el7.x86_64


How reproducible:


Steps to Reproduce:
1. Start VcXsrv on windows
2. Establish the X11 forwarded connection to RHEL with putty
3. Run firefox

Actual results:
- When I start up firefox, the tab crashes.  If I try a new tab and try a url, the tab crashes.

Expected results:
- firefox operates normally

Additional info:

The following appears in the terminal when running firefox over an X11 forwarded session

[user@host ~]$ firefox
[Parent 102400] WARNING: pipe error (37): Connection reset by peer: file /builddir/build/BUILD/firefox-52.6.0/firefox-52.6.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
[Parent 102400] WARNING: pipe error (44): Connection reset by peer: file /builddir/build/BUILD/firefox-52.6.0/firefox-52.6.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
[Parent 102400] WARNING: pipe error (41): Connection reset by peer: file /builddir/build/BUILD/firefox-52.6.0/firefox-52.6.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
[Parent 102400] WARNING: pipe error (40): Connection reset by peer: file /builddir/build/BUILD/firefox-52.6.0/firefox-52.6.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322

###!!! [Parent][RunMessage] Error: Channel error: cannot send/recv

[Parent 102400] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /builddir/build/BUILD/firefox-52.6.0/firefox-52.6.0esr/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 22

###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0085,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv

[Parent 102400] WARNING: pipe error (38): Connection reset by peer: file /builddir/build/BUILD/firefox-52.6.0/firefox-52.6.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
[Parent 102400] WARNING: pipe error (45): Connection reset by peer: file /builddir/build/BUILD/firefox-52.6.0/firefox-52.6.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
[Parent 102400] WARNING: pipe error (43): Connection reset by peer: file /builddir/build/BUILD/firefox-52.6.0/firefox-52.6.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
[Parent 102400] WARNING: pipe error (41): Connection reset by peer: file /builddir/build/BUILD/firefox-52.6.0/firefox-52.6.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
[Parent 102400] WARNING: pipe error (42): Connection reset by peer: file /builddir/build/BUILD/firefox-52.6.0/firefox-52.6.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322

###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0085,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv

We have also attempted to disable multiprocess windows with the following settings:

    browser.tabs.remote.autostart = false
    browser.tabs.remote.autostart.2 = false

Comment 4 Matt Burt 2018-02-27 15:46:41 UTC
Hi Jo,

I just came across something very similar here, and found this bugzilla while looking for a solution.

In our case we found that SELinux was involved. The following command worked for us:-

sudo setsebool mozilla_plugin_can_network_connect=1


Might be worth checking the audit log to see if something similar has happened to you.

Hope this helps,

-- 
Matt

Comment 5 Joe Wright 2018-03-13 21:10:01 UTC
Setting the boolean as provided worked.

-JW

Comment 6 Matt Burt 2018-03-14 09:31:04 UTC
Glad it worked for you Jo.

For the record, I still think this is a bug with the firefox policy. The Boolean is a bit of a blunt instrument, and is allowing more to happen than just Firefox to connect to the X server over TCP. A better solution might be to use a type enforcement rule to just allow firefox to connect to X server ports. Something like this may work:-


require {
    type mozilla_plugin_t;
    type xserver_port_t;
    class tcp_socket { name_connect };
}

allow mozilla_plugin_t xserver_port_t:tcp_socket name_connect;

Comment 8 Zdenek Pytela 2019-08-30 12:19:25 UTC
As already mentioned before, there is the mozilla_plugin_can_network_connect boolean to allow tcp name_connect:

  # semanage boolean -l|grep mozilla_plugin_can_network_connect
mozilla_plugin_can_network_connect (off  ,  off)  Allow mozilla plugin domain to connect to the network using TCP.

There is only one generic allow rule granted with the boolean set on:

  # sesearch -A -b mozilla_plugin_can_network_connect
Found 1 semantic av rules:
   allow mozilla_plugin_t port_type : tcp_socket name_connect ; 

Creating a custom SELinux policy module is recommended in environments where more strict rule is required.

Having said that, this BZ is being closed NOTABUG. Please also note the next Red Hat Enterprise Linux 7 minor release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. If you believe that it still is a bug in SELinux policy, we recommend moving the request to Red Hat Enterprise Linux 8.


Note You need to log in before you can comment on or make changes to this bug.