-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider restricting SharedArrayBuffer to same-origin usage #4920
Comments
Because of two different code paths postMessage (MessageChannel and Window are different). It was supported on Window but not on MessageChannel I believe. Check out this WPT test link |
This also affects the Wasm Web API: https://webassembly.github.io/spec/web-api/#serialization. cc @littledan |
I think it would be ideal to fix this as part of #4732 as doing this at a later stage makes rolling this out a much larger compatibility concern. Also, the sooner Chrome can roll this out the better. Is there someone investigating this? (Remember that if |
I think we could do it independently (and earlier). I take it Mozilla is interested; I suspect Chrome is but it'd be best to get some confirmation. @dtapuska, can you take the lead here? |
We would implement this to effectively make less things depend on PSL, yes. (If |
What is the timeline? I can add a use counter and see how many SharedArrayBuffers get transfered in SameSite vs SameOrigin cases. |
That'd be great. Not sure about a timeline, but the longer we leave this the way it is the more likely it is we cannot change it. |
Hmm, this is a little more complicated. Chrome doesn't serialize the origin for message ports because |
@littledan WebAssembly.Module has an agent cluster restriction similar to SharedArrayBuffer. Agent clusters are keyed on sites due to |
I don't think we've had time to add a use counter for this. It requires a bit more code than we first thought. That being said, I think @domenic is leaning towards an explicit opt-in for origin isolation for other reasons, so making SAB same-origin may now be orthogonal to that effort. It may still be worth doing on its own, though. |
Add 3 use counters to track the following usages 1) Different Agent Clusters 2) Same Agent Clusters 3) Same Origin Adds counters for whatwg/html#4920 Change-Id: Ia9aeb1afb1f355790c5dfb549f1e2459d95d98ef Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1925218 Commit-Queue: Dave Tapuska <[email protected]> Reviewed-by: Marijn Kruisselbrink <[email protected]> Reviewed-by: Jeremy Roman <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Cr-Commit-Position: refs/heads/master@{#719379}
I think this is only worth doing if we make the document.domain setter return early at the same time, as proposed in #5122. Otherwise it's a half-measure. So duplicating this into that. (Also, my comments about |
Currently SharedArrayBuffer is limited to an agent cluster, but can be cross-origin (though same-site and same-scheme) within that agent cluster. We should consider restricting it further so it cannot be used cross-site, so that SharedArrayBuffer does not become the new document.domain.
cc @whatwg/security
The text was updated successfully, but these errors were encountered: