Skip to content

Fix sandbox compilation error related to empty parameters#24004

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
pvollan:eng/Fix-sandbox-compilation-error-related-to-empty-parameters
Feb 7, 2024
Merged

Fix sandbox compilation error related to empty parameters#24004
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
pvollan:eng/Fix-sandbox-compilation-error-related-to-empty-parameters

Conversation

@pvollan
Copy link
Copy Markdown
Contributor

@pvollan pvollan commented Feb 7, 2024

3fb7287

Fix sandbox compilation error related to empty parameters
https://bugs.webkit.org/show_bug.cgi?id=268916
rdar://88915314

Reviewed by David Kilzer and Brent Fulgham.

On rare occasions, see https://bugs.webkit.org/show_bug.cgi?id=222233 for more details, the sandbox string
parameters provided to the Networking process' sandbox can be empty. This will cause the compilation of the
sandbox to fail, and the Networking process will crash on startup being unable to apply the sandbox. We can
guard against this in the sandbox by checking the string length of the parameters. We already do this for
the GPU process and WebContent process.

* Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

Canonical link: https://commits.webkit.org/274228@main

8196365

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe 🛠 wincairo
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ⏳ 🧪 api-mac ✅ 🧪 api-wpe
🧪 ios-wk2-wpt ✅ 🛠 gtk
🧪 api-ios 🧪 mac-wk2 🧪 gtk-wk2
🛠 tv 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv-sim
✅ 🛠 🧪 merge 🛠 watch
✅ 🛠 watch-sim

@pvollan pvollan requested a review from brentfulgham as a code owner February 7, 2024 15:23
@pvollan pvollan self-assigned this Feb 7, 2024
@pvollan pvollan added the WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). label Feb 7, 2024
@pvollan pvollan requested review from cdumez, ddkilzer and szewai February 7, 2024 15:24
Copy link
Copy Markdown
Contributor

@ddkilzer ddkilzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Feb 7, 2024
@pvollan pvollan removed the merging-blocked Applied to prevent a change from being merged label Feb 7, 2024
@pvollan pvollan force-pushed the eng/Fix-sandbox-compilation-error-related-to-empty-parameters branch from eadab98 to 8196365 Compare February 7, 2024 17:12
@webkit-early-warning-system
Copy link
Copy Markdown
Collaborator

webkit-early-warning-system commented Feb 7, 2024

Copy link
Copy Markdown
Contributor

@brentfulgham brentfulgham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a similar possibility for any of the other sandboxes?
r=me

@pvollan
Copy link
Copy Markdown
Contributor Author

pvollan commented Feb 7, 2024

r=me

Thanks for reviewing!

@pvollan
Copy link
Copy Markdown
Contributor Author

pvollan commented Feb 7, 2024

Do we have a similar possibility for any of the other sandboxes? r=me

That is a good point. This length check is already present in the other sandboxes.

Thanks for reviewing!

@pvollan pvollan added the merge-queue Applied to send a pull request to merge-queue label Feb 7, 2024
https://bugs.webkit.org/show_bug.cgi?id=268916
rdar://88915314

Reviewed by David Kilzer and Brent Fulgham.

On rare occasions, see https://bugs.webkit.org/show_bug.cgi?id=222233 for more details, the sandbox string
parameters provided to the Networking process' sandbox can be empty. This will cause the compilation of the
sandbox to fail, and the Networking process will crash on startup being unable to apply the sandbox. We can
guard against this in the sandbox by checking the string length of the parameters. We already do this for
the GPU process and WebContent process.

* Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

Canonical link: https://commits.webkit.org/274228@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Fix-sandbox-compilation-error-related-to-empty-parameters branch from 8196365 to 3fb7287 Compare February 7, 2024 19:09
@webkit-commit-queue webkit-commit-queue merged commit 3fb7287 into WebKit:main Feb 7, 2024
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 274228@main (3fb7287): https://commits.webkit.org/274228@main

Reviewed commits have been landed. Closing PR #24004 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants