-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebAudio] Use-after-free in WebCore::AudioBufferSourceNode::renderFr…
…omBuffer https://bugs.webkit.org/show_bug.cgi?id=272607 rdar://126326144 Reviewed by Yusuke Suzuki. The JS on the main thread can detach the AudioBuffer's channels while it is being read by the audio rendering thread, causing use-after-frees. In a previous fix attempt, we starting copying the AudioBuffer's channels so that the audio thread would read a copy instead. However, the increased memory usage resulted in increased jetsams on gaming sites. As a temporary stop gap measure, this patch simply marks the AudioBuffer's channels as non-detachable to prevent the issue. This is not quite spec compliant but it addresses the security issue until we can implement the specification correctly without causing jetsams. * Source/WebCore/Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::markBuffersAsNonDetachable): * Source/WebCore/Modules/webaudio/AudioBuffer.h: * Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::acquireBufferContent): (WebCore::AudioBufferSourceNode::setBufferForBindings): (WebCore::AudioBufferSourceNode::startPlaying): * Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h: Canonical link: https://commits.webkit.org/272448.925@safari-7618-branch
- Loading branch information
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters