Run Document content security checks in the parent process
Categories
(Core :: DOM: Security, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: mattwoodrow, Assigned: mattwoodrow)
References
Details
(Whiteboard: [domsecurity-active])
Attachments
(9 files, 2 obsolete files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1638711 - Update WindowGlobalParent's copy of ClientInfo when we mutate it on the window. r?nika
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
With fission, the requesting Document for a subdocument load might be in a different process, so the LoadInfo we compute in the subdoc's content process may be incomplete.
Using this LoadInfo for security checks may result in incorrect checking being done.
We also have checks done on redirect (AsyncOnChannelRedirect) in the content process, which doesn't run if the load results in a process switch. Having these checks run may hide bugs where the parent process equivalent isn't successfully blocking, and we don't have sufficient tests for process switching cases.
I think we should move to only doing security checks for document loads in the parent process, so that we use the same code for all our tests, and can have more confidence in its correctness.
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D75720
Assignee | ||
Comment 3•5 years ago
|
||
The current state is that we fire error events for content blocking if the error happens synchronously and src was set when the iframe was in-document, or if the error happens asynchronously (from the parent process).
This test is currently setting src before appending the iframe to the document, and thus was expecting no error event to be fired. We have other content security tests that do rely on the error event being fired.
Since we're doing security checks in the parent, the error event now fires, and this changes the test to report success in that case.
Depends on D75721
Assignee | ||
Comment 4•5 years ago
|
||
Depends on D75722
Assignee | ||
Comment 5•5 years ago
|
||
Content security checks for Documents run in the parent now, so we need a browser test to add the new policy in the parent process too.
Depends on D75723
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D75724
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D75725
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D75723
Comment 10•5 years ago
|
||
Backed out 6 changesets (bug 1638711) for Geckoview failures in NavigationDelegateTest.loadUriReferrerSessionFileUrl.CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=303899462&repo=autoland&lineNumber=6999
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=22a7b8f16c4478819bbb0b6648058cbaac9b3498
Backout:
https://hg.mozilla.org/integration/autoland/rev/1caff03435d24141061d029f0b0acd8f93b5c759
Assignee | ||
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
Comment 13•5 years ago
•
|
||
Backed out for perma failures on test_bug375314-2.html.
Failure logs:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=304044116&repo=autoland&lineNumber=2100
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=304042793&repo=autoland&lineNumber=4043
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=304047680&repo=autoland&lineNumber=6912
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=304050275&repo=autoland&lineNumber=3736
Backout: https://hg.mozilla.org/integration/autoland/rev/1eef124eff9bc4ead0c08a9ae7504da6b9f38558
Updated•4 years ago
|
Assignee | ||
Comment 14•4 years ago
|
||
Depends on D77171
Assignee | ||
Comment 15•4 years ago
|
||
Depends on D77954
Assignee | ||
Updated•4 years ago
|
Comment 16•4 years ago
|
||
Comment 17•4 years ago
|
||
Backed out 9 changesets (bug 1638711) for test_block_toplevel_data_navigation.html failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/b8097850787bd00814b7a4858d8553979e67d3c4
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=305433961&repo=autoland&lineNumber=4755
[task 2020-06-08T09:23:38.958Z] 09:23:38 INFO - 1525 INFO TEST-START | dom/security/test/general/test_block_toplevel_data_navigation.html
[task 2020-06-08T09:23:38.959Z] 09:23:38 INFO - Buffered messages logged at 09:23:29
[task 2020-06-08T09:23:38.959Z] 09:23:38 INFO - 1526 INFO TEST-PASS | dom/security/test/general/test_block_toplevel_data_navigation.html | A valid string reason is expected
[task 2020-06-08T09:23:38.959Z] 09:23:38 INFO - 1527 INFO TEST-PASS | dom/security/test/general/test_block_toplevel_data_navigation.html | Reason cannot be empty
[task 2020-06-08T09:23:38.959Z] 09:23:38 INFO - 1528 INFO TEST-FAIL | dom/security/test/general/test_block_toplevel_data_navigation.html | The author of the test has indicated that flaky timeouts are expected. Reason: have to test that top level data: URI navgiation is blocked
[task 2020-06-08T09:23:38.960Z] 09:23:38 INFO - Buffered messages logged at 09:23:30
[task 2020-06-08T09:23:38.960Z] 09:23:38 INFO - 1529 INFO TEST-PASS | dom/security/test/general/test_block_toplevel_data_navigation.html | toplevel data: URI navigation through click() should be blocked
[task 2020-06-08T09:23:38.960Z] 09:23:38 INFO - Buffered messages logged at 09:23:31
[task 2020-06-08T09:23:38.960Z] 09:23:38 INFO - 1530 INFO TEST-PASS | dom/security/test/general/test_block_toplevel_data_navigation.html | data: URI navigation using _blank from data: URI should be blocked
[task 2020-06-08T09:23:38.960Z] 09:23:38 INFO - 1531 INFO TEST-FAIL | dom/security/test/general/test_block_toplevel_data_navigation.html | The author of the test has indicated that flaky timeouts are expected. Reason: have to test that top level data: URI navgiation is blocked
[task 2020-06-08T09:23:38.960Z] 09:23:38 INFO - Buffered messages logged at 09:23:32
[task 2020-06-08T09:23:38.961Z] 09:23:38 INFO - 1532 INFO TEST-PASS | dom/security/test/general/test_block_toplevel_data_navigation.html | data: URI navigation through win.loc.href should be blocked
[task 2020-06-08T09:23:38.961Z] 09:23:38 INFO - 1533 INFO TEST-FAIL | dom/security/test/general/test_block_toplevel_data_navigation.html | The author of the test has indicated that flaky timeouts are expected. Reason: have to test that top level data: URI navgiation is blocked
[task 2020-06-08T09:23:38.961Z] 09:23:38 INFO - Buffered messages finished
[task 2020-06-08T09:23:38.961Z] 09:23:38 WARNING - 1534 INFO TEST-UNEXPECTED-FAIL | dom/security/test/general/test_block_toplevel_data_navigation.html | navigating to a data: URI using window.open() should be blocked - got "Error!", expected ""
[task 2020-06-08T09:23:38.961Z] 09:23:38 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:383:14
[task 2020-06-08T09:23:38.961Z] 09:23:38 INFO - test4/<@dom/security/test/general/test_block_toplevel_data_navigation.html:87:7
[task 2020-06-08T09:23:38.962Z] 09:23:38 INFO - 1535 INFO TEST-FAIL | dom/security/test/general/test_block_toplevel_data_navigation.html | The author of the test has indicated that flaky timeouts are expected. Reason: have to test that top level data: URI navgiation is blocked
[task 2020-06-08T09:23:38.962Z] 09:23:38 WARNING - 1536 INFO TEST-UNEXPECTED-FAIL | dom/security/test/general/test_block_toplevel_data_navigation.html | navigating to URI which redirects to a data: URI using window.open() should be blocked - got "Error!", expected ""
[task 2020-06-08T09:23:38.962Z] 09:23:38 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:383:14
[task 2020-06-08T09:23:38.962Z] 09:23:38 INFO - test5/<@dom/security/test/general/test_block_toplevel_data_navigation.html:100:7
[task 2020-06-08T09:23:38.962Z] 09:23:38 INFO - 1537 INFO TEST-OK | dom/security/test/general/test_block_toplevel_data_navigation.html | took 5690ms
Comment 18•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 19•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1dcb2873841a
https://hg.mozilla.org/mozilla-central/rev/f1a23a62e826
https://hg.mozilla.org/mozilla-central/rev/ca1e2087c0af
https://hg.mozilla.org/mozilla-central/rev/034f641d64bc
https://hg.mozilla.org/mozilla-central/rev/903baf6ab111
https://hg.mozilla.org/mozilla-central/rev/624f2306ac72
https://hg.mozilla.org/mozilla-central/rev/b4cc6d55dc09
https://hg.mozilla.org/mozilla-central/rev/c448f9dcdedc
https://hg.mozilla.org/mozilla-central/rev/cb212bb7b6de
Description
•