Closed Bug 1367727 Opened 7 years ago Closed 7 years ago

Crash in js::gc::AtomMarkingRuntime::markAtom

Categories

(Core :: JavaScript Engine, defect, P1)

54 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox-esr52 --- unaffected
firefox53 --- unaffected
firefox54 --- wontfix
firefox55 --- wontfix
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- wontfix
firefox59 --- wontfix
firefox60 --- fixed

People

(Reporter: philipp, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

(4 keywords, Whiteboard: [adv-main60+])

Crash Data

This bug was filed from the Socorro interface and is report bp-65fecab3-4998-4724-8c55-ce7620170520. ============================================================= Crashing Thread (0) Frame Module Signature Source 0 xul.dll js::gc::AtomMarkingRuntime::markAtom(JSContext*, js::gc::TenuredCell*) js/src/gc/AtomMarking.cpp:183 1 xul.dll NewFunctionClone js/src/jsfun.cpp:2025 2 xul.dll js::CloneFunctionObjectIfNotSingleton(JSContext*, JS::Handle<JSFunction*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>, js::NewObjectKind) js/src/jsfuninlines.h:89 3 xul.dll js::Lambda(JSContext*, JS::Handle<JSFunction*>, JS::Handle<JSObject*>) js/src/vm/Interpreter.cpp:4356 4 xul.dll Interpret js/src/vm/Interpreter.cpp:3531 5 xul.dll js::RunScript(JSContext*, js::RunState&) js/src/vm/Interpreter.cpp:394 6 xul.dll js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) js/src/vm/Interpreter.cpp:677 7 xul.dll js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*) js/src/vm/Interpreter.cpp:709 8 @0xc002f77 this cross-platform signature is showing up since 54 builds & looking related to bugs 1324002 & 1325050.
Flags: needinfo?(bhackett1024)
Clear UAF in 54
Group: core-security
Flags: needinfo?(nihsanullah)
Jon can you take a look? Not sure why bhackett got an NI? Was his patch in the bisect?
Flags: needinfo?(nihsanullah) → needinfo?(jcoppeard)
(In reply to Naveed Ihsanullah [:naveed] from comment #2) bhackett wrote the AtomMarkingRuntime code in bug 1324002.
Blocks: 1324002
No longer depends on: 1369444
Group: core-security → javascript-core-security
Brian, can you look at this bug? It's a sec-high that we'd like to get fixed soon.
Crash Signature: [@ js::gc::AtomMarkingRuntime::markAtom] → [@ js::gc::AtomMarkingRuntime::markAtom] [@ js::CloneFunctionReuseScript ]
Blocks: GCCrashes
Flags: needinfo?(jcoppeard)
Naveed or jonco, Does this still seem actionable? I'm calling it wontfix for 56 since it doesn't seem like there is a fix in progress and we're midway through the 57 beta cycle. We could still take a patch for 57/58.
Flags: needinfo?(nihsanullah)
Flags: needinfo?(jcoppeard)
Bug 1384544 is probably the same thing and there are some suggestions that this may be XDR corruption.
Flags: needinfo?(jcoppeard)
Hi Naveed: I have assigned these security bugs to you to reassign them to appropriate developers in your team to investigate and fix them. Thanks! Wennie
Assignee: nobody → nihsanullah
Taking as part of the XDR crash collection. Once Bug 1418894 rides beta for a few more days we can look at what crashes remain and reassess.
Assignee: nihsanullah → tcampbell
Flags: needinfo?(nihsanullah)
Flags: needinfo?(bhackett1024)
Looks like there's still some lingering crashes in later 58 betas.
Priority: -- → P1
Still crashing in 59beta and 60nightly, for the js::CloneFunctionReuseScript signature only. Some are null-derefs, some are wildptrs, some are non-nullptr non-ptrs (0x200000000 and the like). The other signature seems to be 54 only. Thoughts? Next steps?
Flags: needinfo?(tcampbell)
So these remaining crashes seem unrelated to the XDR investigation before. These crashes still seem to be triggering through JSOP_LAMBDA running non-sense code. I'm thinking we should investigate perf impact of making a release assert that [1] is a JSFunction. I'm not sure why it would a bad value, but we might be able to makes these crashes less scary at least. [1] https://searchfox.org/mozilla-central/rev/74b7ffee403c7ffd05b8b476c411cbf11d134eb9/js/src/vm/JSScript-inl.h#114
Can you re-purpose/title this bug for that, or perhaps better spin off a new bug to add a release-assert (if the perf impact is ok)? Thanks
Depends on: 1438880
Created the follow-up bug for a runtime assertion. Thanks for following up on this stuff. Patch should be up in next few days.
Flags: needinfo?(tcampbell)
Ted - any progress?
Flags: needinfo?(tcampbell)
I have now put a patch up on Bug 1438880. None of this is getting to root causes, but it should turn wildptr crashes into release asserts. This should help us see if there are other bugs hiding behind this signature as well as bucket these crashes into sources a little better. In this case, failures on the asserts being added indicates ScriptData (a jemalloc'd memory buffer) has been corrupted.
Flags: needinfo?(tcampbell)
Is this still worth tracking?
Flags: needinfo?(tcampbell)
Remaining crashes are Android which I've opened Bug 1456249 to look at. The bulk of the crashes this bug saw have been fixed. There are also some release asserts tripping in Bug 1456255 which need follow-up.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Flags: needinfo?(tcampbell)
Target Milestone: --- → mozilla60
Whiteboard: [adv-main60+]
Group: javascript-core-security → core-security-release
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.