Closed Bug 877127 Opened 11 years ago Closed 11 years ago

Crash on Heap near [@ js::ion::Cannon] with invalid read involving FakeDOMObject

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla24
Tracking Status
firefox21 --- unaffected
firefox22 --- unaffected
firefox23 + fixed
firefox24 + verified
firefox-esr17 --- unaffected
b2g18 --- unaffected

People

(Reporter: decoder, Assigned: jandem)

References

Details

(4 keywords, Whiteboard: [jsbugmon:update][adv-main23-])

Crash Data

Attachments

(1 file)

The following testcase crashes on mozilla-central revision e58336e81395 (run with --ion-eager): function optionsClear() { var optionNames = options().split(','); for (var i = 0; i < optionNames.length; i++) {} } optionsClear(); evaluate("\ function options() { return 'tracejit,methodjit'; };\ optionsClear();\ function f() {\ for (var i=0; i<100; i++) {\ options = FakeDOMObject.prototype.x;\ }\ }\ f();\ optionsClear();\ ");
Valgrind shows this: ==63252== Invalid read of size 8 ==63252== at 0x4033BAD: ??? ==63252== by 0x7FA777: js::ion::Cannon(JSContext*, js::StackFrame*) (Ion.cpp:1844) ==63252== by 0x64B2C2: js::RunScript(JSContext*, js::StackFrame*) (jsinterp.cpp:336) ==63252== by 0x64B57E: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jsinterp.cpp:408) ==63252== by 0x64C186: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.cpp:441) ==63252== by 0x7A7447: js::ion::DoCallFallback(JSContext*, js::ion::BaselineFrame*, js::ion::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (BaselineIC.cpp:6855) ==63252== by 0x402F223: ??? ==63252== by 0x630536F: ??? ==63252== by 0x40267E4: ??? ==63252== by 0x7AC2F1: EnterBaseline(JSContext*, js::StackFrame*, void*, bool) (BaselineJIT.cpp:134) ==63252== by 0x64B17E: js::RunScript(JSContext*, js::StackFrame*) (jsinterp.cpp:346) ==63252== by 0x64D096: js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*) (jsinterp.cpp:537) ==63252== Address 0x1eb851eb8527 is not stack'd, malloc'd or (recently) free'd
Whiteboard: [jsbugmon:update,bisect]
Whiteboard: [jsbugmon:update,bisect] → [jsbugmon:update]
JSBugMon: Bisection requested, result: autoBisect shows this is probably related to the following changeset: The first bad revision is: changeset: 132801:4370f503d69f user: Brian Hackett date: Thu May 23 13:25:19 2013 -0600 summary: Bug 875276 - Don't profile types in scripts until they are compiled by baseline, r=jandem. This iteration took 8.731 seconds to run.
Attached patch PatchSplinter Review
Typo in DOMCallNeedsBarrier.
Assignee: general → jdemooij
Status: NEW → ASSIGNED
Attachment #755341 - Flags: review?(bhackett1024)
Comment on attachment 755341 [details] [diff] [review] Patch [Security approval request comment] How easily could an exploit be constructed based on the patch? Not easy, maybe with some fuzzing help. 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? Aurora only. If not all supported branches, which bug introduced the flaw? Bug 804676. Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be? Should apply to aurora. How likely is this patch to cause regressions; how much testing does it need? Unlikely.
Attachment #755341 - Flags: sec-approval?
Attachment #755341 - Flags: review?(bhackett1024) → review+
Comment on attachment 755341 [details] [diff] [review] Patch sec-approval+ for m-c. Once it is in, please ask for Aurora approval so we can avoid shipping this issue.
Attachment #755341 - Flags: sec-approval? → sec-approval+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Status: RESOLVED → VERIFIED
JSBugMon: This bug has been automatically verified fixed.
Comment on attachment 755341 [details] [diff] [review] Patch [Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 804676. User impact if declined: Crashes, security issues. Testing completed (on m-c, etc.): On m-c. Risk to taking this patch (and alternatives if risky): Low. String or IDL/UUID changes made by this patch: None.
Attachment #755341 - Flags: approval-mozilla-aurora?
Attachment #755341 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Marking status-firefox24:verified based on comment 8.
Whiteboard: [jsbugmon:update] → [jsbugmon:update][adv-main23-]
Group: core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: