Closed
Bug 1315905
Opened 9 years ago
Closed 9 years ago
Cleanup Necko http security check
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla53
People
(Reporter: baku, Assigned: baku)
References
Details
(Whiteboard: [necko-active][OA])
Attachments
(3 files, 11 obsolete files)
13.65 KB,
patch
|
Details | Diff | Splinter Review | |
2.66 KB,
patch
|
valentin
:
review+
gchang
:
approval-mozilla-aurora+
gchang
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
50.07 KB,
patch
|
Details | Diff | Splinter Review |
Instead comparing and setting each attribute of OA, this check seems cleaner.
I kept appId check separately because this is going to be removed soon in other bugs.
Attachment #8808540 -
Flags: review?(valentin.gosu)
Updated•9 years ago
|
Attachment #8808540 -
Flags: review?(valentin.gosu) → review+
Updated•9 years ago
|
Whiteboard: [necko-active]
Assignee | ||
Comment 1•9 years ago
|
||
Basically you've already reviewed this patch.
Attachment #8808540 -
Attachment is obsolete: true
Attachment #8810753 -
Flags: review?(valentin.gosu)
Assignee | ||
Comment 2•9 years ago
|
||
In our tests, and just for b2g, we create mozbrowser in the child process. These iframe has isolateMozBrowser flag set to true, but the tabContext, in the parent, doesn't. This because there is this scenario:
[ parent: necko ] -> [ child: normal tabContext -> mozBrowser tab ]
Attachment #8810754 -
Flags: review?(valentin.gosu)
Assignee | ||
Updated•9 years ago
|
Attachment #8810753 -
Flags: review?(valentin.gosu)
Assignee | ||
Updated•9 years ago
|
Attachment #8810754 -
Flags: review?(valentin.gosu)
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8810753 -
Attachment is obsolete: true
Attachment #8811171 -
Flags: review?(valentin.gosu)
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8810754 -
Attachment is obsolete: true
Attachment #8811172 -
Flags: review?(valentin.gosu)
Comment 5•9 years ago
|
||
Comment on attachment 8811172 [details] [diff] [review]
part 2 - fix tests
Review of attachment 8811172 [details] [diff] [review]:
-----------------------------------------------------------------
Did these tests pass before? If so, please explain why.
::: dom/events/test/test_bug1096146.html
@@ +153,5 @@
> { "set": [["dom.beforeAfterKeyboardEvent.enabled", true],
> ["dom.mozBrowserFramesEnabled", true],
> + ["network.disable.ipc.security", true],
> + ["dom.ipc.tabs.disabled", false],
> + ["network.disable.ipc.security", true]] },
Any reason for doing this twice?
Attachment #8811172 -
Flags: review?(valentin.gosu) → review+
Comment 6•9 years ago
|
||
Comment on attachment 8811171 [details] [diff] [review]
part 1 - necko check
Review of attachment 8811171 [details] [diff] [review]:
-----------------------------------------------------------------
::: netwerk/ipc/NeckoParent.cpp
@@ +197,5 @@
> debugString.Append("(");
> +
> + nsAutoCString serializedSuffix;
> + aSerialized.mOriginAttributes.CreateSuffix(serializedSuffix);
> + debugString.Append(serializedSuffix);
Wouldn't this lead to appending the firstPartyDomain to the crash reason?
Assignee | ||
Comment 7•9 years ago
|
||
> Wouldn't this lead to appending the firstPartyDomain to the crash reason?
Yes, it does. Wondering if firstPartDomain should be an hash (sha1, md5, whatever) instead being the real domain as string.
Comment 8•9 years ago
|
||
Let's just skip adding it to the crash reason. (maybe clone the OA without firstPartyDomain?) Otherwise the patch looks good.
Assignee | ||
Comment 9•9 years ago
|
||
anonymized first part domain
Attachment #8811171 -
Attachment is obsolete: true
Attachment #8811171 -
Flags: review?(valentin.gosu)
Attachment #8811225 -
Flags: review?(valentin.gosu)
Assignee | ||
Comment 10•9 years ago
|
||
Wrong patch, sorry for the spam.
Attachment #8811225 -
Attachment is obsolete: true
Attachment #8811225 -
Flags: review?(valentin.gosu)
Attachment #8811226 -
Flags: review?(valentin.gosu)
Assignee | ||
Comment 11•9 years ago
|
||
Attachment #8811226 -
Attachment is obsolete: true
Attachment #8811226 -
Flags: review?(valentin.gosu)
Attachment #8811236 -
Flags: review?(valentin.gosu)
Comment 12•9 years ago
|
||
Comment on attachment 8811226 [details] [diff] [review]
part 1 - necko check
Review of attachment 8811226 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good. r=me with one minor nit.
::: netwerk/ipc/NeckoParent.cpp
@@ +197,5 @@
> debugString.Append("(");
> +
> + nsAutoCString serializedSuffix;
> + aSerialized.mOriginAttributes.CreateAnonymizedSuffix(serializedSuffix);
> + debugString.Append(serializedSuffix);
We don't really need to append aSerialized more than once. You can move this outside the loop.
Attachment #8811226 -
Attachment is obsolete: false
Comment 13•9 years ago
|
||
Comment on attachment 8811236 [details] [diff] [review]
part 1 - necko check
Review of attachment 8811236 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with comment 12 and comment 6 addressed.
Attachment #8811236 -
Flags: review?(valentin.gosu) → review+
Comment 14•9 years ago
|
||
(In reply to Valentin Gosu [:valentin] from comment #13)
> Review of attachment 8811236 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> r+ with comment 12 and comment 6 addressed.
I meant comment 12 and comment 5.
Comment 15•9 years ago
|
||
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/aa99928b7bb8
Cleanup Necko http security check - part 1, r=valentin
https://hg.mozilla.org/integration/mozilla-inbound/rev/9c8cc3af1870
Cleanup Necko http security check - part 2 - tests, r=valentin
Updated•9 years ago
|
Whiteboard: [necko-active] → [necko-active][OA]
Comment 16•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/aa99928b7bb8
https://hg.mozilla.org/mozilla-central/rev/9c8cc3af1870
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Comment 17•9 years ago
|
||
Comment 19•9 years ago
|
||
[Tracking Requested - why for this release]: Fixes crashes with the signatures in bug 1317611.
status-firefox51:
--- → affected
status-firefox52:
--- → affected
tracking-firefox51:
--- → ?
tracking-firefox52:
--- → ?
Comment 20•9 years ago
|
||
Track 51+/52+ as this can fix crash in bug 1317611.
Hi :baku,
Can you help nominate this uplift request to Beta51 and Aurora52?
Assignee | ||
Comment 21•9 years ago
|
||
Comment on attachment 8811236 [details] [diff] [review]
part 1 - necko check
Approval Request Comment
[Feature/regressing bug #]: Necko security check and the introduction of OriginAttributes
[User impact if declined]: A crash can happen: race condition.
[Describe test coverage new/current, TreeHerder]: almost impossible to reproduce with a test.
[Risks and why]: This patch improves the security check in necko about what is allowed and what is not to be send via HttpChannel by a child process. The patch is not too complex. I don't think there are risks in having in in beta.
[String/UUID change made/needed]: none
Flags: needinfo?(amarchesini)
Attachment #8811236 -
Flags: approval-mozilla-beta?
Attachment #8811236 -
Flags: approval-mozilla-aurora?
Comment 22•9 years ago
|
||
Comment on attachment 8811236 [details] [diff] [review]
part 1 - necko check
Fix a crash. Beta51+ and Aurora52+. Should be in 51 beta 3.
Attachment #8811236 -
Flags: approval-mozilla-beta?
Attachment #8811236 -
Flags: approval-mozilla-beta+
Attachment #8811236 -
Flags: approval-mozilla-aurora?
Attachment #8811236 -
Flags: approval-mozilla-aurora+
Comment 23•9 years ago
|
||
needs rebasing for uplift
grafting 375554:aa99928b7bb8 "Bug 1315905 - Cleanup Necko http security check - part 1, r=valentin"
merging netwerk/ipc/NeckoParent.cpp
merging netwerk/ipc/NeckoParent.h
warning: conflicts while merging netwerk/ipc/NeckoParent.cpp! (edit, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use 'hg resolve' and 'hg graft --continue')
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 24•9 years ago
|
||
Flags: needinfo?(amarchesini)
Updated•9 years ago
|
Attachment #8814044 -
Attachment is patch: true
Comment 25•9 years ago
|
||
bugherder uplift |
Comment 26•9 years ago
|
||
also needs to rebased for beta it seems
grafting 376922:8342b7cca4bc "Bug 1315905 - Cleanup Necko http security check - part 1, r=valentin, a=gchang"
merging caps/BasePrincipal.cpp
merging caps/BasePrincipal.h
merging dom/base/ChromeUtils.cpp
merging netwerk/ipc/NeckoParent.cpp
merging netwerk/ipc/NeckoParent.h
warning: conflicts while merging netwerk/ipc/NeckoParent.cpp! (edit, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use 'hg resolve' and 'hg graft --continue')
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 27•9 years ago
|
||
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 28•9 years ago
|
||
Assignee | ||
Comment 29•9 years ago
|
||
Updated•9 years ago
|
Attachment #8814061 -
Attachment is patch: true
Assignee | ||
Updated•9 years ago
|
Attachment #8814100 -
Attachment is patch: true
Comment 30•9 years ago
|
||
Comment 31•9 years ago
|
||
bugherder uplift |
Backed out of aurora because the assertions were still happening after the followups:
https://hg.mozilla.org/releases/mozilla-aurora/rev/55b599ca3530c8286f6ad15405d99d2bcaecfbd1
Beta seems fine.
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 33•9 years ago
|
||
Flags: needinfo?(amarchesini)
Attachment #8814312 -
Flags: review?(valentin.gosu)
Updated•9 years ago
|
Attachment #8814312 -
Flags: review?(valentin.gosu) → review+
Comment 34•9 years ago
|
||
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/369bbb5eb097
Cleanup Necko http security check, r=valentin
Assignee | ||
Comment 35•9 years ago
|
||
Comment on attachment 8814312 [details] [diff] [review]
patch for m-a (but also for m-b and m-c)
This patch should land in m-a and m-b. It fixes the intermittent failures.
Attachment #8814312 -
Flags: approval-mozilla-beta?
Attachment #8814312 -
Flags: approval-mozilla-aurora?
Comment 36•9 years ago
|
||
bugherder |
Updated•9 years ago
|
Comment 37•9 years ago
|
||
Comment on attachment 8814312 [details] [diff] [review]
patch for m-a (but also for m-b and m-c)
Fix an intermittent failures. Beta51+ and Aurora52+. Should be in 51 beta 4.
Attachment #8814312 -
Flags: approval-mozilla-beta?
Attachment #8814312 -
Flags: approval-mozilla-beta+
Attachment #8814312 -
Flags: approval-mozilla-aurora?
Attachment #8814312 -
Flags: approval-mozilla-aurora+
I'm hitting conflicts uplifting this to aurora.
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 39•9 years ago
|
||
This patch contains is the only patch to land to m-a.
Attachment #8811172 -
Attachment is obsolete: true
Attachment #8811226 -
Attachment is obsolete: true
Attachment #8811236 -
Attachment is obsolete: true
Attachment #8814044 -
Attachment is obsolete: true
Attachment #8814100 -
Attachment is obsolete: true
Attachment #8814106 -
Attachment is obsolete: true
Flags: needinfo?(amarchesini)
Updated•9 years ago
|
Attachment #8816087 -
Attachment is patch: true
Comment 40•9 years ago
|
||
bugherder uplift |
Flags: in-testsuite+
Comment 41•9 years ago
|
||
needs rebasing for beta
grafting 378431:e1a57d1dcfdb "Bug 1315905 - Cleanup Necko http security check. r=valentin, a=gchang"
merging caps/BasePrincipal.cpp
merging caps/BasePrincipal.h
merging dom/base/ChromeUtils.cpp
merging dom/browser-element/mochitest/browserElementTestHelpers.js
merging dom/devicestorage/test/test_app_permissions.html
merging dom/devicestorage/test/test_fs_app_permissions.html
merging dom/events/test/test_bug1096146.html
merging dom/presentation/tests/mochitest/test_presentation_1ua_sender_and_receiver.js
merging dom/presentation/tests/mochitest/test_presentation_dc_receiver.html
merging dom/presentation/tests/mochitest/test_presentation_dc_receiver_oop.html
merging dom/presentation/tests/mochitest/test_presentation_tcp_receiver.html
merging dom/presentation/tests/mochitest/test_presentation_tcp_receiver_oop.html
merging dom/presentation/tests/mochitest/test_presentation_terminate.js
merging dom/presentation/tests/mochitest/test_presentation_terminate_establish_connection_error.js
merging netwerk/ipc/NeckoParent.cpp
merging netwerk/ipc/NeckoParent.h
warning: conflicts while merging dom/events/test/test_bug1096146.html! (edit, then use 'hg resolve --mark')
warning: conflicts while merging netwerk/ipc/NeckoParent.cpp! (edit, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use 'hg resolve' and 'hg graft --continue')
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 42•9 years ago
|
||
Do we still need to uplift? Is that beta the new release?
Flags: needinfo?(amarchesini) → needinfo?(cbook)
Comment 43•9 years ago
|
||
i think we still need this in beta gchang ?
Flags: needinfo?(cbook) → needinfo?(gchang)
Comment 44•9 years ago
|
||
Hi Tomcat,
Yes, please help to uplift this to beta.
Flags: needinfo?(gchang) → needinfo?(cbook)
Comment 45•9 years ago
|
||
baku: ok seems we still need a rebased patch for beta
Flags: needinfo?(cbook) → needinfo?(amarchesini)
Assignee | ||
Comment 46•9 years ago
|
||
This works fine on beta: https://bugzilla.mozilla.org/attachment.cgi?id=8814312
Flags: needinfo?(amarchesini)
Comment 47•9 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•