[macOS][iOS] Add filter to syscall sandbox rule
[WebKit-https.git] / Source / WebKit / Resources / SandboxProfiles / ios / com.apple.WebKit.WebContent.sb
1 ; Copyright (C) 2010-2019 Apple Inc. All rights reserved.
2 ;
3 ; Redistribution and use in source and binary forms, with or without
4 ; modification, are permitted provided that the following conditions
5 ; are met:
6 ; 1. Redistributions of source code must retain the above copyright
7 ; notice, this list of conditions and the following disclaimer.
8 ; 2. Redistributions in binary form must reproduce the above copyright
9 ; notice, this list of conditions and the following disclaimer in the
10 ; documentation and/or other materials provided with the distribution.
11 ;
12 ; THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
13 ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
14 ; THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 ; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
16 ; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
17 ; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
18 ; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
19 ; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20 ; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21 ; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
22 ; THE POSSIBILITY OF SUCH DAMAGE.
23
24 (version 1)
25 (deny default (with partial-symbolication))
26 (allow system-audit file-read-metadata)
27
28 (import "common.sb")
29
30 (deny mach-lookup (xpc-service-name-prefix ""))
31
32 (deny lsopen)
33
34 ;;;
35 ;;; The following rules were originally contained in 'UIKit-apps.sb'. We are duplicating them here so we can
36 ;;; remove unneeded sandbox extensions.
37 ;;;
38
39 (allow mach-lookup
40     (global-name "com.apple.frontboard.systemappservices")                 ; -[UIViewServiceInterface _createProcessAssertion] -> SBSProcessIDForDisplayIdentifier()
41     (global-name-regex #"^com\.apple\.uikit\.viewservice\..+"))
42
43 ;; Any app could use ubiquity.
44 (ubiquity-client)
45
46 ;; Any app can play audio & movies.
47 (play-audio)
48 (play-media)
49
50 ;; Access to media controls
51 (media-remote)
52
53 (url-translation)
54
55 ;; TextInput framework
56 (allow mach-lookup
57     (global-name "com.apple.TextInput"))
58
59 (mobile-preferences-read "com.apple.da")
60
61 ;; Speak Selection & VoiceOver
62 ;; <rdar://problem/12030530> AX: Sandbox violation with changing Language while VO is on
63 ;; and <rdar://problem/13071747>
64 (mobile-preferences-read
65     "com.apple.SpeakSelection" ; Needed for WebSpeech
66     "com.apple.VoiceOverTouch" ; Needed for non-US english language synthesis
67     "com.apple.voiceservices") ; Ditto
68
69 (allow mach-lookup
70     (global-name "com.apple.audio.AudioComponentRegistrar"))
71
72 (allow mach-register
73     (local-name "com.apple.iphone.axserver")) ; Needed for Application Accessibility
74
75 ;; <rdar://problem/14555119> Access to high quality speech voices
76 ;; Needed for WebSpeech
77 (allow file-read*
78     (home-subpath "/Library/VoiceServices/Assets")
79     (home-subpath "/Library/Assets/com_apple_MobileAsset_VoiceServicesVocalizerVoice"))
80
81 ;; MediaAccessibility (captions)
82 ;; <rdar://problem/12801477>
83 (mobile-preferences-read "com.apple.mediaaccessibility")
84 (allow mach-lookup (global-name "com.apple.accessibility.mediaaccessibilityd"))
85
86 ;; Permit reading assets via MobileAsset framework.
87 (asset-access 'with-media-playback)
88
89 ;; Network Extensions / VPN helper.
90 (allow mach-lookup
91     (global-name "com.apple.nehelper")
92     (global-name "com.apple.nesessionmanager.content-filter")) ;; <rdar://problem/48442387>
93
94 ;; allow 3rd party applications to access nsurlstoraged's top level domain data cache
95 (allow-well-known-system-group-container-literal-read
96     "/systemgroup.com.apple.nsurlstoragedresources/Library/dafsaData.bin")
97
98 ;; Access the keyboards
99 (allow file-read*
100     (home-subpath "/Library/Caches/com.apple.keyboards"))
101
102 ;; <rdar://problem/19525887>
103 (allow mach-lookup (xpc-service-name-regex #"\.apple-extension-service$"))
104 ;; <rdar://problem/31252371>
105 (allow mach-lookup (xpc-service-name-regex #"\.viewservice$"))
106
107 ;; Power logging
108 (allow mach-lookup
109     (global-name "com.apple.powerlog.plxpclogger.xpc")) ;;  <rdar://problem/36442803>
110
111 (mobile-preferences-read
112     "com.apple.EmojiPreferences"
113     ; <rdar://problem/8477596> com.apple.InputModePreferences
114     "com.apple.InputModePreferences"
115     ; <rdar://problem/8206632> Weather(1038) deny file-read-data ~/Library/Preferences/com.apple.keyboard.plist
116     "com.apple.keyboard"
117     ; <rdar://problem/9384085>
118     "com.apple.Preferences"
119     "com.apple.lookup.shared" ; Needed for DataDetector (Spotlight) support
120 )
121
122 ;; Silently deny unnecessary accesses caused by MessageUI framework.
123 ;; This can be removed once <rdar://problem/47038102> is resolved.
124 (deny file-read*
125     (home-literal "/Library/Preferences/com.apple.mobilemail.plist")
126     (with no-log))
127
128 ;; <rdar://problem/12985925> Need read access to /var/mobile/Library/Fonts to all apps
129 (allow file-read*
130     (home-subpath "/Library/Fonts"))
131
132 ;; <rdar://problem/7344719&26323449> LaunchServices app icons
133 (allow file-read*
134     (well-known-system-group-container-subpath "/systemgroup.com.apple.lsd.iconscache"))
135 (allow mach-lookup
136     (xpc-service-name "com.apple.iconservices")
137     (global-name "com.apple.iconservices"))
138
139 ;; Common mach services needed by UIKit.
140 (allow mach-lookup
141     (global-name "com.apple.CARenderServer")
142     (global-name "com.apple.iohideventsystem")
143     (global-name "com.apple.frontboard.systemappservices"))
144
145 ;; <rdar://problem/47268166>
146 (allow mach-lookup (xpc-service-name "com.apple.MTLCompilerService"))
147
148 (allow-preferences-common)
149
150 ;; CoreMotion
151 (mobile-preferences-read "com.apple.CoreMotion")
152
153 ;; CoreMotion’s deviceMotion API
154 (with-filter
155     (require-any
156         (iokit-registry-entry-class "AppleOscarNub")
157         (iokit-registry-entry-class "AppleSPUHIDInterface"))
158     (allow iokit-get-properties
159         (iokit-property "gyro-interrupt-calibration")))
160 (with-filter
161     (iokit-registry-entry-class "IOHIDEventServiceFastPathUserClient")
162     (allow iokit-open)
163     (allow iokit-get-properties iokit-set-properties
164         (iokit-property "interval"
165                         "mode"
166                         "QueueSize"
167                         "useMag"))
168     (allow iokit-get-properties
169         (iokit-property "client")))
170
171 ;; Home Button
172 (with-filter (iokit-registry-entry-class "IOPlatformDevice")
173     (allow iokit-get-properties
174         (iokit-property "home-button-type")))
175
176 ;; Common preferences read by UIKit.
177 (mobile-preferences-read "com.apple.Accessibility"
178     "com.apple.UIKit"
179     "com.apple.WebUI"
180     "com.apple.airplay"
181     "com.apple.avkit"
182     "com.apple.coreanimation"
183     "com.apple.mt"
184     "com.apple.preferences.sounds")
185
186 ;; Silence sandbox violations from apps trying to create the empty plist if it doesn't exist.
187 ;; <rdar://problem/13796537>
188 (deny file-write-create
189     (home-prefix "/Library/Preferences/com.apple.UIKit.plist")
190     (with no-report))
191
192 ;; <rdar://problem/10809394>
193 (deny file-write-create
194     (home-prefix "/Library/Preferences/com.apple.Accessibility.plist")
195     (with no-report))
196
197 ;; <rdar://problem/9404009>
198 (mobile-preferences-read "kCFPreferencesAnyApplication")
199
200 ;; <rdar://problem/12250145>
201 (mobile-preferences-read "com.apple.mediaaccessibility")
202
203 ; Dictionary Services used by UITextFields.
204 ; <rdar://problem/9386926>
205 (allow-create-directory
206     (home-literal "/Library/Caches/com.apple.DictionaryServices"))
207
208 ; <rdar://problem/8548856> Sub-TLF: Sandbox change for apps for read-only access to the dictionary directory/data
209 (allow file-read*
210     ; XXX - /Library ought to be allowed in all UI profiles but isn't (CF, MobileSafari)
211     (subpath "/Library/Dictionaries")
212     (home-subpath "/Library/Dictionaries"))
213
214 ; <rdar://problem/8440231>
215 (allow file-read*
216     (home-literal "/Library/Caches/DateFormats.plist"))
217 ; Silently deny writes when CFData attempts to write to the cache directory.
218 (deny file-write*
219     (home-literal "/Library/Caches/DateFormats.plist")
220     (with no-log))
221
222 ; UIKit-required IOKit nodes.
223 (allow iokit-open
224     (iokit-user-client-class "AppleJPEGDriverUserClient")
225     (iokit-user-client-class "IOSurfaceAcceleratorClient")
226     (iokit-user-client-class "IOSurfaceSendRight")
227     ;; Requires by UIView -> UITextMagnifierRenderer -> UIWindow
228     (iokit-user-client-class "IOSurfaceRootUserClient"))
229
230 (framebuffer-access)
231
232 ;; <rdar://problem/7822790>
233 (mobile-keybag-access)
234
235 ; <rdar://problem/7595408> , <rdar://problem/7643881>
236 (opengl)
237
238 (location-services)
239
240 ; CRCopyRestrictionsDictionary periodically tries to CFPreferencesAppSynchronize com.apple.springboard.plist
241 ; which will attempt to create the plist if it doesn't exist -- from any application.  Only SpringBoard is
242 ; allowed to write its plist; ignore all others, they don't know what they are doing.
243 ; See <rdar://problem/9375027> for sample backtraces.
244 (deny file-write*
245     (home-prefix "/Library/Preferences/com.apple.springboard.plist")
246     (with no-log))
247
248 ;; <rdar://problem/34986314>
249 (mobile-preferences-read "com.apple.indigo")
250
251 ;;;
252 ;;; End UIKit-apps.sb content
253 ;;;
254
255 (deny sysctl*)
256 (allow sysctl-read
257     (sysctl-name
258         "hw.availcpu"
259         "hw.ncpu"
260         "hw.model"
261         "kern.memorystatus_level"
262         "vm.footprint_suspend"))
263
264 (deny iokit-get-properties (with partial-symbolication))
265 (allow iokit-get-properties
266     (iokit-property-regex #"^AAPL,(DisplayPipe|OpenCLdisabled|IOGraphics_LER(|_RegTag_1|_RegTag_0|_Busy_2)|alias-policy|boot-display|display-alias|mux-switch-state|ndrv-dev|primary-display|slot-name)")
267     (iokit-property "APTDevice")
268     (iokit-property "AVCSupported")
269     (iokit-property-regex #"^AppleJPEG(NumCores|Supports(AppleInterchangeFormats|MissingEOI|RSTLogging))")
270     (iokit-property "BaseAddressAlignmentRequirement")
271     (iokit-property-regex #"^DisplayPipe(PlaneBaseAlignment|StrideRequirements)")
272     (iokit-property "HEVCSupported")
273     (iokit-property-regex #"^IOGL(|ES(|Metal))BundleName")
274     (iokit-property "IOGLESDefaultUseMetal")
275     (iokit-property-regex #"IOGVA(BGRAEnc|Codec|EncoderRestricted|Scaler)")
276     (iokit-property "IOClassNameOverride")
277     (iokit-property "IOPlatformUUID")
278     (iokit-property "IOSurfaceAcceleratorCapabilitiesDict")
279     (iokit-property-regex #"^MetalPlugin(Name|ClassName)")
280     (iokit-property "Protocol Characteristics")
281     (iokit-property "artwork-device-subtype")
282     (iokit-property-regex #"(canvas-height|canvas-width)")
283     (iokit-property "class-code")
284     (iokit-property "color-accuracy-index")
285     (iokit-property "device-id")
286     (iokit-property "device-perf-memory-class")
287     (iokit-property "emu")
288     (iokit-property "hdcp-hoover-protocol")
289     (iokit-property "iommu-present")
290     (iokit-property "product-id")
291     (iokit-property "software-behavior")
292     (iokit-property "vendor-id")
293     (iokit-property "ui-pip") ;; <rdar://problem/48867037>
294     (iokit-property "product-description") ;; <rdar://problem/49497788>
295     (iokit-property "artwork-display-gamut") ;; <rdar://problem/49497788>
296     (iokit-property "artwork-scale-factor") ;; <rdar://problem/49497788>
297 )
298
299 ;; Read-only preferences and data
300 (mobile-preferences-read
301     "com.apple.LaunchServices"
302     "com.apple.WebFoundation"
303     "com.apple.mobileipod"
304     "com.apple.avfoundation.frecents" ;; <rdar://problem/33137029>
305     "com.apple.avfoundation.videoperformancehud" ;; <rdar://problem/31594568>
306     "com.apple.voiceservices.logging")
307
308 ;; Sandbox extensions
309 (define (apply-read-and-issue-extension op path-filter)
310     (op file-read* path-filter)
311     (op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read") path-filter)))
312 (define (apply-write-and-issue-extension op path-filter)
313     (op file-write* path-filter)
314     (op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read-write") path-filter)))
315 (define (read-only-and-issue-extensions path-filter)
316     (apply-read-and-issue-extension allow path-filter))
317 (define (read-write-and-issue-extensions path-filter)
318     (apply-read-and-issue-extension allow path-filter)
319     (apply-write-and-issue-extension allow path-filter))
320 (read-only-and-issue-extensions (extension "com.apple.app-sandbox.read"))
321 (read-write-and-issue-extensions (extension "com.apple.app-sandbox.read-write"))
322
323 ;; Access to client's cache folder & re-vending to CFNetwork.
324 ;; FIXME: Remove the webkti specific extension classes <rdar://problem/17755931>
325 (allow file-issue-extension (require-all
326     (extension "com.apple.app-sandbox.read-write")
327     (extension-class "com.apple.nsurlstorage.extension-cache")))
328
329 ;; MediaAccessibility
330 (mobile-preferences-read "com.apple.mediaaccessibility")
331 (mobile-preferences-read-write "com.apple.mediaaccessibility.public")
332
333 ;; Remote Web Inspector
334 (allow mach-lookup
335        (global-name "com.apple.webinspector"))
336
337 ;; Various services required by CFNetwork and other frameworks
338 (allow mach-lookup
339     (global-name "com.apple.PowerManagement.control")
340     (global-name "com.apple.analyticsd"))
341
342 (deny file-write-create (vnode-type SYMLINK))
343 (deny file-read-xattr file-write-xattr (xattr-regex #"^com\.apple\.security\.private\."))
344
345 ;; Allow loading injected bundles.
346 (allow file-map-executable)
347
348 ;; AWD logging
349 (awd-log-directory "com.apple.WebKit.WebContent")
350
351 ;; Allow ManagedPreference access
352 (allow file-read* (literal "/private/var/Managed Preferences/mobile/com.apple.webcontentfilter.plist"))
353
354 (allow file-read-data
355     (literal "/usr/local/lib/log") ; <rdar://problem/36629495>
356 )
357
358 ;; Allow mediaserverd to issue file extensions for the purposes of reading media
359 (allow file-issue-extension (require-all
360     (extension "com.apple.app-sandbox.read")
361     (extension-class "com.apple.mediaserverd.read")))
362
363 ;; Allow CoreMedia to communicate with mediaserverd in order to implement custom media loading
364 (allow mach-lookup
365     (global-name "com.apple.coremedia.customurlloader.xpc"))
366
367 ;; Media capture, microphone access
368 (with-filter (extension "com.apple.webkit.microphone")
369     (allow device-microphone))
370
371 ;; Media capture, camera access
372 (with-filter (extension "com.apple.webkit.camera")
373     (allow user-preference-read
374         (preference-domain "com.apple.coremedia"))
375     (allow file-read* (subpath "/Library/CoreMediaIO/Plug-Ins/DAL"))
376     (allow mach-lookup (extension "com.apple.app-sandbox.mach"))
377     (allow device-camera))
378
379 ;; Support incoming video connections
380 (allow mach-lookup
381     (global-name "com.apple.coremedia.compressionsession")
382     (global-name "com.apple.coremedia.decompressionsession")
383     (global-name "com.apple.coremedia.videoqueue"))
384
385 ;; FIXME: remove the send-signal when this rule is no longer generating crashes.
386 (deny mach-lookup (with send-signal SIGKILL)
387     (global-name "com.apple.backboard.hid.services"))
388
389 (allow mach-lookup (extension "com.apple.webkit.extension.mach"))
390
391 ;; These services have been identified as unused during living-on.
392 ;; This list overrides some definitions above and in common.sb.
393 ;; FIXME: remove overridden rules once the final list has been
394 ;; established, see https://bugs.webkit.org/show_bug.cgi?id=193840
395 (deny mach-lookup
396     (global-name "com.apple.AGXCompilerService")
397     (global-name "com.apple.CoreAuthentication.daemon.libxpc")
398     (global-name "com.apple.FileCoordination")
399     (global-name "com.apple.FileProvider")
400     (global-name "com.apple.Honeybee.event-notify")
401     (global-name "com.apple.MediaPlayer.RemotePlayerService")
402     (global-name "com.apple.ReportCrash.SimulateCrash")
403     (global-name "com.apple.accountsd.accountmanager")
404     (global-name "com.apple.appsupport.cplogd")
405     (global-name "com.apple.assertiond.processassertionconnection")
406     (global-name "com.apple.audio.reporting.xpc")
407     (global-name "com.apple.bird")
408     (global-name "com.apple.bird.token")
409     (global-name "com.apple.cfprefsd.agent")
410     (global-name "com.apple.containermanagerd")
411     (global-name "com.apple.coremedia.assetcacheinspector")
412     (global-name "com.apple.coremedia.audiodeviceclock")
413     (global-name "com.apple.coremedia.audioprocessingtap.xpc")
414     (global-name "com.apple.coremedia.endpointremotecontrolsession.xpc")
415     (global-name "com.apple.coremedia.sandboxserver")
416     (global-name "com.apple.coremedia.videocompositor")
417     (global-name "com.apple.coremedia.visualcontext.xpc")
418     (global-name "com.apple.coreservices.lsuseractivitymanager.xpc")
419     (global-name "com.apple.ctkd.token-client")
420     (global-name "com.apple.cvmsServ")
421     (global-name "com.apple.duetknowledged.activity")
422     (global-name "com.apple.dyld.closured")
423     (global-name "com.apple.gpumemd.source")
424     (global-name "com.apple.hangtracerd")
425     (global-name "com.apple.itunescloudd.xpc")
426     (global-name "com.apple.itunesstored.xpc")
427     (global-name "com.apple.librariand")
428     (global-name "com.apple.locationd.spi")
429     (global-name "com.apple.locationd.synchronous")
430     (global-name "com.apple.lsd")
431     (global-name "com.apple.lsd.advertisingidentifiers")
432     (global-name "com.apple.lsd.icons")
433     (global-name "com.apple.lsd.openurl")
434     (global-name "com.apple.lsdiconservice")
435     (global-name "com.apple.managedconfiguration.profiled.public")
436     (global-name "com.apple.marco")
437     (global-name "com.apple.mediaserverd")
438     (global-name "com.apple.mobile.usermanagerd.xpc")
439     (global-name "com.apple.nesessionmanager")
440     (global-name "com.apple.pegasus")
441     (global-name "com.apple.pluginkit.pkd")
442     (global-name "com.apple.pluginkit.plugin-service")
443     (global-name "com.apple.quicklook.ThumbnailsAgent")
444     (global-name "com.apple.revisiond")
445     (global-name "com.apple.springboard.backgroundappservices")
446     (global-name "com.apple.system.libinfo.muser")
447     (global-name "com.apple.webkit.camera")
448 )
449
450 (when (defined? 'syscall-unix)
451     (deny syscall-unix (with send-signal SIGKILL))
452     (allow syscall-unix
453         (syscall-number SYS_exit)
454         (syscall-number SYS_read)
455         (syscall-number SYS_write)
456         (syscall-number SYS_open)
457         (syscall-number SYS_close)
458         (syscall-number SYS_unlink)
459         (syscall-number SYS_chmod)
460         (syscall-number SYS_getuid)
461         (syscall-number SYS_geteuid)
462         (syscall-number SYS_recvfrom)
463         (syscall-number SYS_getpeername)
464         (syscall-number SYS_access)
465         (syscall-number SYS_dup)
466         (syscall-number SYS_pipe)
467         (syscall-number SYS_getegid)
468         (syscall-number SYS_getgid)
469         (syscall-number SYS_sigprocmask)
470         (syscall-number SYS_sigaltstack)
471         (syscall-number SYS_ioctl)
472         (syscall-number SYS_readlink)
473         (syscall-number SYS_umask)
474         (syscall-number SYS_msync)
475         (syscall-number SYS_munmap)
476         (syscall-number SYS_mprotect)
477         (syscall-number SYS_madvise)
478         (syscall-number SYS_fcntl)
479         (syscall-number SYS_select)
480         (syscall-number SYS_fsync)
481         (syscall-number SYS_setpriority)
482         (syscall-number SYS_socket)
483         (syscall-number SYS_connect)
484         (syscall-number SYS_setsockopt)
485         (syscall-number SYS_gettimeofday)
486         (syscall-number SYS_getrusage)
487         (syscall-number SYS_getsockopt)
488         (syscall-number SYS_writev)
489         (syscall-number SYS_fchmod)
490         (syscall-number SYS_rename)
491         (syscall-number SYS_flock)
492         (syscall-number SYS_sendto)
493         (syscall-number SYS_shutdown)
494         (syscall-number SYS_socketpair)
495         (syscall-number SYS_mkdir)
496         (syscall-number SYS_rmdir)
497         (syscall-number SYS_pread)
498         (syscall-number SYS_pwrite)
499         (syscall-number SYS_csops)
500         (syscall-number SYS_csops_audittoken)
501         (syscall-number SYS_kdebug_trace64)
502         (syscall-number SYS_kdebug_trace)
503         (syscall-number SYS_sigreturn)
504         (syscall-number SYS_pathconf)
505         (syscall-number SYS_getrlimit)
506         (syscall-number SYS_setrlimit)
507         (syscall-number SYS_mmap)
508         (syscall-number SYS_lseek)
509         (syscall-number SYS_ftruncate)
510         (syscall-number SYS_sysctl)
511         (syscall-number SYS_mlock)
512         (syscall-number SYS_munlock)
513         (syscall-number SYS_getattrlist)
514         (syscall-number SYS_getxattr)
515         (syscall-number SYS_fgetxattr)
516         (syscall-number SYS_listxattr)
517         (syscall-number SYS_shm_open)
518         (syscall-number SYS_sem_wait)
519         (syscall-number SYS_sem_post)
520         (syscall-number SYS_sysctlbyname)
521         (syscall-number SYS_psynch_mutexwait)
522         (syscall-number SYS_psynch_mutexdrop)
523         (syscall-number SYS_psynch_cvbroad)
524         (syscall-number SYS_psynch_cvsignal)
525         (syscall-number SYS_psynch_cvwait)
526         (syscall-number SYS_psynch_rw_wrlock)
527         (syscall-number SYS_psynch_rw_unlock)
528         (syscall-number SYS_psynch_cvclrprepost)
529         (syscall-number SYS_process_policy)
530         (syscall-number SYS_issetugid)
531         (syscall-number SYS___pthread_kill)
532         (syscall-number SYS___pthread_sigmask)
533         (syscall-number SYS___disable_threadsignal)
534         (syscall-number SYS___semwait_signal)
535         (syscall-number SYS_proc_info)
536         (syscall-number SYS_stat64)
537         (syscall-number SYS_fstat64)
538         (syscall-number SYS_lstat64)
539         (syscall-number SYS_getdirentries64)
540         (syscall-number SYS_statfs64)
541         (syscall-number SYS_fstatfs64)
542         (syscall-number SYS_getfsstat64)
543         (syscall-number SYS_getaudit_addr)
544         (syscall-number SYS_bsdthread_create)
545         (syscall-number SYS_bsdthread_terminate)
546         (syscall-number SYS_workq_kernreturn)
547         (syscall-number SYS_thread_selfid)
548         (syscall-number SYS_kevent_qos)
549         (syscall-number SYS_kevent_id)
550         (syscall-number SYS___mac_syscall)
551         (syscall-number SYS_read_nocancel)
552         (syscall-number SYS_write_nocancel)
553         (syscall-number SYS_open_nocancel)
554         (syscall-number SYS_close_nocancel)
555         (syscall-number SYS_sendmsg_nocancel)
556         (syscall-number SYS_recvfrom_nocancel)
557         (syscall-number SYS_fcntl_nocancel)
558         (syscall-number SYS_select_nocancel)
559         (syscall-number SYS_connect_nocancel)
560         (syscall-number SYS_sendto_nocancel)
561         (syscall-number SYS_fsgetpath)
562         (syscall-number SYS_fileport_makeport)
563         (syscall-number SYS_guarded_open_np)
564         (syscall-number SYS_guarded_close_np)
565         (syscall-number SYS_change_fdguard_np)
566         (syscall-number SYS_proc_rlimit_control)
567         (syscall-number SYS_connectx)
568         (syscall-number SYS_getattrlistbulk)
569         (syscall-number SYS_openat)
570         (syscall-number SYS_openat_nocancel)
571         (syscall-number SYS_fstatat64)
572         (syscall-number SYS_mkdirat)
573         (syscall-number SYS_bsdthread_ctl)
574         (syscall-number SYS_csrctl)
575         (syscall-number SYS_guarded_pwrite_np)
576         (syscall-number SYS_getentropy)
577         (syscall-number SYS_necp_open)
578         (syscall-number SYS_necp_client_action)
579         (syscall-number SYS_ulock_wait)
580         (syscall-number SYS_ulock_wake)
581         (syscall-number SYS_kdebug_typefilter)
582         (syscall-number SYS_shared_region_check_np)
583         (syscall-number SYS_getpid)
584         (syscall-number SYS_bsdthread_register)
585         (syscall-number SYS_sigaction)
586         (syscall-number SYS_gettid)
587         (syscall-number SYS_workq_open)
588         (syscall-number SYS_chdir)
589         (syscall-number SYS_memorystatus_control)
590         (syscall-number SYS_sem_open)
591         (syscall-number SYS_sem_close)
592         (syscall-number SYS_fsetattrlist)
593         (syscall-number SYS_guarded_open_dprotected_np) ; <rdar://problem/48166729>
594         (syscall-number SYS_mremap_encrypted)
595         (syscall-number SYS_dup2)
596         (syscall-number SYS_fileport_makefd)
597         (syscall-number SYS_os_fault_with_payload)
598         (syscall-number SYS_persona)
599         (syscall-number SYS_work_interval_ctl)
600         (syscall-number SYS_open_dprotected_np)
601         (syscall-number SYS_pread_nocancel)
602         (syscall-number SYS___semwait_signal_nocancel)
603     )
604     (with-filter (system-attribute apple-internal)
605         (allow syscall-unix (syscall-number SYS_kdebug_trace_string)) ;; <rdar://problem/49531420>
606     )
607 )