Changeset 141445 in webkit
- Timestamp:
- Jan 31, 2013, 11:05:30 AM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r141442 r141445 1 2013-01-31 Alexey Proskuryakov <ap@apple.com> 2 3 WebProcess sandbox profile overhaul. 4 5 Reviewed by Sam Weinig. 6 7 Moves some rules together by susbystem for easier maintenance. 8 9 Addresses <rdar://problem/9276393>, <rdar://problem/10844321>, <rdar://problem/12408537>, 10 <rdar://problem/12558524>. 11 12 * WebProcess/com.apple.WebProcess.sb.in: 13 1 14 2013-01-31 Simon Hausmann <simon.hausmann@digia.com> 2 15 -
trunk/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in
r141433 r141445 4 4 5 5 (import "system.sb") 6 (import "com.apple.corefoundation.sb")7 8 ;; Distributed notifications, local pasteboard client9 (corefoundation)10 6 11 7 ;; Utility functions for home directory relative path filters … … 25 21 (allow file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read") (subpath path)))))) 26 22 23 #if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070 24 ;; Low level networking. Defined in system.sb on newer OS versions. 25 (define (system-network) 26 (allow file-read* 27 (literal "/Library/Preferences/com.apple.networkd.plist")) 28 (allow mach-lookup 29 (global-name "com.apple.SystemConfiguration.PPPController") ;; FIXME (13121943): Is this necessary? 30 (global-name "com.apple.SystemConfiguration.SCNetworkReachability") 31 (global-name "com.apple.networkd")) 32 (allow network-outbound 33 (control-name "com.apple.netsrc") 34 (control-name "com.apple.network.statistics")) 35 (allow system-socket 36 (require-all (socket-domain AF_SYSTEM) 37 (socket-protocol 2)) ; SYSPROTO_CONTROL 38 (socket-domain AF_ROUTE))) 39 #endif 40 27 41 ;; Read-only preferences and data 28 42 (allow file-read* … … 32 46 (subpath "/Library/Frameworks") 33 47 (subpath "/Library/Managed Preferences") 34 (subpath "/private/var/db/mds")35 (subpath "/private/var/db/DetachedSignatures")36 48 (regex #"^/private/etc/(hosts|group|passwd)$") 37 38 ;; FIXME: This should be removed when <rdar://problem/10479685> is fixed.39 (subpath "/Library/Keychains")40 49 41 50 ;; System and user preferences 42 51 (literal "/Library/Preferences/.GlobalPreferences.plist") 43 (literal "/Library/Preferences/com.apple.crypto.plist")44 (literal "/Library/Preferences/com.apple.networkd.plist")45 (literal "/Library/Preferences/com.apple.security.plist")46 (literal "/Library/Preferences/com.apple.security.common.plist")47 (literal "/Library/Preferences/com.apple.security.revocation.plist")48 52 (regex #"^/Library/Managed Preferences/[^/]+/com\.apple\.networkConnect\.plist$") 49 53 (home-literal "/Library/Preferences/.GlobalPreferences.plist") … … 59 63 (home-literal "/Library/Preferences/com.apple.avfoundation.plist") 60 64 (home-literal "/Library/Preferences/com.apple.coremedia.plist") 61 (home-literal "/Library/Preferences/com.apple.security.plist")62 (home-literal "/Library/Preferences/com.apple.security.revocation.plist")63 (home-literal "/Library/Preferences/com.apple.speech.recognition.AppleSpeechRecognition.prefs.plist")64 (home-literal "/Library/Application Support/SyncServices/Local/ClientsWithChanges/com.apple.Keychain")65 65 (home-regex #"/Library/Preferences/com\.apple\.driver\.(AppleBluetoothMultitouch\.mouse|AppleBluetoothMultitouch\.trackpad|AppleHIDMouse)\.plist$") 66 66 … … 102 102 (allow file* 103 103 (home-regex #"/Library/Preferences/ByHost/com\.apple\.HIToolbox\.") 104 (home-regex #"/Library/Preferences/com\.apple\.WebProcess\.") 105 106 ;; FIXME: This should be removed when <rdar://problem/10479685> is fixed. 107 (home-subpath "/Library/Keychains")) 108 109 ;; Non-user Security mds caches 110 (allow file* 111 (subpath "/private/var/db/mds/system")) 104 (home-regex #"/Library/Preferences/com\.apple\.WebProcess\.")) 112 105 113 106 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 … … 140 133 ;; Various services required by AppKit and other frameworks 141 134 (allow mach-lookup 142 (global-name "com.apple.CoreServices.coreservicesd")143 135 (global-name "com.apple.DiskArbitration.diskarbitrationd") 144 136 (global-name "com.apple.FileCoordination") 145 137 (global-name "com.apple.FontObjectsServer") 146 138 (global-name "com.apple.FontServer") 147 (global-name "com.apple.SecurityServer")148 139 (global-name "com.apple.SystemConfiguration.configd") 149 140 (global-name "com.apple.SystemConfiguration.PPPController") ;; FIXME (13121943): Is this necessary? 150 (global-name "com.apple.SystemConfiguration.SCNetworkReachability")151 141 (global-name "com.apple.audio.VDCAssistant") 152 142 (global-name "com.apple.audio.audiohald") … … 154 144 (global-name "com.apple.cookied") 155 145 (global-name "com.apple.cvmsServ") 156 (global-name "com.apple.networkd")157 146 (global-name "com.apple.dock.server") 158 (global-name "com.apple.ocspd")159 (global-name "com.apple.pasteboard.1")160 147 (global-name "com.apple.system.opendirectoryd.api") 161 148 (global-name "com.apple.tccd") … … 165 152 (global-name "com.apple.cfnetwork.AuthBrokerAgent") 166 153 (global-name "com.apple.PowerManagement.control") 167 (global-name "com.apple.speech.recognitionserver")168 154 169 155 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 170 156 (global-name "com.apple.coreservices.launchservicesd") 171 157 #endif 172 173 ;; FIXME: This should be removed when <rdar://problem/9276393> is fixed. 174 (global-name "com.apple.metadata.mds")) 175 176 (allow system-socket (socket-domain AF_ROUTE)) 177 (allow system-socket (require-all (socket-domain AF_SYSTEM) (socket-protocol 2))) ; SYSPROTO_CONTROL 158 ) 159 160 ;; Security framework 161 (allow mach-lookup 162 (global-name "com.apple.ocspd") 163 (global-name "com.apple.SecurityServer")) 164 (allow file-read* file-write* (home-subpath "/Library/Keychains")) ;; FIXME: This should be removed when <rdar://problem/10479685> is fixed. 165 (allow file-read* 166 (subpath "/Library/Keychains") 167 (subpath "/private/var/db/mds") 168 (literal "/private/var/db/DetachedSignatures") 169 (literal "/Library/Preferences/com.apple.crypto.plist") 170 (literal "/Library/Preferences/com.apple.security.plist") 171 (literal "/Library/Preferences/com.apple.security.common.plist") 172 (literal "/Library/Preferences/com.apple.security.revocation.plist") 173 (home-literal "/Library/Application Support/SyncServices/Local/ClientsWithChanges/com.apple.Keychain") 174 (home-literal "/Library/Preferences/com.apple.security.plist") 175 (home-literal "/Library/Preferences/com.apple.security.revocation.plist")) 176 177 ;; CoreFoundation. We don't import com.apple.corefoundation.sb, because it allows unnecessary access to pasteboard. 178 (allow mach-lookup 179 (global-name-regex #"^com.apple.distributed_notifications") 180 (global-name "com.apple.CoreServices.coreservicesd")) 181 (allow file-read-data 182 (literal "/dev/autofs_nowait")) ; Used by CF to circumvent automount triggers 183 184 ;; Networking 185 (system-network) 178 186 (allow network-outbound 179 ;; Kernel controls180 (control-name "com.apple.network.statistics")181 (control-name "com.apple.netsrc")182 183 187 ;; Local mDNSResponder for DNS, arbitrary outbound TCP 184 188 (literal "/private/var/run/mDNSResponder") 185 189 (remote tcp)) 190 191 ;; Needed for NSAttributedString, <rdar://problem/10844321>. 192 (allow file-read* 193 (home-literal "/Library/Preferences/pbs.plist") 194 (home-literal "/Library/Preferences/com.apple.ServicesMenu.Services.plist")) 195 (allow mach-lookup 196 (global-name "com.apple.pbs.fetch_services")) 186 197 187 198 ;; FIXME should be removed when <rdar://problem/9347205> + related radar in Safari is fixed … … 203 214 (literal "/private/etc/host")) 204 215 216 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 217 (deny file-write-create (vnode-type SYMLINK)) 218 #endif 219 205 220 (deny file-read* file-write* (with no-log) 206 ;; FIXME: Should be removed after <rdar://problem/9422957> is fixed. 207 (home-literal "/Library/Caches/Cache.db") 221 #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1080 222 (home-literal "/Library/Caches/Cache.db") ;; <rdar://problem/9422957> 223 #endif 208 224 209 225 ;; FIXME: Should be removed after <rdar://problem/10463881> is fixed. … … 211 227 (home-literal "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2-journal")) 212 228 229 ;; Deny access needed for unnecessary NSApplication initialization. 230 ;; FIXME: This can be removed once <rdar://problem/13011633> is fixed. 213 231 (deny file-read* (with no-log) 214 ;; FIXME: This should not be necessary once <rdar://problem/13011633> is fixed.232 (home-literal "/Library/Preferences/com.apple.speech.recognition.AppleSpeechRecognition.prefs.plist") 215 233 (subpath "/Library/Components") 216 234 (subpath "/Library/Keyboard Layouts") … … 224 242 #endif 225 243 ) 226 227 244 (deny mach-lookup (with no-log) 228 (global-name "com.apple.coreservices.appleevents")) 245 (global-name "com.apple.coreservices.appleevents") 246 (global-name "com.apple.pasteboard.1") 247 (global-name "com.apple.speech.recognitionserver")) 229 248 230 249 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
Note:
See TracChangeset
for help on using the changeset viewer.