Bug 1296705 - Constrain WebKitWebProcess
Summary: Constrain WebKitWebProcess
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-07 23:12 UTC by Michael Catanzaro
Modified: 2017-08-08 12:37 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 12:37:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Catanzaro 2016-01-07 23:12:43 UTC
Description of problem: It would be nice if selinux-policy would constrain WebKitWebProcess and WebKitWebProcess2 in a similar manner to how it constrains the Firefox and Chrome plugin processes.

These processes are installed to /usr/libexec/webkit2gtk-4.0/WebKitPluginProcess and /usr/libexec/webkit2gtk-4.0/WebKitPluginProcess2.

Comment 1 Daniel Walsh 2016-01-08 13:29:47 UTC
We have been having a discussion on line about this.  I believe that we should combine the policy for mozilla_plugin_t chrome_sandbox_t into a signel web_plugin_t and then apply it to all webrowser plugins.


What do you guys think?


Michael  we would need to know where to apply the file context associated with WebKitWebProcess2.


To give you an idea of how this is done for chrome and firefox.

grep chrome /etc/selinux/targeted/contexts/files/file_contexts
/opt/google/chrome(/.*)?	system_u:object_r:bin_t:s0
/opt/google/chrome[^/]*/chrome-sandbox	--	system_u:object_r:chrome_sandbox_exec_t:s0
/opt/google/chrome[^/]*/nacl_helper_bootstrap	--	system_u:object_r:chrome_sandbox_nacl_exec_t:s0
/opt/google/chrome/.*\.so	--	system_u:object_r:textrel_shlib_t:s0
/usr/lib/chromium-browser/chrome-sandbox	--	system_u:object_r:chrome_sandbox_exec_t:s0
/opt/google/chrome/nacl_helper_bootstrap	--	system_u:object_r:chrome_sandbox_nacl_exec_t:s0
/usr/lib/chromium-browser/nacl_helper_bootstrap	--	system_u:object_r:chrome_sandbox_nacl_exec_t:s0

grep mozilla_plugin /etc/selinux/targeted/contexts/files/file_contexts
/usr/lib/xulrunner[^/]*/plugin-container	--	system_u:object_r:mozilla_plugin_exec_t:s0
/usr/lib/mozilla/plugins-wrapped(/.*)?	system_u:object_r:mozilla_plugin_rw_t:s0
/usr/lib/nspluginwrapper/npviewer.bin	--	system_u:object_r:mozilla_plugin_exec_t:s0
/usr/bin/nspluginscan	--	system_u:object_r:mozilla_plugin_exec_t:s0
/usr/bin/nspluginviewer	--	system_u:object_r:mozilla_plugin_exec_t:s0
/usr/libexec/WebKitPluginProcess	--	system_u:object_r:mozilla_plugin_exec_t:s0
/usr/lib/firefox/plugin-container	--	system_u:object_r:mozilla_plugin_exec_t:s0
/usr/lib/nspluginwrapper/plugin-config	--	system_u:object_r:mozilla_plugin_config_exec_t:s0

Comment 2 Michael Catanzaro 2016-01-08 15:14:17 UTC
WebKitPluginProcess and WebKitPluginProcess2 handle plugins from the same locations. WebKit checks the plugin for GTK+ symbols before loading it; if there are any GTK+ 2 symbols it launches WebKitPluginProcess2 to handle the plugin, otherwise it uses WebKitPluginProcess (which is linked to GTK+ 3, and would hang if it were to try to open something that is linked to GTK+ 2). So the file context should probably be the same for both of them, correct?

A couple thoughts:

/usr/libexec/WebKitPluginProcess	--	system_u:object_r:mozilla_plugin_exec_t:s0

This is the old location; it no longer exists there, but was moved to /usr/libexec/webkit2gtk-4.0/WebKitPluginProcess. Therefore I guess what we want is:

/usr/libexec/webkit2gtk-4.0/WebKitPluginProcess	--	system_u:object_r:mozilla_plugin_exec_t:s0
/usr/libexec/webkit2gtk-4.0/WebKitPluginProcess2	--	system_u:object_r:mozilla_plugin_exec_t:s0

Also, nspluginwrapper was removed from rawhide, so you probably don't need this rule going forward:

/usr/lib/nspluginwrapper/plugin-config	--	system_u:object_r:mozilla_plugin_config_exec_t:s0

In case it matters, we load plugins from the following locations:

all directories in $MOZ_PLUGIN_PATH
$MOZILLA_HOME/plugins
$HOME/.mozilla/plugins
$HOME/.netscape/plugins
/usr/lib/browser/plugins
/usr/local/lib/mozilla/plugins
/usr/lib/firefox/plugins
/usr/lib64/browser-plugins
/usr/lib/browser-plugins
/usr/lib/mozilla/plugins
/usr/local/netscape/plugins
/opt/mozilla/plugins
/opt/mozilla/lib/plugins
/opt/netscape/plugins
/opt/netscape/communicator/plugins
/usr/lib/netscape/plugins
/usr/lib/netscape/plugins-libc5
/usr/lib/netscape/plugins-libc6
/usr/lib64/netscape/plugins
/usr/lib64/mozilla/plugins
/usr/lib/nsbrowser/plugins
/usr/lib64/nsbrowser/plugins

Comment 3 Rex Dieter 2016-01-15 17:39:05 UTC
Similarly,

qt5-qtwebkit has
/usr/lib(64)/qt5/libexec/QtWebPluginProcess
/usr/lib(64)/qt5/libexec/QtWebProcess

and
qt5-qtwebengine has
/usr/lib(64)/qt5/libexec/QtWebEngineProcess

which could be constrained too (else, we can put that off for another day)

Comment 4 Jan Kurik 2016-02-24 15:44:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 5 Fedora Admin XMLRPC Client 2016-09-27 15:05:56 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora End Of Life 2017-07-25 19:44:24 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2017-08-08 12:37:53 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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