Bug 238609

Summary: Expand adattributiond sandbox slightly to avoid sandbox crashes
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch pvollan: review+

Description Alex Christensen 2022-03-31 08:11:31 PDT
Expand adattributiond sandbox slightly to avoid sandbox crashes
Comment 1 Alex Christensen 2022-03-31 08:12:17 PDT
Created attachment 456238 [details]
Patch
Comment 2 Alex Christensen 2022-03-31 08:12:21 PDT
<rdar://problem/91073280>
Comment 3 Alex Christensen 2022-03-31 08:14:43 PDT
Created attachment 456239 [details]
Patch
Comment 4 Per Arne Vollan 2022-03-31 08:45:20 PDT
Comment on attachment 456239 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=456239&action=review

> Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb.in:151
> +;; Note this does not allow subpaths of "/"
> +(allow file-read*
> +       (literal "/"))
> +

Is there a way to make this more specific? Would allowing file-read-metadata be sufficient?
Comment 5 Alex Christensen 2022-03-31 08:55:48 PDT
No.  file-read-metadata is insufficient.  It needs at least file-read-data and at that point may as well allow file-read*
Comment 6 Alex Christensen 2022-03-31 09:36:53 PDT
We also need file-test-existence
Comment 7 Alex Christensen 2022-03-31 09:42:09 PDT
Created attachment 456249 [details]
Patch
Comment 8 Per Arne Vollan 2022-03-31 10:33:07 PDT
Comment on attachment 456249 [details]
Patch

R=me.
Comment 9 Alex Christensen 2022-03-31 13:55:20 PDT
r292171