Bug 214490

Summary: [iOS] Crash under WebProcess::handleXPCEndpointMessages
Product: WebKit Reporter: Per Arne Vollan <pvollan>
Component: WebKit Misc.Assignee: Per Arne Vollan <pvollan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Per Arne Vollan 2020-07-17 11:48:39 PDT
According to crash logs, it seems possible that the parent process XPC connection can be null. Add a null check, and also check that the connection XPC object really is an XPC connection object.
Comment 1 Per Arne Vollan 2020-07-17 11:48:59 PDT
rdar://problem/65717136
Comment 2 Per Arne Vollan 2020-07-17 11:51:39 PDT
Created attachment 404579 [details]
Patch
Comment 3 Chris Dumez 2020-07-17 11:52:20 PDT
Comment on attachment 404579 [details]
Patch

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

> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:177
> +    if (xpc_get_type(connection) != XPC_TYPE_CONNECTION)

I think this should be an assertion.
Comment 4 Per Arne Vollan 2020-07-17 11:57:23 PDT
Created attachment 404580 [details]
Patch
Comment 5 Per Arne Vollan 2020-07-17 11:57:44 PDT
(In reply to Chris Dumez from comment #3)
> Comment on attachment 404579 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=404579&action=review
> 
> > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:177
> > +    if (xpc_get_type(connection) != XPC_TYPE_CONNECTION)
> 
> I think this should be an assertion.

Fixed.

Thanks for reviewing!
Comment 6 Chris Dumez 2020-07-17 11:58:18 PDT
Comment on attachment 404580 [details]
Patch

r=me
Comment 7 EWS 2020-07-17 12:31:00 PDT
Committed r264529: <https://trac.webkit.org/changeset/264529>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404580 [details].