WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
208146
[iOS] Issue mach sandbox extensions to the WebContent process for a set of specific services
https://bugs.webkit.org/show_bug.cgi?id=208146
Summary
[iOS] Issue mach sandbox extensions to the WebContent process for a set of sp...
Per Arne Vollan
Reported
2020-02-24 10:50:49 PST
We are still seeing some accesses from the WebContent process to a small set of services. Since we do not currently have backtraces for these accesses, make a speculative patch, where we issue these extension for all apps except Safari.
Attachments
Patch
(14.80 KB, patch)
2020-02-24 11:05 PST
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Patch
(11.22 KB, patch)
2020-02-24 15:27 PST
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Patch
(11.21 KB, patch)
2020-02-27 09:32 PST
,
Per Arne Vollan
commit-queue
: commit-queue-
Details
Formatted Diff
Diff
Patch
(11.21 KB, patch)
2020-02-27 10:03 PST
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Patch
(11.58 KB, patch)
2020-02-27 18:07 PST
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Per Arne Vollan
Comment 1
2020-02-24 11:05:05 PST
Created
attachment 391559
[details]
Patch
Brent Fulgham
Comment 2
2020-02-24 13:24:10 PST
Comment on
attachment 391559
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=391559&action=review
This patch seems to be having build issues. Is this the patch you meant to upload?
> Source/WebKit/Shared/WebProcessCreationParameters.cpp:464 > + parameters.frontboardServicesExtensionHandle = WTFMove(*frontboardServicesExtensionHandle);
I think your life would be easier if you switched to a SandboxExtension::HandleArray for these items.
> Source/WebKit/Shared/WebProcessCreationParameters.h:212 > + Optional<SandboxExtension::Handle> frontboardServicesExtensionHandle;
I think it makes sense to have individual extension handles for things we turn on and off dynamically (like camera/microphone, perhaps), but for things that are based on the linked application we should probably just add them as strings in the WebProcessProxy, and serialize them all in a single SandboxExtension::HandleArray.
> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:365 > + SandboxExtension::createHandleForMachLookup("com.apple.AGXCompilerService", WTF::nullopt, parameters.compilerServiceExtensionHandle);
Much tidier! :-)
> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:374 > + SandboxExtension::createHandleForMachLookup("com.apple.frontboard.systemappservices", WTF::nullopt, parameters.frontboardServicesExtensionHandle);
I think these could make sense as a single SandboxExtension::HandleArray.
Per Arne Vollan
Comment 3
2020-02-24 13:39:01 PST
(In reply to Brent Fulgham from
comment #2
)
> Comment on
attachment 391559
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=391559&action=review
> > This patch seems to be having build issues. Is this the patch you meant to > upload? > > > Source/WebKit/Shared/WebProcessCreationParameters.cpp:464 > > + parameters.frontboardServicesExtensionHandle = WTFMove(*frontboardServicesExtensionHandle); > > I think your life would be easier if you switched to a > SandboxExtension::HandleArray for these items. > > > Source/WebKit/Shared/WebProcessCreationParameters.h:212 > > + Optional<SandboxExtension::Handle> frontboardServicesExtensionHandle; > > I think it makes sense to have individual extension handles for things we > turn on and off dynamically (like camera/microphone, perhaps), but for > things that are based on the linked application we should probably just add > them as strings in the WebProcessProxy, and serialize them all in a single > SandboxExtension::HandleArray. > > > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:365 > > + SandboxExtension::createHandleForMachLookup("com.apple.AGXCompilerService", WTF::nullopt, parameters.compilerServiceExtensionHandle); > > Much tidier! :-) > > > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:374 > > + SandboxExtension::createHandleForMachLookup("com.apple.frontboard.systemappservices", WTF::nullopt, parameters.frontboardServicesExtensionHandle); > > I think these could make sense as a single SandboxExtension::HandleArray.
I will change the patch to use HandleArray. Thanks for reviewing!
Per Arne Vollan
Comment 4
2020-02-24 15:27:55 PST
Created
attachment 391587
[details]
Patch
Brent Fulgham
Comment 5
2020-02-26 13:13:31 PST
Comment on
attachment 391587
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=391587&action=review
Very nice! r=me.
> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:264 > + SandboxExtension::consumePermanently(parameters.dynamicMachExtensionHandles[i]);
Someday we should make a proper iterator interface for SandboxExtension::HandleArray so we can use modern looping.
Per Arne Vollan
Comment 6
2020-02-26 13:15:09 PST
Comment on
attachment 391587
[details]
Patch Thanks for reviewing!
WebKit Commit Bot
Comment 7
2020-02-26 13:38:47 PST
Comment on
attachment 391587
[details]
Patch Clearing flags on attachment: 391587 Committed
r257508
: <
https://trac.webkit.org/changeset/257508
>
WebKit Commit Bot
Comment 8
2020-02-26 13:38:51 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9
2020-02-26 13:39:16 PST
<
rdar://problem/59819320
>
Jacob Uphoff
Comment 10
2020-02-26 16:47:16 PST
Reverted
r257508
for reason: This commit broke the watchos build Committed
r257534
: <
https://trac.webkit.org/changeset/257534
>
Per Arne Vollan
Comment 11
2020-02-27 09:32:37 PST
Created
attachment 391884
[details]
Patch
WebKit Commit Bot
Comment 12
2020-02-27 09:59:15 PST
Comment on
attachment 391884
[details]
Patch Rejecting
attachment 391884
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 391884, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in LayoutTests/ChangeLog contains OOPS!. Full output:
https://webkit-queues.webkit.org/results/13329981
Per Arne Vollan
Comment 13
2020-02-27 10:03:33 PST
Created
attachment 391885
[details]
Patch
WebKit Commit Bot
Comment 14
2020-02-27 10:48:41 PST
Comment on
attachment 391885
[details]
Patch Clearing flags on attachment: 391885 Committed
r257575
: <
https://trac.webkit.org/changeset/257575
>
WebKit Commit Bot
Comment 15
2020-02-27 10:48:43 PST
All reviewed patches have been landed. Closing bug.
Ryan Haddad
Comment 16
2020-02-27 15:39:31 PST
Reverted
r257575
for reason: Broke the watchOS build. Committed
r257593
: <
https://trac.webkit.org/changeset/257593
>
Per Arne Vollan
Comment 17
2020-02-27 18:07:02 PST
Created
attachment 391952
[details]
Patch
WebKit Commit Bot
Comment 18
2020-02-27 18:44:46 PST
Comment on
attachment 391952
[details]
Patch Clearing flags on attachment: 391952 Committed
r257611
: <
https://trac.webkit.org/changeset/257611
>
WebKit Commit Bot
Comment 19
2020-02-27 18:44:47 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug