ThirdPartyUtil doesn't properly determine thirdpartyness for channels initiated by a sandboxed context
Categories
(Core :: Privacy: Anti-Tracking, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox136 | --- | fixed |
People
(Reporter: timhuang, Assigned: timhuang)
References
(Blocks 1 open bug)
Details
Attachments
(11 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Currently, we don't properly determine the thirdPartyness for channels initiated by a sandboxed context. There are two cases here.
- The channel initiated by the top-level sandboxed context
In this case, we currently treat the channel as a third party because the top-level sandboxed context uses a null principal. So, any request from it will be considered a third-party request. However, we should consider channels as first-party if they are supposed to inherit the principal from the sandboxed context. - The channel initiated by an sandboxed iframe
In this case, we should treat the channel as a third party because the sandboxed iframe is supposed to be considered foreign. But we don't correctly apply the foreign bit in our storage access implementation.
| Assignee | ||
Comment 1•1 year ago
|
||
The patch changes the ThirdPartyUtil::IsThirdPartyWindow() and
ThirdPartyUtil::IsThirdPartyGlobal() to consider the sandbox flags when
doing the third-party checks.
| Assignee | ||
Comment 2•1 year ago
|
||
Depends on D230817
| Assignee | ||
Comment 3•1 year ago
|
||
The loading principal of any requets that is comming from a top-level
sandboxed context will be a null principal. So, they will be treated as
third-party because a null principal is always consider third-party to
other principals.
However, we need to consider the base domain of the requests. We should
treat the channel as first-party in this case if the channel is comming
from the same base domain as the top-level sandboxed context.
In this patch, we use the precursor principal of the null principal to
check if their base domains match.
Depends on D230818
| Assignee | ||
Comment 4•1 year ago
|
||
Depends on D230819
| Assignee | ||
Comment 5•1 year ago
|
||
We didn't consider sandboxed flags in
AntiTrackingUtils::IsThirdPartyDocument() check. So, it would
incorrectly consider a sandboxed iframe first party.
This patch fixes this issue.
Depends on D230820
| Assignee | ||
Comment 6•1 year ago
|
||
Currently, we replace the values in the merging cookieJarSettings to
merge two cookieJarSettings. This behavior could change
cookieJarSettings that shouldn't be change becasue cookieJarSettings is
passed by pointers.
For example, the partitionKey of the worker private's cookieJarSettings
will be changed after calling importScripts() in ABA context.
To avoid this, this patch changes the merging behavior. The Merge()
function will create a new cookieJarSettings to merge. So we don't change the
existing one.
Depends on D231313
Updated•1 year ago
|
| Assignee | ||
Comment 7•1 year ago
|
||
Depends on D231314
| Assignee | ||
Comment 8•1 year ago
|
||
Depends on D232631
| Assignee | ||
Comment 9•1 year ago
|
||
We are now using a partitionKey created from a null principal if the
top-level context is sandboxed. Because every null principal is unique,
so setting cookies under this partitionKey will end up with cookies that
we cannot delete.
To avoid creating dangling cookies like this, we enforece session
cookies if they are created under a null prinicpal partition key.
Depends on D232632
| Assignee | ||
Comment 10•1 year ago
|
||
We need to update this test because the way we compute the partitionKey
for top-level blob URL is changed. Previously, the blob URL doesn't go
through the Http Channel, so the partitionKey won't be populated.
After we recompute the partitionKey in top-level document, now we
populate the partitionKey according to the document's principal. This
changes breaks this test in xorigin test because the blob url created
under the top-level xorigin domain can no longer be resolved under
top-level mochitest domain.
To fix this test, we create the blob url directly in the mochitest
window, so the blob url can be resolved.
Depends on D232633
Comment 11•1 year ago
|
||
Comment 12•1 year ago
|
||
Backed out for causing mochitest failures @ test_iframe_sandbox_popups_inheritance.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/f3e32ec71fc520fb6802b4ae6ca1363dc21f9bb8
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Comment 13•1 year ago
|
||
(In reply to Sandor Molnar[:smolnar] from comment #12)
Backed out for causing mochitest failures @ test_iframe_sandbox_popups_inheritance.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/f3e32ec71fc520fb6802b4ae6ca1363dc21f9bb8
I'll try to fix this test failure in bug 1940723.
| Assignee | ||
Comment 14•1 year ago
|
||
The test is currently failing in Http3 server test because the http3
server crashes during the test. The test is running fine with http2
server.
Depends on D233096
Comment 15•1 year ago
|
||
Comment 16•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1d58c186d315
https://hg.mozilla.org/mozilla-central/rev/93109a32cd47
https://hg.mozilla.org/mozilla-central/rev/32e0f0c78f14
https://hg.mozilla.org/mozilla-central/rev/130e48d0087e
https://hg.mozilla.org/mozilla-central/rev/aa5c2a5c1a4c
https://hg.mozilla.org/mozilla-central/rev/e6150204f99c
https://hg.mozilla.org/mozilla-central/rev/3380a7392f48
https://hg.mozilla.org/mozilla-central/rev/a67dbc81dcd0
https://hg.mozilla.org/mozilla-central/rev/b246d3a33f31
https://hg.mozilla.org/mozilla-central/rev/f7ff7967b068
https://hg.mozilla.org/mozilla-central/rev/7a068fb52af0
https://hg.mozilla.org/mozilla-central/rev/1d0be15990d4
| Comment hidden (obsolete) |
Description
•