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

Changeset 274266 in webkit


Ignore:
Timestamp:
Mar 10, 2021, 7:48:55 PM (6 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r274231. rdar://problem/75290553

[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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274231 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-611.1.21.1-branch/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-611.1.21.1-branch/Source/WebKit/ChangeLog

    r274107 r274266  
     12021-03-10  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r274231. rdar://problem/75290553
     4
     5    [iOS] Add additional telemetry to WebContent sandbox
     6    https://bugs.webkit.org/show_bug.cgi?id=223035
     7    <rdar://75275161>
     8   
     9    Reviewed by Geoffrey Garen.
     10   
     11    Add additional telemetry to WebContent sandbox on iOS.
     12   
     13    * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
     14   
     15   
     16   
     17    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     18
     19    2021-03-10  Per Arne  <pvollan@apple.com>
     20
     21            [iOS] Add additional telemetry to WebContent sandbox
     22            https://bugs.webkit.org/show_bug.cgi?id=223035
     23            <rdar://75275161>
     24
     25            Reviewed by Geoffrey Garen.
     26
     27            Add additional telemetry to WebContent sandbox on iOS.
     28
     29            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
     30
    1312021-03-08  Russell Epstein  <repstein@apple.com>
    232
  • branches/safari-611.1.21.1-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb

    r271286 r274266  
    504504    (mobile-preferences-read "kCFPreferencesAnyApplication")
    505505    (allow file-read*
    506            (front-user-home-literal "/Library/Preferences/.GlobalPreferences.plist"))
     506           (front-user-home-literal "/Library/Preferences/.GlobalPreferences.plist")
     507           (front-user-home-literal "/Library/Preferences/.GlobalPreferences_m.plist"))
    507508
    508509    (allow file-read*
     
    582583    (literal "/"))
    583584
     585(deny file-read* (with no-report)
     586      (literal "/private/etc/passwd"))
     587
    584588(allow file-read*
    585589       (subpath "/private/var/MobileAsset/PreinstalledAssetsV2/InstallWithOs"))
     
    603607       (ipc-posix-name-prefix "apple.cfprefs."))
    604608 
    605 (deny mach-lookup
    606     (global-name "com.apple.lsd.mapdb"))
     609(deny mach-lookup (with no-report)
     610    (global-name "com.apple.lsd.mapdb")) 
    607611
    608612;; <rdar://problem/12413942>
     
    670674(allow process-info-dirtycontrol (target self))
    671675(allow process-info-rusage (target self))
    672 (allow process-info-codesignature (target self))
    673676
    674677;;;
     
    11271130        (syscall-number SYS_sigprocmask)
    11281131        (syscall-number SYS_sigaltstack)
    1129         (syscall-number SYS_ioctl)
     1132        (syscall-number SYS_ioctl) ;; needed by tcgetattr (TIOCGETA) - debugging
    11301133        (syscall-number SYS_readlink)
    11311134        (syscall-number SYS_umask)
     
    11431146        (syscall-number SYS_gettimeofday)
    11441147        (syscall-number SYS_getrusage)
    1145         (syscall-number SYS_getsockopt)
     1148        (syscall-number SYS_getsockopt) ;; used by libwebrtc
    11461149        (syscall-number SYS_writev)
    11471150        (syscall-number SYS_fchmod)
     
    11551158        (syscall-number SYS_pread)
    11561159        (syscall-number SYS_pwrite)
    1157         (syscall-number SYS_csops)
    1158         (syscall-number SYS_csops_audittoken)
     1160        (syscall-number SYS_csops) ;; used by Corefoundation initialization
     1161        (syscall-number SYS_csops_audittoken) ;; used by WK to get entitlments
    11591162        (syscall-number SYS_kdebug_trace64)
    11601163        (syscall-number SYS_kdebug_trace)
     
    11691172        (syscall-number SYS_mlock)
    11701173        (syscall-number SYS_munlock)
    1171         (syscall-number SYS_getattrlist)
     1174        (syscall-number SYS_getattrlist) ;; xpc_realpath and directory enumeration
    11721175        (syscall-number SYS_getxattr)
    11731176        (syscall-number SYS_fgetxattr)
     
    12251228        (syscall-number SYS_proc_rlimit_control)
    12261229        (syscall-number SYS_connectx)
    1227         (syscall-number SYS_getattrlistbulk)
     1230        (syscall-number SYS_getattrlistbulk) ;; xpc_realpath and directory enumeration
    12281231        (syscall-number SYS_openat)
    12291232        (syscall-number SYS_openat_nocancel)
     
    12491252        (syscall-number SYS_sem_open)
    12501253        (syscall-number SYS_sem_close)
    1251         (syscall-number SYS_fsetattrlist)
     1254        (syscall-number SYS_fsetattrlist) ;; MTLCompilerFSCache::openSync
    12521255        (syscall-number SYS_guarded_open_dprotected_np) ; <rdar://problem/48166729>
    12531256        (syscall-number SYS_mremap_encrypted)
     
    12741277    (if (defined? 'SYS_objc_bp_assist_cfg_np)
    12751278        (allow syscall-unix (syscall-number SYS_objc_bp_assist_cfg_np)))
     1279)
     1280
     1281(when (defined? 'file-ioctl)
     1282    (allow file-ioctl (with telemetry))
     1283    ;; restrict to the two ioctl's /dev/aes_0 needs
     1284    (allow file-ioctl (with telemetry)
     1285       (ioctl-command (_IO "T" 101)) ;; IOAES_GET_INFO
     1286       (ioctl-command (_IO "T" 102))) ;; IOAES_ENCRYPT_DECRYPT
     1287)
     1288
     1289(when (defined? 'socket-ioctl)
     1290    (allow socket-ioctl (with telemetry))
     1291)
     1292
     1293(when (defined? 'system-fcntl)
     1294    (allow system-fcntl (with telemetry))
     1295    (allow system-fcntl
     1296        (fcntl-command F_GETPATH) ;; used by dyld4 and CGFontURLCreate, getcwd (at least)
     1297        (fcntl-command F_ADDFILESIGS_RETURN) ;; ImageLoaderMachO::loadCodeSignature
     1298        (fcntl-command F_CHECK_LV) ;; ImageLoaderMachO::loadCodeSignature
     1299        (fcntl-command F_SPECULATIVE_READ) ;; ImageLoaderMachO::mapSegments
     1300        (fcntl-command F_SETFD) ;; libwebrtc.dylib (no backtrace)
     1301        (fcntl-command F_GETFD) ;; libwebrtc.dylib (no backtrace)
     1302
     1303        (fcntl-command F_SETFL) ;; CMCapture uses when camera is enabled
     1304        (fcntl-command F_SETNOSIGPIPE)) ;; CMCapture uses when camera is enabled
     1305
     1306    (allow system-fcntl
     1307        (fcntl-command F_GETPROTECTIONCLASS))
     1308)
     1309
     1310(when (defined? 'process-codesigning*)
     1311    ;; csops/csops_audittoken
     1312    (allow process-codesigning-status-set (with telemetry))
     1313    (allow process-codesigning-text-offset-get (with telemetry))
     1314    (allow process-codesigning-cdhash-get (with telemetry))
     1315    (allow process-codesigning-blob-get (with telemetry))
     1316    (allow process-codesigning-teamid-get (with telemetry))
     1317    (allow process-codesigning-identity-get (with telemetry)) ;; codeSigningIdentifierForCurrentProcess
     1318    (allow process-codesigning-entitlements-blob-get) ;; WK reading entitlments via SecTaskCopyValueForEntitlement and _getSelfParsedEntitlements (accessibility)
     1319    (allow process-codesigning-status-get) ;; _xpc_get_entitlements
     1320    (deny process-info-codesignature (with no-report)) ;; SecTaskCopyValueForEntitlement - granting this grants all the process-codesign-* checks
     1321)
     1322
     1323(when (not (defined? 'process-codesigning*))
     1324    (allow process-info-codesignature (target self))
     1325)
     1326
     1327(when (defined? 'socket-option-get)
     1328    ;; getsockopt
     1329    (allow socket-option-get (with telemetry))
     1330    (allow socket-option-get
     1331        (socket-option-level SOL_SOCKET)
     1332            (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
     1333)
     1334
     1335(when (defined? 'socket-option-set)
     1336    ;; setsockopt
     1337    (allow socket-option-set (with telemetry))
    12761338)
    12771339
Note: See TracChangeset for help on using the changeset viewer.