Bug 209814 - [macOS] Deny mach-lookup access to "com.apple.lsd.mapdb" in sandbox
Summary: [macOS] Deny mach-lookup access to "com.apple.lsd.mapdb" in sandbox
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on: 209861
Blocks:
  Show dependency treegraph
 
Reported: 2020-03-31 09:17 PDT by Per Arne Vollan
Modified: 2020-04-01 15:29 PDT (History)
4 users (show)

See Also:


Attachments
Patch (4.00 KB, patch)
2020-03-31 09:26 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (5.30 KB, patch)
2020-03-31 10:15 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (7.83 KB, patch)
2020-03-31 12:28 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (7.89 KB, patch)
2020-03-31 12:33 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (10.36 KB, patch)
2020-03-31 13:23 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (11.79 KB, patch)
2020-04-01 15:01 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2020-03-31 09:17:51 PDT
The WebContent sandbox should deny mach-lookup access to "com.apple.lsd.mapdb" on macOS.
Comment 1 Per Arne Vollan 2020-03-31 09:26:01 PDT
Created attachment 395048 [details]
Patch
Comment 2 Per Arne Vollan 2020-03-31 10:15:09 PDT
Created attachment 395060 [details]
Patch
Comment 3 Per Arne Vollan 2020-03-31 12:28:56 PDT
Created attachment 395079 [details]
Patch
Comment 4 Radar WebKit Bug Importer 2020-03-31 12:29:25 PDT
<rdar://problem/61119618>
Comment 5 Darin Adler 2020-03-31 12:31:38 PDT
Comment on attachment 395079 [details]
Patch

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

> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:276
> +    // Map Launch Services database

WebKit coding style asks for a "." here.

> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:360
> +#if HAVE(CSCHECKFIXDISABLE)
> +            // _CSCheckFixDisable() needs to be called before checking in with Launch Services.
> +            _CSCheckFixDisable();
> +#endif

Why does’t this belong inside the launchServicesCheckIn function?
Comment 6 Per Arne Vollan 2020-03-31 12:33:26 PDT
Created attachment 395080 [details]
Patch
Comment 7 Per Arne Vollan 2020-03-31 12:52:07 PDT
(In reply to Darin Adler from comment #5)
> Comment on attachment 395079 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=395079&action=review
> 
> > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:276
> > +    // Map Launch Services database
> 
> WebKit coding style asks for a "." here.
> 

Will fix.

> > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:360
> > +#if HAVE(CSCHECKFIXDISABLE)
> > +            // _CSCheckFixDisable() needs to be called before checking in with Launch Services.
> > +            _CSCheckFixDisable();
> > +#endif
> 
> Why does’t this belong inside the launchServicesCheckIn function?

That is a very good point. This would mean all other WebKit processes would get this, but I think that is only a good thing. I will update the patch.

Thanks for reviewing!
Comment 8 Per Arne Vollan 2020-03-31 13:23:20 PDT
Created attachment 395084 [details]
Patch
Comment 9 EWS 2020-03-31 17:45:20 PDT
Committed r259328: <https://trac.webkit.org/changeset/259328>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395084 [details].
Comment 10 WebKit Commit Bot 2020-04-01 09:47:12 PDT
Re-opened since this is blocked by bug 209861
Comment 11 Per Arne Vollan 2020-04-01 15:01:59 PDT
Created attachment 395207 [details]
Patch
Comment 12 EWS 2020-04-01 15:29:25 PDT
Committed r259366: <https://trac.webkit.org/changeset/259366>

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