Closed Bug 1415788 Opened 7 years ago Closed 6 years ago

Crash in mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel

Categories

(Core :: Audio/Video: Playback, defect, P1)

56 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox-esr52 --- unaffected
firefox57 --- wontfix
firefox58 --- fixed
firefox59 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

(Blocks 1 open bug)

Details

(4 keywords, Whiteboard: [clouseau][adv-main58+][post-critsmash-triage])

Crash Data

+++ This bug was initially created as a clone of Bug #1407148 +++

This bug was filed from the Socorro interface and is 
report bp-f6ec5b1e-f22b-4af3-bf87-e68680171009.
=============================================================

There are 15 crashes in nightly 58 starting with buildid 20171009100134. In analyzing the backtrace, the regressoin may have been introduced by patch [1] to fix bug 1402584.
The crash reason is always MOZ_RELEASE_ASSERT(mReadyState == nsIDOMHTMLMediaElement::HAVE_NOTHING).

[1] https://hg.mozilla.org/mozilla-central/rev?node=a4466933d251bca22688a859c108eb11772401c2
https://crash-stats.mozilla.com/report/index/9980818c-0366-4e98-84ae-fcb5f0171018

Bug 1407148 has fixed the assertion, but we still have some memory bugs.
Just to mirror from bug 1407148: the memory errors (UAF/wildptrs) include EXEC failures, and predate the assertion bug this is cloned from.  Low volume, but go back a ways.
JW - this is a sec-critical. Do you agree with that assessment? Can you find someone to figure out what is going on?
Flags: needinfo?(jwwang)
The volume is quite low on 56. I think it is not as critical as it was. I will keep an eye on this bug however I have no idea how to progress this bug since a UAF might be caused by any memory bug in the whole codebase.
Flags: needinfo?(jwwang)
(In reply to JW Wang [:jwwang] [:jw_wang] from comment #4)
> The volume is quite low on 56. I think it is not as critical as it was. I
> will keep an eye on this bug however I have no idea how to progress this bug
> since a UAF might be caused by any memory bug in the whole codebase.

UAF is rarely due to memory-trashing per se, and that would be most common in a "sweep" function like GC/CC.  There's something specific to this signature I suspect, and most of the crashes come from related source lines for the specific release, and the wildptr EXEC addresses seem to have a distinctive pattern.  Looking at the generated code there or a crashdump may help.
Any double-free in the whole codebase could result in a UAF in our media stack. The patterns are similar is because they all happen while loading media. However, since loading media involves lots of code (media, network, IPC...), it is still very hard to identify the location of double-free even if it is some piece of code in the media module (which is huge).
Double-free can be caused by a using non-threadsafe refcounting.
I believe we have assertions to detect if AddRef()/Release() is called on the wrong thread.
Group: media-core-security → core-security-release
Assignee: nobody → jwwang
Target Milestone: --- → mozilla58
Whiteboard: [clouseau] → [clouseau][adv-main58]
Whiteboard: [clouseau][adv-main58] → [clouseau][adv-main58+]
Flags: qe-verify-
Whiteboard: [clouseau][adv-main58+] → [clouseau][adv-main58+][post-critsmash-triage]
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.