Title: [263899] trunk/Source/WebKit
Revision
263899
Author
commit-qu...@webkit.org
Date
2020-07-03 08:09:38 -0700 (Fri, 03 Jul 2020)

Log Message

[WPE][GTK] Bubblewrap sandbox should not attempt to bind empty paths
https://bugs.webkit.org/show_bug.cgi?id=202880

Patch by Michael Catanzaro <mcatanz...@gnome.org> on 2020-07-03
Reviewed by Carlos Garcia Campos.

If an empty path is set in LD_LIBRARY_PATH (e.g. /foo::/bar), we wind up passing
--ro-bind-try   --ro-bind-try to bwrap, where the second --ro-bind-try is treated as the
source path to mount, and the next flag we pass gets treated as the destination path. The
web process crashes with this confusing error:

bwrap: Can't create file at /.flatpak-info: Read-only file system

* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::bindIfExists):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (263898 => 263899)


--- trunk/Source/WebKit/ChangeLog	2020-07-03 15:01:18 UTC (rev 263898)
+++ trunk/Source/WebKit/ChangeLog	2020-07-03 15:09:38 UTC (rev 263899)
@@ -1,3 +1,20 @@
+2020-07-03  Michael Catanzaro  <mcatanz...@gnome.org>
+
+        [WPE][GTK] Bubblewrap sandbox should not attempt to bind empty paths
+        https://bugs.webkit.org/show_bug.cgi?id=202880
+
+        Reviewed by Carlos Garcia Campos.
+
+        If an empty path is set in LD_LIBRARY_PATH (e.g. /foo::/bar), we wind up passing
+        --ro-bind-try   --ro-bind-try to bwrap, where the second --ro-bind-try is treated as the
+        source path to mount, and the next flag we pass gets treated as the destination path. The
+        web process crashes with this confusing error:
+
+        bwrap: Can't create file at /.flatpak-info: Read-only file system
+
+        * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
+        (WebKit::bindIfExists):
+
 2020-07-03  Youenn Fablet  <you...@apple.com>
 
         Allow registering VP9 as a VT decoder

Modified: trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp (263898 => 263899)


--- trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp	2020-07-03 15:01:18 UTC (rev 263898)
+++ trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp	2020-07-03 15:09:38 UTC (rev 263899)
@@ -276,7 +276,7 @@
 
 static void bindIfExists(Vector<CString>& args, const char* path, BindFlags bindFlags = BindFlags::ReadOnly)
 {
-    if (!path)
+    if (!path || path[0] == '\0')
         return;
 
     const char* bindType;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to