Bug 220777

Summary: [macOS] The development WebContent XPC service crashes under WebKit::AuxiliaryProcess::initializeSandbox
Product: WebKit Reporter: Per Arne Vollan <pvollan>
Component: WebKit Misc.Assignee: Per Arne Vollan <pvollan>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bfulgham, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Per Arne Vollan 2021-01-20 11:49:31 PST
This happens because the development XPC service does not have the required private entitlement to enable message filtering in the sandbox, and therefore fails to apply the sandbox. The existing runtime switching to enable message filtering based on the presence of the entitlement is not working correctly.
Comment 1 Per Arne Vollan 2021-01-20 11:50:06 PST
<rdar://problem/73382584>
Comment 2 Per Arne Vollan 2021-01-20 12:01:10 PST
Created attachment 417986 [details]
Patch
Comment 3 Per Arne Vollan 2021-01-20 12:51:24 PST
Created attachment 417989 [details]
Patch
Comment 4 Per Arne Vollan 2021-01-20 14:23:47 PST
Created attachment 417996 [details]
Patch
Comment 5 Brent Fulgham 2021-01-21 10:41:44 PST
Comment on attachment 417996 [details]
Patch

r=me
Comment 6 Per Arne Vollan 2021-01-21 11:25:05 PST
(In reply to Brent Fulgham from comment #5)
> Comment on attachment 417996 [details]
> Patch
> 
> r=me

Thanks for reviewing!
Comment 7 EWS 2021-01-21 12:35:10 PST
Committed r271710: <https://trac.webkit.org/changeset/271710>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417996 [details].
Comment 8 Alexey Proskuryakov 2021-01-21 18:31:43 PST
Comment on attachment 417996 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=417996&action=review

> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:-121
> -#if HAVE(SANDBOX_MESSAGE_FILTERING)

I'm surprised by the removal of compile time check. But I guess it's OK given that EWS is green.
Comment 9 Per Arne Vollan 2021-01-25 11:10:00 PST
(In reply to Alexey Proskuryakov from comment #8)
> Comment on attachment 417996 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=417996&action=review
> 
> > Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:-121
> > -#if HAVE(SANDBOX_MESSAGE_FILTERING)
> 
> I'm surprised by the removal of compile time check. But I guess it's OK
> given that EWS is green.

This should now be handled at compile time of the sandbox.

Thanks for reviewing!