Title: [260974] trunk/Source/WebKit
Revision
260974
Author
bfulg...@apple.com
Date
2020-04-30 16:46:39 -0700 (Thu, 30 Apr 2020)

Log Message

REGRESSION (r260932): ASSERTION FAILED: ok in webkit::SandboxExtension::consumePermanently for 3 tests
https://bugs.webkit.org/show_bug.cgi?id=211253
<rdar://problem/62673727>

Reviewed by Per Arne Vollan.

In r260932 I added an assertion to confirm that a sandbox extension was successfully consumed. This triggered three
test failures because those tests attempt to pass a sandbox extension from the WebContent process to the UIProcess.

After speaking with the Sandbox team, I learned that an unsandboxed program that attempts to consume a valid
sandbox extension will return 0. Sandboxed processes either receive -1 (for error), or a handle representing the
newly added extension (so that it can be removed when no longer needed).

Since the TestWebKitAPI (and WebKitTestRunner) processes are not sandboxed they receive a zero return value here.

We should recognize this as a valid and expected result. We should also consider making some form of sandboxed
driver for WebKit.

* Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtensionImpl::consume): Recognize a 0 handle as valid.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (260973 => 260974)


--- trunk/Source/WebKit/ChangeLog	2020-04-30 23:20:58 UTC (rev 260973)
+++ trunk/Source/WebKit/ChangeLog	2020-04-30 23:46:39 UTC (rev 260974)
@@ -1,3 +1,26 @@
+2020-04-30  Brent Fulgham  <bfulg...@apple.com>
+
+        REGRESSION (r260932): ASSERTION FAILED: ok in webkit::SandboxExtension::consumePermanently for 3 tests
+        https://bugs.webkit.org/show_bug.cgi?id=211253
+        <rdar://problem/62673727>
+
+        Reviewed by Per Arne Vollan.
+
+        In r260932 I added an assertion to confirm that a sandbox extension was successfully consumed. This triggered three
+        test failures because those tests attempt to pass a sandbox extension from the WebContent process to the UIProcess.
+
+        After speaking with the Sandbox team, I learned that an unsandboxed program that attempts to consume a valid
+        sandbox extension will return 0. Sandboxed processes either receive -1 (for error), or a handle representing the
+        newly added extension (so that it can be removed when no longer needed).
+        
+        Since the TestWebKitAPI (and WebKitTestRunner) processes are not sandboxed they receive a zero return value here.
+
+        We should recognize this as a valid and expected result. We should also consider making some form of sandboxed
+        driver for WebKit.
+
+        * Shared/Cocoa/SandboxExtensionCocoa.mm:
+        (WebKit::SandboxExtensionImpl::consume): Recognize a 0 handle as valid.
+
 2020-04-30  Jiewen Tan  <jiewen_...@apple.com>
 
         [WebAuthn] Optimize LocalAuthenticator

Modified: trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm (260973 => 260974)


--- trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm	2020-04-30 23:20:58 UTC (rev 260973)
+++ trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm	2020-04-30 23:46:39 UTC (rev 260974)
@@ -68,7 +68,7 @@
             LOG_ERROR("Could not create a sandbox extension for '%s', errno = %d", m_token, errno);
             return false;
         }
-        return m_handle;
+        return true;
 #endif
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to