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

Changeset 285722 in webkit


Ignore:
Timestamp:
Nov 12, 2021, 8:32:32 AM (5 years ago)
Author:
pvollan@apple.com
Message:

[iOS][GPU] Remove access to IOKit classes
https://bugs.webkit.org/show_bug.cgi?id=232344
<rdar://problem/84684751>

Reviewed by Darin Adler.

Based on telemetry, remove access to unused IOKit classes in the GPU process' sandbox on iOS.

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r285721 r285722  
     12021-11-12  Per Arne Vollan <pvollan@apple.com>
     2
     3        [iOS][GPU] Remove access to IOKit classes
     4        https://bugs.webkit.org/show_bug.cgi?id=232344
     5        <rdar://problem/84684751>
     6
     7        Reviewed by Darin Adler.
     8
     9        Based on telemetry, remove access to unused IOKit classes in the GPU process' sandbox on iOS.
     10
     11        * Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
     12
    1132021-11-12  Per Arne  <pvollan@apple.com>
    214
  • trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb

    r285612 r285722  
    6565                (home-literal (string-append "/Library/Preferences/" domain ".plist")))))
    6666        domains))
    67 
    68 (define-once (framebuffer-access)
    69     (allow iokit-open (with telemetry)
    70            (iokit-user-client-class "IOMobileFramebufferUserClient")
    71            (when (defined? 'iokit-external-method)
    72                (apply-message-filter
    73                    (deny (with telemetry)
    74                        iokit-async-external-method
    75                        iokit-external-trap)
    76                    (allow
    77                        iokit-external-method)
    78                )
    79            )
    80     )
    81     (mobile-preferences-read "com.apple.iokit.IOMobileGraphicsFamily"))
    8267
    8368(define-once (asset-access . options)
     
    208193;;;
    209194(define-once (opengl)
    210     ;; Items not seen in testing
    211     (deny iokit-open (with telemetry)
    212            (iokit-connection "IOGPU")
    213            (iokit-user-client-class
    214                 "AGXCommandQueue"
    215                 "AGXDevice"
    216                 "AGXSharedUserClient"
    217                 "IOAccelContext"
    218                 "IOAccelDevice"
    219                 "IOAccelSharedUserClient"
    220                 "IOAccelSubmitter2"
    221                 "IOAccelContext2"
    222                 "IOAccelDevice2"
    223                 "IOAccelSharedUserClient2"))
    224 
    225195    (allow iokit-open (with telemetry)
    226196           (iokit-connection "IOGPU")
     
    306276    (allow iokit-open (with telemetry)
    307277        (iokit-user-client-class "IOSurfaceAcceleratorClient")
    308         (iokit-user-client-class "IOSurfaceSendRight")
    309278        ;; Requires by UIView -> UITextMagnifierRenderer -> UIWindow
    310279        (iokit-user-client-class "IOSurfaceRootUserClient"))
     
    535504    (home-literal "/Library/Caches/DateFormats.plist")
    536505    (with no-log))
    537 
    538 (framebuffer-access)
    539506
    540507; <rdar://problem/7595408> , <rdar://problem/7643881>
     
    689656(deny file-write-create (vnode-type SYMLINK))
    690657(deny file-read-xattr file-write-xattr (xattr-prefix "com.apple.security.private."))
    691 
    692 (allow iokit-open (with telemetry)
    693     (require-all
    694         (extension "com.apple.webkit.extension.iokit")
    695         (iokit-user-client-class
    696             "AGXCommandQueue"
    697             "AGXDevice"
    698             "AGXSharedUserClient"
    699             "IOAccelContext"
    700             "IOAccelDevice"
    701             "IOAccelSharedUserClient"
    702             "IOAccelSubmitter2"
    703             "IOAccelContext2"
    704             "IOAccelDevice2"
    705             "IOAccelSharedUserClient2"
    706         )
    707     )
    708 )
    709658
    710659(deny mach-lookup (with no-log)
Note: See TracChangeset for help on using the changeset viewer.