Closed
Bug 831846
Opened 13 years ago
Closed 13 years ago
Compartment mismatch with evalcx and watch
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
mozilla21
| Tracking | Status | |
|---|---|---|
| firefox18 | --- | unaffected |
| firefox19 | --- | unaffected |
| firefox20 | --- | unaffected |
| firefox21 | + | fixed |
| firefox-esr10 | --- | unaffected |
| firefox-esr17 | --- | unaffected |
| b2g18 | --- | unaffected |
People
(Reporter: gkw, Assigned: Benjamin)
References
Details
(4 keywords, Whiteboard: [jsbugmon:])
Attachments
(2 files, 1 obsolete file)
|
8.97 KB,
text/plain
|
Details | |
|
2.10 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
evalcx('').watch("", /()/)
crashes js debug shell on m-c changeset ce9cdd801a73 without any CLI arguments with a compartment mismatch message:
*** Compartment mismatch 0x101845600 vs. 0x10184d400
Segmentation fault: 11
autoBisect shows this is probably related to the following changeset:
The first bad revision is:
changeset: 118999:39885ae3a597
user: Brendan Eich
date: Tue Jan 15 18:17:50 2013 -0800
summary: Bug 810525 - unregress DecompileValueGenerator change to handle object literal reference bases (r=jandem).
| Reporter | ||
Comment 1•13 years ago
|
||
s-s because this involves a compartment mismatch.
Brendan, is bug 810525 a likely regressor?
status-b2g18:
--- → unaffected
status-firefox-esr10:
--- → unaffected
status-firefox18:
--- → unaffected
status-firefox19:
--- → unaffected
status-firefox20:
--- → unaffected
status-firefox21:
--- → affected
status-firefox-esr17:
--- → unaffected
tracking-firefox21:
--- → ?
Flags: needinfo?(brendan)
Comment 2•13 years ago
|
||
Bug 830389 is another compartment mismatch (without a testcase) involving js_ValueToSource (though likely unrelated).
Updated•13 years ago
|
Blocks: compartment-mismatch
| Reporter | ||
Comment 3•13 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #2)
> Bug 830389 is another compartment mismatch (without a testcase) involving
> js_ValueToSource (though likely unrelated).
That seems unlikely to be related. Scoobidiver in bug 821733 comment 11 says that crashes "have almost completely stopped since 21.0a1/20130111".
autoBisect points to changeset 39885ae3a597 which landed yesterday around noon.
Although I won't exactly discount a latent bug appearing occasionally.
Comment 4•13 years ago
|
||
Right, crashes with that signature were mostly due to a different print preview issue which has been fixed, but the bug I linked to also involved a compartment mismatch with js_ValueToSource. I've only seen that once, though, so it isn't a common issue.
| Reporter | ||
Comment 5•13 years ago
|
||
Assuming sec-critical pending further analysis, feel free to change if this is not the case.
Keywords: sec-critical
| Assignee | ||
Comment 6•13 years ago
|
||
We properly enter sandbox's compartment through the CCW over Object.wrap. We then try to generate an error about the regular expression not being callable in the expression decompiler. The expression decompiler starts playing around with objects in the outer global script creating the compartment violation.
This patch makes the expression decompiler be in the compartment of the script's global.
Attachment #703566 -
Flags: feedback?(wmccloskey)
Updated•13 years ago
|
Comment 7•13 years ago
|
||
No more info to add, comment 6 diagnoses. Hoping this can get fast r+ from a compartment expert (cc'ed gal since he is around).
/be
Flags: needinfo?(brendan)
Comment 8•13 years ago
|
||
Comment on attachment 703566 [details] [diff] [review]
enter some compartments
Can you please check that there is no other frame walking path that might have the same problem?
Attachment #703566 -
Flags: feedback?(wmccloskey) → feedback+
| Assignee | ||
Comment 9•13 years ago
|
||
I think I got all the paths. Anyway, here's a patch with an assertion that will go off next time.
Attachment #703566 -
Attachment is obsolete: true
Attachment #704358 -
Flags: review?(gal)
| Reporter | ||
Comment 10•13 years ago
|
||
Assigning to benjamin since this has a patch from him awaiting review from gal.
Assignee: general → benjamin
Status: NEW → ASSIGNED
Updated•13 years ago
|
Whiteboard: [jsbugmon:update] → [jsbugmon:]
Comment 11•13 years ago
|
||
JSBugMon: Cannot process bug: Unknown exception (check manually)
| Assignee | ||
Updated•13 years ago
|
Attachment #704358 -
Flags: review?(gal) → review?(wmccloskey)
Comment 12•13 years ago
|
||
I invited gal to do an r+. One peer should be enough. Is there a reason for two? Bill seems busy enough for real, also in that he didn't get to the original r? yet.
/be
| Assignee | ||
Comment 13•13 years ago
|
||
gal only f+ last time. I asked him by email if he wanted to finish, but he should I should switch defer to someone else.
Comment on attachment 704358 [details] [diff] [review]
v2
Sorry, this got taken off my list when Andreas added the f+. It looks fine.
It does make sense to audit all the FrameIter uses for compartment mismatches, but we should land this patch now.
Attachment #704358 -
Flags: review?(wmccloskey) → review+
| Assignee | ||
Comment 15•13 years ago
|
||
Comment 16•13 years ago
|
||
(In reply to Bill McCloskey (:billm) from comment #14)
> It does make sense to audit all the FrameIter uses for compartment
> mismatches, but we should land this patch now.
File bug 835170 for that.
Comment 17•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Updated•13 years ago
|
Status: RESOLVED → VERIFIED
Comment 18•13 years ago
|
||
JSBugMon: This bug has been automatically verified fixed.
| Assignee | ||
Comment 19•13 years ago
|
||
Flags: in-testsuite? → in-testsuite+
Comment 20•13 years ago
|
||
Updated•13 years ago
|
Group: core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•