⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 274231 in webkit


Ignore:
Timestamp:
Mar 10, 2021, 1:07:06 PM (6 years ago)
Author:
pvollan@apple.com
Message:

[iOS] Add additional telemetry to WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=223035
<rdar://75275161>

Reviewed by Geoffrey Garen.

Add additional telemetry to WebContent sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r274228 r274231  
     12021-03-10  Per Arne  <pvollan@apple.com>
     2
     3        [iOS] Add additional telemetry to WebContent sandbox
     4        https://bugs.webkit.org/show_bug.cgi?id=223035
     5        <rdar://75275161>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Add additional telemetry to WebContent sandbox on iOS.
     10
     11        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
     12
    1132021-03-10  Brent Fulgham  <bfulgham@apple.com>
    214
  • trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb

    r273510 r274231  
    501501    (mobile-preferences-read "kCFPreferencesAnyApplication")
    502502    (allow file-read*
    503            (front-user-home-literal "/Library/Preferences/.GlobalPreferences.plist"))
     503           (front-user-home-literal "/Library/Preferences/.GlobalPreferences.plist")
     504           (front-user-home-literal "/Library/Preferences/.GlobalPreferences_m.plist"))
    504505
    505506    (allow file-read*
     
    581582    (literal "/"))
    582583
     584(deny file-read* (with no-report)
     585      (literal "/private/etc/passwd"))
     586
    583587(allow file-read*
    584588       (subpath "/private/var/MobileAsset/PreinstalledAssetsV2/InstallWithOs"))
     
    602606       (ipc-posix-name-prefix "apple.cfprefs."))
    603607 
    604 (deny mach-lookup
    605     (global-name "com.apple.lsd.mapdb"))
     608(deny mach-lookup (with no-report)
     609    (global-name "com.apple.lsd.mapdb")) 
    606610
    607611;; <rdar://problem/12413942>
     
    696700(allow process-info-dirtycontrol (target self))
    697701(allow process-info-rusage (target self))
    698 (allow process-info-codesignature (target self))
    699702
    700703;;;
     
    11671170        (syscall-number SYS_sigprocmask)
    11681171        (syscall-number SYS_sigaltstack)
    1169         (syscall-number SYS_ioctl)
     1172        (syscall-number SYS_ioctl) ;; needed by tcgetattr (TIOCGETA) - debugging
    11701173        (syscall-number SYS_readlink)
    11711174        (syscall-number SYS_umask)
     
    11831186        (syscall-number SYS_gettimeofday)
    11841187        (syscall-number SYS_getrusage)
    1185         (syscall-number SYS_getsockopt)
     1188        (syscall-number SYS_getsockopt) ;; used by libwebrtc
    11861189        (syscall-number SYS_writev)
    11871190        (syscall-number SYS_fchmod)
     
    11951198        (syscall-number SYS_pread)
    11961199        (syscall-number SYS_pwrite)
    1197         (syscall-number SYS_csops)
    1198         (syscall-number SYS_csops_audittoken)
     1200        (syscall-number SYS_csops) ;; used by Corefoundation initialization
     1201        (syscall-number SYS_csops_audittoken) ;; used by WK to get entitlments
    11991202        (syscall-number SYS_kdebug_trace64)
    12001203        (syscall-number SYS_kdebug_trace)
     
    12091212        (syscall-number SYS_mlock)
    12101213        (syscall-number SYS_munlock)
    1211         (syscall-number SYS_getattrlist)
     1214        (syscall-number SYS_getattrlist) ;; xpc_realpath and directory enumeration
    12121215        (syscall-number SYS_getxattr)
    12131216        (syscall-number SYS_fgetxattr)
     
    12651268        (syscall-number SYS_proc_rlimit_control)
    12661269        (syscall-number SYS_connectx)
    1267         (syscall-number SYS_getattrlistbulk)
     1270        (syscall-number SYS_getattrlistbulk) ;; xpc_realpath and directory enumeration
    12681271        (syscall-number SYS_openat)
    12691272        (syscall-number SYS_openat_nocancel)
     
    12891292        (syscall-number SYS_sem_open)
    12901293        (syscall-number SYS_sem_close)
    1291         (syscall-number SYS_fsetattrlist)
     1294        (syscall-number SYS_fsetattrlist) ;; MTLCompilerFSCache::openSync
    12921295        (syscall-number SYS_guarded_open_dprotected_np) ; <rdar://problem/48166729>
    12931296        (syscall-number SYS_mremap_encrypted)
     
    13141317    (if (defined? 'SYS_objc_bp_assist_cfg_np)
    13151318        (allow syscall-unix (syscall-number SYS_objc_bp_assist_cfg_np)))
     1319)
     1320
     1321(when (defined? 'file-ioctl)
     1322    (allow file-ioctl (with telemetry))
     1323    ;; restrict to the two ioctl's /dev/aes_0 needs
     1324    (allow file-ioctl (with telemetry)
     1325       (ioctl-command (_IO "T" 101)) ;; IOAES_GET_INFO
     1326       (ioctl-command (_IO "T" 102))) ;; IOAES_ENCRYPT_DECRYPT
     1327)
     1328
     1329(when (defined? 'socket-ioctl)
     1330    (allow socket-ioctl (with telemetry))
     1331)
     1332
     1333(when (defined? 'system-fcntl)
     1334    (allow system-fcntl (with telemetry))
     1335    (allow system-fcntl
     1336        (fcntl-command F_GETPATH) ;; used by dyld4 and CGFontURLCreate, getcwd (at least)
     1337        (fcntl-command F_ADDFILESIGS_RETURN) ;; ImageLoaderMachO::loadCodeSignature
     1338        (fcntl-command F_CHECK_LV) ;; ImageLoaderMachO::loadCodeSignature
     1339        (fcntl-command F_SPECULATIVE_READ) ;; ImageLoaderMachO::mapSegments
     1340        (fcntl-command F_SETFD) ;; libwebrtc.dylib (no backtrace)
     1341        (fcntl-command F_GETFD) ;; libwebrtc.dylib (no backtrace)
     1342
     1343        (fcntl-command F_SETFL) ;; CMCapture uses when camera is enabled
     1344        (fcntl-command F_SETNOSIGPIPE)) ;; CMCapture uses when camera is enabled
     1345
     1346    (allow system-fcntl
     1347        (fcntl-command F_GETPROTECTIONCLASS))
     1348)
     1349
     1350(when (defined? 'process-codesigning*)
     1351    ;; csops/csops_audittoken
     1352    (allow process-codesigning-status-set (with telemetry))
     1353    (allow process-codesigning-text-offset-get (with telemetry))
     1354    (allow process-codesigning-cdhash-get (with telemetry))
     1355    (allow process-codesigning-blob-get (with telemetry))
     1356    (allow process-codesigning-teamid-get (with telemetry))
     1357    (allow process-codesigning-identity-get (with telemetry)) ;; codeSigningIdentifierForCurrentProcess
     1358    (allow process-codesigning-entitlements-blob-get) ;; WK reading entitlments via SecTaskCopyValueForEntitlement and _getSelfParsedEntitlements (accessibility)
     1359    (allow process-codesigning-status-get) ;; _xpc_get_entitlements
     1360    (deny process-info-codesignature (with no-report)) ;; SecTaskCopyValueForEntitlement - granting this grants all the process-codesign-* checks
     1361)
     1362
     1363(when (not (defined? 'process-codesigning*))
     1364    (allow process-info-codesignature (target self))
     1365)
     1366
     1367(when (defined? 'socket-option-get)
     1368    ;; getsockopt
     1369    (allow socket-option-get (with telemetry))
     1370    (allow socket-option-get
     1371        (socket-option-level SOL_SOCKET)
     1372            (socket-option-name SO_ERROR)) ;; libwebrtc; physical_socket_server.cc, ProcessEvents.  Called with fd=-1, so it fails.  Not technically needed, but the code needs changing
     1373)
     1374
     1375(when (defined? 'socket-option-set)
     1376    ;; setsockopt
     1377    (allow socket-option-set (with telemetry))
    13161378)
    13171379
Note: See TracChangeset for help on using the changeset viewer.