Changeset 263287 in webkit
- Timestamp:
- Jun 19, 2020, 2:12:16 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (modified) (2 diffs)
-
Shared/WebProcessCreationParameters.cpp (modified) (2 diffs)
-
Shared/WebProcessCreationParameters.h (modified) (1 diff)
-
UIProcess/Cocoa/WebProcessPoolCocoa.mm (modified) (2 diffs)
-
WebProcess/cocoa/WebProcessCocoa.mm (modified) (1 diff)
-
WebProcess/com.apple.WebProcess.sb.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r263285 r263287 1 2020-06-19 Brent Fulgham <bfulgham@apple.com> 2 3 [iOS, macOS] Allow access to the container manager to support Mail InjectedBundle 4 https://bugs.webkit.org/show_bug.cgi?id=213357 5 <rdar://problem/63837247> 6 7 Reviewed by Darin Adler. 8 9 The Mail Injected Bundle requires access to the container manager to support certain OS operations. We do not need 10 this access for web browsing, and should limit this access to this one case. 11 12 This patch creates a dynamic mach extension to the container manager for this single use case. It also denies the 13 non-extension access case with a backtrace so we can see if any other clients are hitting this. 14 15 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: 16 * Shared/WebProcessCreationParameters.cpp: 17 (WebKit::WebProcessCreationParameters::encode const): 18 (WebKit::WebProcessCreationParameters::decode): 19 * Shared/WebProcessCreationParameters.h: 20 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 21 (WebKit::WebProcessPool::platformInitializeWebProcess): 22 * WebProcess/cocoa/WebProcessCocoa.mm: 23 (WebKit::WebProcess::platformInitializeWebProcess): 24 * WebProcess/com.apple.WebProcess.sb.in: 25 1 26 2020-06-19 Andres Gonzalez <andresg_22@apple.com> 2 27 -
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
r262860 r263287 941 941 (with no-log)) 942 942 943 (deny mach-lookup (with telemetry-backtrace) 944 (global-name "com.apple.containermanagerd") 945 ) 946 943 947 (allow mach-lookup 944 948 (require-all … … 947 951 "com.apple.cfprefsd.agent" 948 952 "com.apple.cfprefsd.daemon" 953 "com.apple.containermanagerd" 949 954 "com.apple.diagnosticd" 950 955 "com.apple.iphone.axserver-systemwide" -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
r263094 r263287 162 162 #endif 163 163 164 encoder << containerManagerExtensionHandle; 165 164 166 #if PLATFORM(IOS_FAMILY) 165 167 encoder << diagnosticsExtensionHandles; … … 436 438 #endif 437 439 440 Optional<Optional<SandboxExtension::Handle>> containerManagerExtensionHandle; 441 decoder >> containerManagerExtensionHandle; 442 if (!containerManagerExtensionHandle) 443 return false; 444 parameters.containerManagerExtensionHandle = WTFMove(*containerManagerExtensionHandle); 445 438 446 #if PLATFORM(IOS_FAMILY) 439 447 Optional<SandboxExtension::HandleArray> diagnosticsExtensionHandles; -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
r263094 r263287 206 206 #endif 207 207 208 Optional<SandboxExtension::Handle> containerManagerExtensionHandle; 209 208 210 #if PLATFORM(IOS_FAMILY) 209 211 SandboxExtension::HandleArray diagnosticsExtensionHandles; -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r263061 r263287 293 293 #endif 294 294 295 static bool requiresContainerManagerAccess() 296 { 297 #if PLATFORM(MAC) 298 return WebCore::MacApplication::isAppleMail(); 299 #elif PLATFORM(IOS) 300 return WebCore::IOSApplication::isMobileMail(); 301 #else 302 return false; 303 #endif 304 } 305 306 295 307 void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process, WebProcessCreationParameters& parameters) 296 308 { … … 440 452 #endif 441 453 454 if (requiresContainerManagerAccess()) { 455 SandboxExtension::Handle handle; 456 SandboxExtension::createHandleForMachLookup("com.apple.containermanagerd", WTF::nullopt, handle); 457 parameters.containerManagerExtensionHandle = WTFMove(handle); 458 } 459 442 460 #if PLATFORM(IOS_FAMILY) 443 461 parameters.currentUserInterfaceIdiomIsPad = currentUserInterfaceIdiomIsPad(); -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r262922 r263287 284 284 #endif 285 285 286 if (parameters.containerManagerExtensionHandle) 287 SandboxExtension::consumePermanently(*parameters.containerManagerExtensionHandle); 288 286 289 #if PLATFORM(IOS_FAMILY) 287 290 SandboxExtension::consumePermanently(parameters.diagnosticsExtensionHandles); -
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
r263061 r263287 899 899 (with no-log)) 900 900 901 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 902 (deny mach-lookup (with telemetry-backtrace) 903 (global-name "com.apple.containermanagerd") 904 ) 905 #endif 906 901 907 (allow mach-lookup 902 908 (require-all … … 912 918 "com.apple.cfprefsd.agent" 913 919 "com.apple.cfprefsd.daemon" 920 "com.apple.containermanagerd" 914 921 "com.apple.tccd" 915 922 "com.apple.lsd.mapdb"
Note:
See TracChangeset
for help on using the changeset viewer.