Closed
Bug 886850
Opened 11 years ago
Closed 11 years ago
Assertion failure: [barrier verifier] Unmarked edge: method, at gc/Verifier.cpp:572 with setObjectMetadataCallback
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
mozilla26
Tracking | Status | |
---|---|---|
firefox23 | --- | unaffected |
firefox24 | - | wontfix |
firefox25 | + | wontfix |
firefox26 | - | fixed |
firefox-esr17 | --- | unaffected |
firefox-esr24 | 26+ | fixed |
b2g18 | --- | unaffected |
b2g-v1.1hd | --- | unaffected |
b2g-v1.2 | --- | fixed |
People
(Reporter: decoder, Assigned: bhackett1024)
Details
(Keywords: assertion, sec-high, testcase, Whiteboard: [fuzzblocker] [jsbugmon:update][adv-main26+][adv-esr24.2+])
Attachments
(2 files, 3 obsolete files)
2.04 KB,
text/plain
|
Details | |
8.22 KB,
patch
|
jandem
:
review+
akeybl
:
approval-mozilla-esr24+
abillings
:
sec-approval+
|
Details | Diff | Splinter Review |
The following testcase asserts on mozilla-central revision bc569033125a (no options required):
evaluate("\
for ( var time = 0, year = 1969; year >= 0; year-- )\
time -= TimeInYear(year);\
function TimeInYear( y ) {}\
gczeal(4);\
", { noScriptRval : true });
evaluate("setObjectMetadataCallback();", { noScriptRval : true });
Reporter | ||
Comment 1•11 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Whiteboard: [jsbugmon:update,bisect]
Reporter | ||
Comment 2•11 years ago
|
||
Attachment #767268 -
Attachment is obsolete: true
Reporter | ||
Comment 3•11 years ago
|
||
Brian, this is causing lots of signatures, can you look into this?
Flags: needinfo?(bhackett1024)
Whiteboard: [jsbugmon:update,bisect] → [jsbugmon:update,bisect][fuzzblocker]
Assignee | ||
Comment 4•11 years ago
|
||
Can you get a blame cset? setObjectMetadataCallback doesn't do anything interesting when it isn't passed any arguments.
Flags: needinfo?(bhackett1024)
Reporter | ||
Updated•11 years ago
|
Whiteboard: [jsbugmon:update,bisect][fuzzblocker] → [fuzzblocker] [jsbugmon:update]
Reporter | ||
Comment 5•11 years ago
|
||
JSBugMon: Bisection requested, result:
autoBisect shows this is probably related to the following changeset:
The first bad revision is:
changeset: http://hg.mozilla.org/mozilla-central/rev/be1399f8f973
user: Brian Hackett
date: Thu May 30 17:37:22 2013 -0600
summary: Bug 850026 - Allow metadata objects to be associated with JS objects, and add a hook for attaching metadata to newly created objects, r=luke.
This iteration took 1.042 seconds to run.
Reporter | ||
Comment 6•11 years ago
|
||
Setting needinfo on Brian, although this has probably a different cause just like the other bugs with setObjectMetadataCallback. This generates a lot of signatures though so we need to fix it.
Flags: needinfo?(bhackett1024)
Assignee | ||
Comment 7•11 years ago
|
||
Calling ReleaseAllJITCode seems to be missing some pre barrier somewhere. Since this is only ever used by debugging tools it seems fine to just let any in progress incremental GC finish.
Assignee: general → bhackett1024
Attachment #781824 -
Flags: review?(wmccloskey)
Flags: needinfo?(bhackett1024)
Group: core-security
Comment on attachment 781824 [details] [diff] [review]
patch
I thought about this a little and I'm not sure it's right. The basic problem is that JSScript has pointers to IonScripts and BaselineScripts. Those aren't GC things, but they have trace methods, and those trace methods trace GC things. So we need to be sure that, any time we overwrite one of these fields, we call the trace function.
This happens correctly in Invalidate, but it seems like there are other places where we don't have a barrier. For example, nukeTypes calls FinishInvalidation, and that doesn't seem to have a barrier. Also, there's a weird barrier inside InvalidateActivation that's only on the method_ field; I don't understand why it's there.
Anyway, I don't understand this code well enough to review. Can you look it over, Jan? As long as ReleaseAllJITCode is the only problem, I think the patch is fine. I'm just worried about other cases.
Attachment #781824 -
Flags: review?(wmccloskey) → review?(jdemooij)
Comment 9•11 years ago
|
||
Yeah I agree with comment 8; a more targeted fix would be good if possible.
Updated•11 years ago
|
Attachment #781824 -
Flags: review?(jdemooij)
Reporter | ||
Comment 11•11 years ago
|
||
Attachment #773175 -
Attachment is obsolete: true
Assignee | ||
Comment 12•11 years ago
|
||
Per comment 8, write barriers around ion/baseline scripts are a mess.
Attachment #781824 -
Attachment is obsolete: true
Attachment #784627 -
Flags: review?(jdemooij)
Comment 13•11 years ago
|
||
Comment on attachment 784627 [details] [diff] [review]
patch
Review of attachment 784627 [details] [diff] [review]:
-----------------------------------------------------------------
Nice, thanks!
::: js/src/jsscriptinlines.h
@@ +162,5 @@
> enclosingScopeOrOriginalFunction_ = fun;
> }
>
> +inline void
> +JSScript::setIonScript(js::ion::IonScript *ionScript) {
Style nit: brace on its own line here and below.
Attachment #784627 -
Flags: review?(jdemooij) → review+
Updated•11 years ago
|
Target Milestone: --- → mozilla24
Assignee | ||
Comment 15•11 years ago
|
||
Comment on attachment 784627 [details] [diff] [review]
patch
[Security approval request comment]
How easily could an exploit be constructed based on the patch?
I don't think that what this bug is fixing is actually exploitable. We could miss a pre barrier under some extremely difficult to trigger conditions (not easily controllable OOM).
Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?
No.
Which older supported branches are affected by this flaw?
All Ion branches probably.
Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be?
They should be easy, but I don't really know.
How likely is this patch to cause regressions; how much testing does it need?
Unlikely.
Attachment #784627 -
Flags: sec-approval?
Updated•11 years ago
|
status-firefox23:
--- → unaffected
status-firefox24:
--- → affected
status-firefox25:
--- → affected
status-firefox26:
--- → affected
tracking-firefox25:
--- → ?
tracking-firefox26:
--- → +
Comment 16•11 years ago
|
||
Comment on attachment 784627 [details] [diff] [review]
patch
sec-approval+ for trunk.
I'm neutral on whether we need this on aurora or beta but you could nominate it for both and check it in there assuming branch approvals are given.
Attachment #784627 -
Flags: sec-approval? → sec-approval+
Updated•11 years ago
|
Assignee | ||
Comment 17•11 years ago
|
||
Assignee | ||
Comment 18•11 years ago
|
||
Oops, thanks for reverting that flag bugzilla.
Comment 19•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•11 years ago
|
Flags: in-testsuite?
Reporter | ||
Updated•11 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 20•11 years ago
|
||
JSBugMon: This bug has been automatically verified fixed.
Updated•11 years ago
|
Comment 21•11 years ago
|
||
Let's take this up to Aurora, since its necessity on Beta is debatable.
Updated•11 years ago
|
Comment 23•11 years ago
|
||
At some point, either now in 25 or next time in 26, we need this on ESR24. If we fix it now we also need it on beta-25.
status-b2g18:
--- → unaffected
status-firefox-esr17:
--- → unaffected
status-firefox-esr24:
--- → affected
tracking-firefox-esr24:
--- → 25+
Keywords: sec-critical → sec-high
Updated•11 years ago
|
Updated•11 years ago
|
Flags: needinfo?(jdemooij)
Comment 24•11 years ago
|
||
Moving the ESR24 tracking to the Firefox 26 release since Alex won't fixed this for Firefox 25.
Comment 25•11 years ago
|
||
I'm getting this compilation failure (narrowed down to this bug) in both gcc 4.6.4 and 4.8.2:
/Volumes/BruceDeuce/src/mozilla-26b/js/src/jsscriptinlines.h: In member function 'void JSScript::setBaselineScript(js::jit::BaselineScript*)':
/Volumes/BruceDeuce/src/mozilla-26b/js/src/jsscriptinlines.h:128:9: error: incomplete type 'js::jit::BaselineScript' used in nested name specifier
js::jit::BaselineScript::writeBarrierPre(tenuredZone(), baseline);
^
Comment 26•11 years ago
|
||
This is still not fixed in ESR24 two weeks before release. Can we change this, please?
Updated•11 years ago
|
Whiteboard: [fuzzblocker] [jsbugmon:update] → [fuzzblocker] [jsbugmon:update][adv-main26+]
Comment 27•11 years ago
|
||
(In reply to Al Billings [:abillings] from comment #26)
> This is still not fixed in ESR24 two weeks before release. Can we change
> this, please?
Setting needinfo from bhackett.
Flags: needinfo?(bhackett1024)
Assignee | ||
Comment 28•11 years ago
|
||
Comment on attachment 784627 [details] [diff] [review]
patch
[Approval Request Comment]
If this is not a sec:{high,crit} bug, please state case for ESR consideration:
User impact if declined:
Fix Landed on Version:
Risk to taking this patch (and alternatives if risky):
String or UUID changes made by this patch:
See https://wiki.mozilla.org/Release_Management/ESR_Landing_Process for more info.
Attachment #784627 -
Flags: approval-mozilla-esr24?
Updated•11 years ago
|
Attachment #784627 -
Flags: approval-mozilla-esr24? → approval-mozilla-esr24+
Comment 31•11 years ago
|
||
This is approved by Alex. Can someone check it in?
Updated•11 years ago
|
Keywords: checkin-needed
Comment 32•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-esr24/rev/4ef90f0eecf2
Can we land the test now?
status-b2g-v1.1hd:
--- → unaffected
status-b2g-v1.2:
--- → fixed
Flags: needinfo?(choller)
Keywords: checkin-needed
Comment 33•11 years ago
|
||
Since this is sec-high, the test shouldn't land until six weeks after this release (or in seven weeks) so avoid pwning ourselves.
Comment 34•11 years ago
|
||
This hit bustage that I didn't know how to resolve and couldn't get help from #jsapi on. Backed out.
https://hg.mozilla.org/releases/mozilla-esr24/rev/df993b197a7e
https://tbpl.mozilla.org/php/getParsedLog.php?id=31333197&tree=Mozilla-Esr24
Flags: needinfo?(choller) → needinfo?(bhackett1024)
Keywords: branch-patch-needed
Comment 35•11 years ago
|
||
This is the same problem I reported in comment 25. If this helps analysis, for certain files the way to get it to compile was to add #include "jsscript.h" and remove #include "jit/BaselineJIT.h" but obviously this breaks down for compiling stuff in jit/. I eventually had to backout the patch.
Assignee | ||
Comment 36•11 years ago
|
||
The problem looks like Assembler-x86.h unnecessarily including jsscriptinlines.h, creating an include cycle.
https://hg.mozilla.org/releases/mozilla-esr24/rev/a8653b21c44b
Flags: needinfo?(bhackett1024)
Updated•11 years ago
|
Keywords: branch-patch-needed
Updated•11 years ago
|
Whiteboard: [fuzzblocker] [jsbugmon:update][adv-main26+] → [fuzzblocker] [jsbugmon:update][adv-main26+][adv-esr24.2+]
Updated•10 years ago
|
Group: core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•