Closed
Bug 876273
Opened 11 years ago
Closed 11 years ago
WebAudio use-after-free crash [@mozilla::::MediaStreamGraphShutDownRunnable::Run]
Categories
(Core :: Web Audio, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
Tracking | Status | |
---|---|---|
firefox22 | --- | disabled |
firefox23 | - | disabled |
firefox24 | + | fixed |
firefox-esr17 | --- | unaffected |
b2g18 | --- | unaffected |
People
(Reporter: posidron, Assigned: ehsan.akhgari)
References
Details
(Keywords: crash, csectype-uaf, sec-critical, Whiteboard: [adv-main24-])
Attachments
(2 files)
7.76 KB,
text/plain
|
Details | |
1.46 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
This crash is very similar to bug 875221 but it happened while processing different Audio node objects - see frame #6 in the stack of alloc and free. The re-use condition differs here too. alloc: ./content/media/webaudio/AudioDestinationNode.cpp:188 AudioDestinationNode::AudioDestinationNode(AudioContext* aContext, bool aIsOffline, uint32_t aNumberOfChannels, uint32_t aLength, float aSampleRate) [...] MediaStreamGraph* graph = aIsOffline ? * MediaStreamGraph::CreateNonRealtimeInstance() : MediaStreamGraph::GetInstance(); free: ./content/media/MediaStreamGraph.cpp:1525 void MediaStream::Destroy() { [...] * GraphImpl()->AppendMessage(new Message(this)); [...] } re-use: ./content/media/MediaStreamGraph.cpp:1199 class MediaStreamGraphShutDownRunnable : public nsRunnable { public: MediaStreamGraphShutDownRunnable(MediaStreamGraphImpl* aGraph) : mGraph(aGraph) {} NS_IMETHOD Run() { NS_ASSERTION(mGraph->mDetectedNotRunning, "We should know the graph thread control loop isn't running!"); * mGraph->ShutdownThreads(); [...] Tested with m-i changeset: 132982:ce25da24ba1c
Assignee | ||
Comment 1•11 years ago
|
||
I have a dollar here which says this is a dupe of bug 875221. :-)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•11 years ago
|
||
The fuzzer is still hitting this crash.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Assignee | ||
Comment 4•11 years ago
|
||
So this crash is caused because we start to use the code in MediaStreamGraphShutDownRunnable to delete the graph, but then we end up in the case where the last media stream is deleted and so we delete the graph, and later on when we get to run MediaStreamGraphShutDownRunnable the graph is already deleted. roc, what is the reliable condition to check for if I want to know which one of the shutdown paths will be taken by the graph?
Flags: needinfo?(roc)
I think in MediaStreamGraphImpl::AppendMessage, the check for IsEmpty() should also check mLifecycleState >= LIFECYCLE_WAITING_FOR_STREAM_DESTRUCTION before deleting the graph.
Flags: needinfo?(roc)
Assignee | ||
Comment 7•11 years ago
|
||
You're right!
Updated•11 years ago
|
status-b2g18:
--- → unaffected
status-firefox22:
--- → disabled
status-firefox23:
--- → affected
status-firefox24:
--- → affected
status-firefox-esr17:
--- → unaffected
tracking-firefox23:
--- → ?
tracking-firefox24:
--- → ?
Attachment #756092 -
Flags: review?(roc) → review+
Assignee | ||
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/08523c04d61a
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/08523c04d61a
Status: ASSIGNED → RESOLVED
Closed: 11 years ago → 11 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Updated•11 years ago
|
Assignee | ||
Comment 10•11 years ago
|
||
Mass moving Web Audio bugs to the Web Audio component. Filter on duckityduck.
Component: Video/Audio → Web Audio
Updated•11 years ago
|
Updated•11 years ago
|
Whiteboard: [adv-main24-]
Updated•10 years ago
|
Group: core-security
Updated•9 years ago
|
Keywords: testcase-wanted
Assignee | ||
Updated•4 years ago
|
Flags: in-testsuite? → in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•