This repository has been archived by the owner on Dec 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Current algorithm might be GC dependent #8
Comments
@wjmaclean has come up with a clever solution which is that we can use the information stored in the session history. I'll try to write this up in spec-ese soon. Concurrently, he's working on incorporating it into our Chromium prototype. |
domenic
added a commit
that referenced
this issue
Feb 25, 2020
domenic
added a commit
that referenced
this issue
Feb 25, 2020
domenic
added a commit
that referenced
this issue
Feb 26, 2020
domenic
added a commit
that referenced
this issue
May 1, 2020
domenic
added a commit
that referenced
this issue
May 6, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The current algorithm for choosing an agent cluster key contains the following step:
In an offline conversation @annevk pointed out that this might be GC dependent. In particular, I believe the scenario is something like:
https://example.com/
iframeshttps://example.org/
which does not request OI, and sohttps://example.org/
is site-keyed.https://example.com/
saves a reference to the iframe window, e.g.window.savedFrame = frames[0]
.https://example.com/
removes the iframe from the DOM.https://example.com/
inserts a new iframe, iframe2, forhttps://example.org/
, but the server has been updated so this time it requests OI. However, the BCG'sagent cluster map[Site{https://example.org}]
still contains the realm corresponding towindow.savedFrame
, and that is same-origin withhttps://example.org/
, so this means that the OI request is denied.https://example.com/
has JS code which doeswindow.savedFrame = null
.https://example.com/
removes iframe2 from the DOM.https://example.com/
inserts a new iframe, iframe3, forhttps://example.org/
. Now, whether the BCG'sagent cluster map[Site{https://example.org}]
still contains any realms depends on whether the garbage collector has run and collected theWindow
object that used to be stored inwindow.savedFrame
, so it's unclear whether the OI request will be honored or not.One potential fix here is to only count realms whose documents are currently active. However I think this breaks when bfcache is involved; it would lead to scenarios where it appears fine to origin isolate, but then the user presses the back button and now you have a two same-origin iframes on the page which are in different agent clusters.
Hmm...
The text was updated successfully, but these errors were encountered: