Changeset 229093 in webkit


Ignore:
Timestamp:
Feb 28, 2018 9:17:12 AM (6 years ago)
Author:
Brent Fulgham
Message:

Remove network access from the WebContent process sandbox
https://bugs.webkit.org/show_bug.cgi?id=183192
<rdar://problem/35369115>

Reviewed by Alex Christensen.

Remove the 'system-network', 'allow-network-common', and 'network-client' access from the WebContent process.
That's why we have a Network Process!

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r229081 r229093  
     12018-02-28  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Remove network access from the WebContent process sandbox
     4        https://bugs.webkit.org/show_bug.cgi?id=183192
     5        <rdar://problem/35369115>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Remove the 'system-network', 'allow-network-common', and 'network-client' access from the WebContent process.
     10        That's why we have a Network Process!
     11
     12        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
     13        * WebProcess/com.apple.WebProcess.sb.in:
     14
    1152018-02-27  Tim Horton  <timothy_horton@apple.com>
    216
  • trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb

    r228419 r229093  
    230230    (home-literal "/Library/Caches/com.apple.DictionaryServices"))
    231231
    232 (allow-network-common)
    233 
    234232; <rdar://problem/8548856> Sub-TLF: Sandbox change for apps for read-only access to the dictionary directory/data
    235233(allow file-read*
     
    383381(awd-log-directory "com.apple.WebKit.WebContent")
    384382
    385 (network-client (remote tcp) (remote udp))
    386 
    387383;; Allow ManagedPreference access
    388384(allow file-read* (literal "/private/var/Managed Preferences/mobile/com.apple.webcontentfilter.plist"))
  • trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in

    r228964 r229093  
    1 ; Copyright (C) 2010-2017 Apple Inc. All rights reserved.
     1; Copyright (C) 2010-2018 Apple Inc. All rights reserved.
    22;
    33; Redistribution and use in source and binary forms, with or without
     
    7979    (literal "/dev/dtracehelper"))
    8080
     81#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
    8182(allow network-outbound
    8283    (literal "/private/var/run/asl_input")
    8384    (literal "/private/var/run/syslog"))
    84 
     85#endif
    8586
    8687;;; Allow creation of core dumps.
     
    140141        (iokit-property "ggcs")
    141142        (iokit-property "bgcs")))))
    142 
    143 
    144 ;;; (system-network) - Allow access to the network.
    145 (define (system-network)
    146     (allow file-read*
    147         (literal "/Library/Preferences/com.apple.networkd.plist"))
    148     (allow mach-lookup
    149         (global-name "com.apple.SystemConfiguration.PPPController")
    150         (global-name "com.apple.SystemConfiguration.SCNetworkReachability")
    151         (global-name "com.apple.nehelper")
    152         (global-name "com.apple.networkd")
    153         (global-name "com.apple.nsurlstorage-cache")
    154         (global-name "com.apple.symptomsd")
    155         (global-name "com.apple.usymptomsd"))
    156     (allow network-outbound
    157         (control-name "com.apple.netsrc")
    158         (control-name "com.apple.network.statistics"))
    159     (allow system-socket
    160         (require-all (socket-domain AF_SYSTEM)
    161         (socket-protocol 2)) ; SYSPROTO_CONTROL
    162     (socket-domain AF_ROUTE)))
    163143
    164144;;;
     
    646626
    647627;; Networking
     628#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
    648629(system-network)
    649630(allow network-outbound
     
    651632       (literal "/private/var/run/mDNSResponder")
    652633       (remote tcp))
     634#endif
    653635
    654636#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
     
    663645       (global-name "com.apple.system.logger")
    664646       (global-name "com.apple.system.notification_center"))
     647#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
    665648(allow network-outbound
    666649       (remote udp))
     650#endif
    667651(allow user-preference-read
    668652    (preference-domain
Note: See TracChangeset for help on using the changeset viewer.