Closed
Bug 1200856
(CVE-2015-4520)
Opened 9 years ago
Closed 9 years ago
CORS preflight cache poisoning with the credentials flag
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla43
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
(Keywords: csectype-sop, sec-high, Whiteboard: [post-critsmash-triage][adv-main41+][adv-esr38.3+])
Attachments
(1 file)
5.04 KB,
patch
|
sicking
:
review+
abillings
:
approval-mozilla-aurora+
abillings
:
approval-mozilla-beta+
lizzard
:
approval-mozilla-esr38+
abillings
:
sec-approval+
|
Details | Diff | Splinter Review |
nsPreflightCache::GetCacheKey() has a bug that causes us to generate the same cache key for two preflight requests that only differ in the credentials flag. This can cause us to bypass a CORS preflight in the following scenario:
* The page does an XHR without credentials which requires preflight.
* The preflight finishes successfully, and we store the result in the preflight cache.
* Before the cache entry expires, the page does an XHR with credentials but otherwise with the same preflight params as the first one.
* We mistakenly think that we have a preflight cache entry that allows us to connect to the remote server for the second XHR, and the page manages to send the XHR with credentials without a preflight.
Going back in the history, I think we have had this bug since forever. It definitely predates bug 644476. I didn't look back further.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8655694 -
Flags: review?(jonas)
Assignee | ||
Updated•9 years ago
|
Keywords: csectype-sop,
sec-high
Updated•9 years ago
|
Group: core-security → dom-core-security
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8655694 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8655694 [details] [diff] [review]
Fix the computation of CORS preflight cache keys
[Security approval request comment]
How easily could an exploit be constructed based on the patch? It depends. If I land the patch as is here, it's trivial (especially with the test and the commit message.) But I can also try to hide what this patch is doing some more by changing stuff around it and such, but a careful reader could probably figure out what the implications are...
Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem? The tests obviously do, and I think we should not land the tests before the fix is shipped on the release channel. I'm open to ideas for the commit message, such as "Make string manipulation faster" or something like that?
Which older supported branches are affected by this flaw? All branches.
If not all supported branches, which bug introduced the flaw?
Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be? The backports are trivial and very low risk.
How likely is this patch to cause regressions; how much testing does it need? I've tested it locally and on try and the problem is also quite well understood. I'm not too much worried about regressions from this.
Attachment #8655694 -
Flags: sec-approval?
Attachment #8655694 -
Flags: approval‑mozilla‑b2g37_v2_2r?
Attachment #8655694 -
Flags: approval-mozilla-release?
Attachment #8655694 -
Flags: approval-mozilla-esr38?
Attachment #8655694 -
Flags: approval-mozilla-esr31?
Attachment #8655694 -
Flags: approval-mozilla-beta?
Attachment #8655694 -
Flags: approval-mozilla-b2g37?
Attachment #8655694 -
Flags: approval-mozilla-aurora?
Comment 4•9 years ago
|
||
Sec-approval+ to land on trunk without tests. We should take this on Aurora, Beta, and ESR38. ESR31 is at EOL so we don't need it there.
status-firefox40:
--- → wontfix
status-firefox41:
--- → affected
status-firefox42:
--- → affected
status-firefox43:
--- → affected
status-firefox-esr38:
--- → affected
tracking-firefox41:
--- → +
tracking-firefox42:
--- → +
tracking-firefox43:
--- → +
tracking-firefox-esr38:
--- → 41+
Updated•9 years ago
|
Attachment #8655694 -
Flags: sec-approval?
Attachment #8655694 -
Flags: sec-approval+
Attachment #8655694 -
Flags: approval-mozilla-release?
Attachment #8655694 -
Flags: approval-mozilla-esr31?
Attachment #8655694 -
Flags: approval-mozilla-beta?
Attachment #8655694 -
Flags: approval-mozilla-beta+
Attachment #8655694 -
Flags: approval-mozilla-aurora?
Attachment #8655694 -
Flags: approval-mozilla-aurora+
Updated•9 years ago
|
status-firefox-esr31:
--- → wontfix
Assignee | ||
Updated•9 years ago
|
Flags: in-testsuite?
Needs info to Liz for esr38 approval.
Flags: needinfo?(lhenry)
Comment 6•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Comment 7•9 years ago
|
||
Comment on attachment 8655694 [details] [diff] [review]
Fix the computation of CORS preflight cache keys
Approved for uplift to ESR38.
Flags: needinfo?(lhenry)
Attachment #8655694 -
Flags: approval-mozilla-esr38? → approval-mozilla-esr38+
Comment 8•9 years ago
|
||
status-b2g-v2.0:
--- → wontfix
status-b2g-v2.0M:
--- → wontfix
status-b2g-v2.1:
--- → wontfix
status-b2g-v2.1S:
--- → affected
status-b2g-v2.2:
--- → affected
status-b2g-v2.2r:
--- → affected
status-b2g-master:
--- → fixed
Comment 10•9 years ago
|
||
Updated•9 years ago
|
Whiteboard: [post-critsmash-triage]
Comment 11•9 years ago
|
||
Comment on attachment 8655694 [details] [diff] [review]
Fix the computation of CORS preflight cache keys
sec-high don't need approval for B2G if they're fixed on affected Fx branches.
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/c1ed0cd007f2
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/c1ed0cd007f2
https://hg.mozilla.org/releases/mozilla-b2g34_v2_1s/rev/9d414eb53b23
Attachment #8655694 -
Flags: approval‑mozilla‑b2g37_v2_2r?
Attachment #8655694 -
Flags: approval-mozilla-b2g37?
Updated•9 years ago
|
Updated•9 years ago
|
Group: dom-core-security → core-security-release
Updated•9 years ago
|
Whiteboard: [post-critsmash-triage] → [post-critsmash-triage][adv-main41+][adv-esr38.3+]
Updated•9 years ago
|
Alias: CVE-2015-4520
Assignee | ||
Comment 12•9 years ago
|
||
Flags: in-testsuite? → in-testsuite+
Updated•8 years ago
|
Group: core-security-release
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•