Closed
Bug 774859
Opened 12 years ago
Closed 12 years ago
JM: Missing write barrier on JSOP_INITPROP
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
mozilla17
Tracking | Status | |
---|---|---|
firefox15 | --- | unaffected |
firefox16 | --- | fixed |
firefox17 | --- | verified |
firefox-esr10 | --- | unaffected |
People
(Reporter: billm, Assigned: billm)
References
Details
(4 keywords, Whiteboard: [js:p1][jsbugmon:update][advisory-tracking-])
Attachments
(2 files)
(deleted),
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
dvander
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #773588 +++
The following testcase asserts on ionmonkey revision a29f6c635516 (run with --ion -n -m --ion-eager):
gcPreserveCode()
gczeal(4);
function f() {
var a = [], i, N = 10;
for (i = 0; i < N; i++)
a[i] = {
m: function() { return 0; },
m: function() { return (false ); }
};
schedulegc(10);
assertEq(f(), 1);
}
f();
Updated•12 years ago
|
Whiteboard: [jsbugmon:update] → [js:p1][jsbugmon:update]
Comment 1•12 years ago
|
||
Is this only a problem in the debug-only verifier code, or a potential security problem for users?
Assignee | ||
Comment 2•12 years ago
|
||
With the patch in bug 781390, I was able to write a testcase. This is a real security problem, not just a verifier thing.
Keywords: sec-high → sec-critical
Updated•12 years ago
|
status-firefox16:
--- → affected
status-firefox17:
--- → affected
Assignee | ||
Comment 3•12 years ago
|
||
This first patch just makes it easier to write reproducible test cases for the write barrier verifier. Currently, when starting verification, we set the allocatedDuringIncremental bit on every arena currently being allocated into. This is pretty conservative, because some of these objects were allocated before verification started. I noticed when trying to write a test case that this makes it much less likely that the verifier will fail.
I've replaced the allocatedDuringIncremental stuff with a patch that forces us to allocate into a fresh page when we start verification. This causes us to leak a little memory until the next GC (the remainder of the arena we were allocating into), but it's just for debugging, so it's not a big deal. And now it's easier to write test cases.
Attachment #650719 -
Flags: review?
Assignee | ||
Comment 4•12 years ago
|
||
This fixes the actual bug. compileBarriers() is like needsBarrier(), but slightly different. It's being introduced in bug 781390.
Attachment #650720 -
Flags: review?(dvander)
Assignee | ||
Updated•12 years ago
|
Attachment #650719 -
Flags: review? → review?(terrence)
Comment 5•12 years ago
|
||
Comment on attachment 650719 [details] [diff] [review]
purge patch
Review of attachment 650719 [details] [diff] [review]:
-----------------------------------------------------------------
Whoa, we can get rid of prepareForIncrementalGC now. Nice.
Attachment #650719 -
Flags: review?(terrence) → review+
Updated•12 years ago
|
Attachment #650720 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 6•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/03784748970d
https://hg.mozilla.org/integration/mozilla-inbound/rev/b9850fa8fcbf
It turns out we still need prepareForIncrementalGC. I added a comment explaining why.
Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 650720 [details] [diff] [review]
initprop patch
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 641025
User impact if declined: Possible crashes, security holes.
Testing completed (on m-c, etc.): On m-c.
Risk to taking this patch (and alternatives if risky): Low risk. At worst, there could be performance regressions.
String or UUID changes made by this patch: None.
Attachment #650720 -
Flags: approval-mozilla-aurora?
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/03784748970d
https://hg.mozilla.org/mozilla-central/rev/b9850fa8fcbf
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Updated•12 years ago
|
Status: RESOLVED → VERIFIED
Comment 9•12 years ago
|
||
JSBugMon: This bug has been automatically verified fixed.
Updated•12 years ago
|
Attachment #650720 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 10•12 years ago
|
||
Caused by bug 641025, landed in FF13. FF10 ESR is unaffected.
status-firefox-esr10:
--- → unaffected
Assignee | ||
Comment 11•12 years ago
|
||
Comment 12•12 years ago
|
||
Ms2ger backed this out due to bustage:
http://hg.mozilla.org/releases/mozilla-aurora/rev/b471130dc112
Assignee | ||
Comment 13•12 years ago
|
||
Comment 14•12 years ago
|
||
I assume as an ionmonkey bug, Firefox 15 is completely unaffected, especially since this comes from incremental GC, but I'm confirming here. Anyone?
Assignee | ||
Comment 15•12 years ago
|
||
This is a JaegerMonkey bug, but since it's incremental GC, FF15 is unaffected.
status-firefox15:
--- → unaffected
Comment 16•12 years ago
|
||
Ah, ok. I thought comment 0 implied ionmonkey but I'll take your word for it!
Whiteboard: [js:p1][jsbugmon:update] → [js:p1][jsbugmon:update][advisory-tracking-]
Updated•12 years ago
|
Comment 17•12 years ago
|
||
This was initially found on IonMonkey, but then it turned out to affect Jagermonkey, too, in a way that required a different patch.
Updated•12 years ago
|
Group: core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•