Title: [285434] trunk/Source/WebKit
- Revision
- 285434
- Author
- [email protected]
- Date
- 2021-11-08 14:52:36 -0800 (Mon, 08 Nov 2021)
Log Message
[macOS][GPUP] Remove sandbox read access to files
https://bugs.webkit.org/show_bug.cgi?id=232245
<rdar://problem/84617482>
Reviewed by Brent Fulgham.
Based on telemetry, remove sandbox read access to files in the GPU process on macOS.
* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (285433 => 285434)
--- trunk/Source/WebKit/ChangeLog 2021-11-08 22:48:17 UTC (rev 285433)
+++ trunk/Source/WebKit/ChangeLog 2021-11-08 22:52:36 UTC (rev 285434)
@@ -1,3 +1,15 @@
+2021-11-08 Per Arne <[email protected]>
+
+ [macOS][GPUP] Remove sandbox read access to files
+ https://bugs.webkit.org/show_bug.cgi?id=232245
+ <rdar://problem/84617482>
+
+ Reviewed by Brent Fulgham.
+
+ Based on telemetry, remove sandbox read access to files in the GPU process on macOS.
+
+ * GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
+
2021-11-08 Brent Fulgham <[email protected]>
Add additional mach message filter
Modified: trunk/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in (285433 => 285434)
--- trunk/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in 2021-11-08 22:48:17 UTC (rev 285433)
+++ trunk/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in 2021-11-08 22:52:36 UTC (rev 285434)
@@ -46,10 +46,9 @@
(file-mode #o0004)
(subpath "/System")))
-(allow file-read* (with telemetry)
+(allow file-read*
(require-all (file-mode #o0004)
- (require-any (subpath "/Library/Filesystems/NetFSPlugins")
- (subpath "/Library/Apple/System")
+ (require-any
(subpath "/Library/Preferences/Logging") ; Logging Rethink
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 110000
(subpath "/private/var/db/dyld")
@@ -58,12 +57,6 @@
(subpath "/usr/lib")
(subpath "/usr/share"))))
-;;; Allow reading internal profiles on development builds
-(allow file-read* (with telemetry)
- (require-all (file-mode #o0004)
- (subpath "/AppleInternal/Library/Preferences/Logging")
- (system-attribute apple-internal)))
-
;;; Allow mapping of system frameworks + dylibs
(allow file-map-executable (with telemetry)
(subpath "/Library/Apple/System/Library/Frameworks")
@@ -75,23 +68,17 @@
)
(allow file-read-metadata
- (literal "/var"))
-(allow file-read-metadata (with telemetry)
+ (literal "/var")
(literal "/etc")
(literal "/tmp")
(literal "/private/etc/localtime"))
-
;;; Allow access to standard special files.
-(allow file-read* (with telemetry)
- (literal "/dev/autofs_nowait")
+(allow file-read*
(literal "/dev/random")
- (literal "/dev/urandom")
- (literal "/private/etc/master.passwd")
(literal "/private/etc/passwd"))
-(allow file-read*
- file-write-data (with telemetry)
+(allow file-write-data (with telemetry)
(literal "/dev/null")
(literal "/dev/zero"))
@@ -605,30 +592,17 @@
*uuid-pattern*)
;; Read-only preferences and data
-(allow file-read* (with telemetry)
+(allow file-read*
;; Basic system paths
- (subpath "/Library/Dictionaries")
+ (subpath "/Library/Audio/Plug-Ins/HAL")
(subpath "/Library/Fonts")
- (subpath "/Library/Frameworks")
(subpath "/Library/Managed Preferences")
- (subpath "/Library/Speech/Synthesizers")
- (regex #"^/private/etc/(hosts|group|passwd)$")
-
- ;; System and user preferences
- (home-literal "/.CFUserTextEncoding")
-
;; FIXME: This should be removed when <rdar://problem/8957845> is fixed.
- (home-subpath "/Library/Fonts")
+ (home-subpath "/Library/Fonts"))
- (subpath "/Library/Audio/Plug-Ins/HAL")
+(allow file-read-data
+ (literal "/usr/local/lib/log")) ; <rdar://problem/36629495>
- (home-subpath "/Library/Dictionaries"))
-
-(allow file-read-data (with telemetry)
- (literal "/usr/local/lib/log") ; <rdar://problem/36629495>
- ;; Needed for AES3 support
- (subpath "/Library/Audio/Plug-Ins/Components"))
-
;; Preferences support
(shared-preferences-read
"com.apple.Accessibility"
@@ -666,10 +640,6 @@
;; and to allow issuing extensions.
(allow-read-directory-and-issue-read-extensions (param "WEBKIT2_FRAMEWORK_DIR"))
-;; Allow issuing extensions to system libraries that the Network process can already read.
-;; This is to avoid warnings attempting to create extensions for these resources.
-(allow-read-directory-and-issue-read-extensions "/System/Library/PrivateFrameworks/WebInspectorUI.framework")
-
;; Sandbox extensions
(define (apply-read-and-issue-extension op path-filter)
(op file-read* (with telemetry) path-filter)
@@ -776,15 +746,14 @@
(global-name "com.apple.SecurityServer")
(global-name "com.apple.ocspd"))
-(allow file-read* (with telemetry) (subpath "/private/var/db/mds/system")) ;; FIXME: This should be removed when <rdar://problem/9538414> is fixed.
+(allow file-read* (subpath "/private/var/db/mds/system")) ;; FIXME: This should be removed when <rdar://problem/9538414> is fixed.
(with-filter (uid 0)
(allow file-write* (with telemetry)
(subpath "/private/var/db/mds/system")) ;; FIXME: This should be removed when <rdar://problem/9538414> is fixed.
)
-(allow file-read* (with telemetry)
- (subpath "/private/var/db/mds")
- (literal "/private/var/db/DetachedSignatures"))
+(allow file-read*
+ (subpath "/private/var/db/mds"))
(allow ipc-posix-shm-read* ipc-posix-shm-write-data ipc-posix-shm-write-create (with telemetry)
(ipc-posix-name "com.apple.AppleDatabaseChanged"))
@@ -797,8 +766,6 @@
#endif
)
-(allow file-read-data (with telemetry)
- (literal "/dev/autofs_nowait")) ; Used by CF to circumvent automount triggers
(allow ipc-posix-shm (with telemetry)
(ipc-posix-name-prefix "CFPBS:")) ; <rdar://problem/13757475>
(allow system-fsctl (with telemetry) (fsctl-command (_IO "h" 47)))
@@ -822,7 +789,7 @@
)
;; CFNetwork
-(allow file-read-data (with telemetry) (path "/private/var/db/nsurlstoraged/dafsaData.bin"))
+(allow file-read-data (path "/private/var/db/nsurlstoraged/dafsaData.bin"))
#if PLATFORM(MAC)
;; FIXME should be removed when <rdar://problem/9347205> + related radar in Safari is fixed
@@ -853,16 +820,6 @@
(global-name "com.apple.coreservices.appleevents")
(global-name "com.apple.pasteboard.1")
(global-name "com.apple.speech.recognitionserver"))
-#if PLATFORM(MAC)
-;; Also part of unnecessary NSApplication initialization, but we can't block access to these yet, see <rdar://problem/13869765>.
-(allow file-read* (with telemetry)
- (subpath "/Library/Components")
- (subpath "/Library/Keyboard Layouts")
- (subpath "/Library/Input Methods")
- (home-subpath "/Library/Components")
- (home-subpath "/Library/Keyboard Layouts")
- (home-subpath "/Library/Input Methods"))
-#endif
;; AirPlay
(allow mach-lookup
@@ -881,9 +838,6 @@
(global-name "com.apple.coremedia.volumecontroller.xpc")
)
-;; Data Detectors
-(allow file-read* (with telemetry) (subpath "/private/var/db/datadetectors/sys"))
-
#if PLATFORM(MAC)
;; Media capture, utilities
(if (not (defined? 'sbpl-filter?))
@@ -933,7 +887,7 @@
(with-filter (extension "com.apple.webkit.camera")
(shared-preferences-read "com.apple.cmio")
(shared-preferences-read "com.apple.coremedia")
- (allow file-read* (with telemetry) (subpath "/Library/CoreMediaIO/Plug-Ins/DAL"))
+ (allow file-read* (subpath "/Library/CoreMediaIO/Plug-Ins/DAL"))
(allow mach-lookup (with telemetry) (extension "com.apple.app-sandbox.mach"))
(allow mach-lookup (with telemetry)
(global-name "com.apple.cmio.AppleCameraAssistant")
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes