Heap-buffer-overflow WRITE in resize_context_buffers
Originally disclosed on Mozilla
- Fixed in 13 days
- Paid in 7 months
- Disclosed after 13 days
Created attachment 8626831 webmt.zip
Need to load this testcase over http to see instant crash. I think your libvpx copy is old, it is best to update it since we have found several others that were fixed recently.
==15811==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61f00006e29c at pc 0x7f617614b7d9 bp 0x7f614e38ab30 sp 0x7f614e38ab28
WRITE of size 4 at 0x61f00006e29c thread T22 (MediaPlback #2)
#0 0x7f617614b7d8 in resize_context_buffers media/libvpx/vp9/decoder/vp9_decodeframe.c:681:26
#1 0x7f617614ae89 in setup_frame_size media/libvpx/vp9/decoder/vp9_decodeframe.c:721:3
#2 0x7f61761402e7 in vp9_decode_frame media/libvpx/vp9/decoder/vp9_decodeframe.c:1368:5
#3 0x7f617615e171 in vp9_receive_compressed_data media/libvpx/vp9/decoder/vp9_decoder.c:356:3
#4 0x7f61762ec37b in frame_worker_hook media/libvpx/vp9/vp9_dx_iface.c:322:7
#5 0x7f61760faca6 in execute media/libvpx/vp9/common/vp9_thread.c:134:27
#6 0x7f61762eba0d in decode_one media/libvpx/vp9/vp9_dx_iface.c:493:5
#7 0x7f61762e5437 in decoder_decode media/libvpx/vp9/vp9_dx_iface.c:686:37
#8 0x7f61762ed2f7 in vpx_codec_decode media/libvpx/vpx/src/vpx_decoder.c:122:11
#9 0x7f6173224e5f in mozilla::SoftwareWebMVideoDecoder::DecodeVideoFrame(bool&, long) dom/media/webm/SoftwareWebMVideoDecoder.cpp:149:7
#10 0x7f6172dedc19 in mozilla::MediaDecoderReader::RequestVideoData(bool, long) dom/media/MediaDecoderReader.cpp:277:10
#11 0x7f6172ee1a6d in mozilla::detail::MethodCallWithTwoArgs<mozilla::MediaPromise<nsRefPtrmozilla::VideoData, mozilla::MediaDecoderReader::NotDecodedReason, true>, mozilla::MediaDecoderReader, bool, long>::Invoke() objdir-ff-asan/dist/include/MediaPromise.h:902:52
#12 0x7f6172ee1d83 in mozilla::detail::ProxyRunnable<mozilla::MediaPromise<nsRefPtrmozilla::VideoData, mozilla::MediaDecoderReader::NotDecodedReason, true> >::Run() objdir-ff-asan/dist/include/MediaPromise.h:919:31
#13 0x7f6172d9d12c in mozilla::AutoTaskDispatcher::TaskGroupRunnable::Run() dom/media/TaskDispatcher.h:181:11
#14 0x7f6172f295b9 in mozilla::MediaTaskQueue::Runner::Run() dom/media/MediaTaskQueue.cpp:256:5
#15 0x7f616e4c353e in nsThreadPool::Run() xpcom/threads/nsThreadPool.cpp:221:7
#16 0x7f616e4c3b1c in non-virtual thunk to nsThreadPool::Run() xpcom/threads/nsThreadPool.cpp:151:15
#17 0x7f616e4bd1b6 in nsThread::ProcessNextEvent(bool, bool*) xpcom/threads/nsThread.cpp:848:7
#18 0x7f616e53419c in NS_ProcessNextEvent(nsIThread*, bool) xpcom/glue/nsThreadUtils.cpp:265:10
#19 0x7f616ede4906 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) ipc/glue/MessagePump.cpp:326:20
#20 0x7f616ed6e6a1 in MessageLoop::Run() ipc/chromium/src/base/message_loop.cc:234:3
#21 0x7f616e4b9c51 in nsThread::ThreadFunc(void*) xpcom/threads/nsThread.cpp:360:5
#22 0x7f617bca0ffa in _pt_root nsprpub/pr/src/pthreads/ptthread.c:212:5
#23 0x7f617c2e5181 in start_thread /build/buildd/eglibc-2.19/nptl/pthread_create.c:312
0x61f00006e29f is located 0 bytes to the right of 3103-byte region [0x61f00006d680,0x61f00006e29f)
allocated by thread T24 (MediaPlback #3) here:
#0 0x4b6338 in __interceptor_malloc asan_rtl
#1 0x7f61762ef186 in vpx_calloc media/libvpx/vpx_mem/vpx_mem.c:126:10
#2 0x7f61762e446a in decoder_decode media/libvpx/vp9/vp9_dx_iface.c:372:36
#3 0x7f61762ed2f7 in vpx_codec_decode media/libvpx/vpx/src/vpx_decoder.c:122:11
#4 0x7f6173224e5f in mozilla::SoftwareWebMVideoDecoder::DecodeVideoFrame(bool&, long) dom/media/webm/SoftwareWebMVideoDecoder.cpp:149:7
#5 0x7f6172dedc19 in mozilla::MediaDecoderReader::RequestVideoData(bool, long) dom/media/MediaDecoderReader.cpp:277:10
#6 0x7f6172ee1a6d in mozilla::detail::MethodCallWithTwoArgs<mozilla::MediaPromise<nsRefPtrmozilla::VideoData, mozilla::MediaDecoderReader::NotDecodedReason, true>, mozilla::MediaDecoderReader, bool, long>::Invoke() objdir-ff-asan/dist/include/MediaPromise.h:902:52
#7 0x7f6172ee1d83 in mozilla::detail::ProxyRunnable<mozilla::MediaPromise<nsRefPtrmozilla::VideoData, mozilla::MediaDecoderReader::NotDecodedReason, true> >::Run() objdir-ff-asan/dist/include/MediaPromise.h:919:31
#8 0x7f6172d9d12c in mozilla::AutoTaskDispatcher::TaskGroupRunnable::Run() dom/media/TaskDispatcher.h:181:11
#9 0x7f6172f295b9 in mozilla::MediaTaskQueue::Runner::Run() dom/media/MediaTaskQueue.cpp:256:5
#10 0x7f616e4c353e in nsThreadPool::Run() xpcom/threads/nsThreadPool.cpp:221:7
#11 0x7f616e4c3b1c in non-virtual thunk to nsThreadPool::Run() xpcom/threads/nsThreadPool.cpp:151:15
#12 0x7f616e4bd1b6 in nsThread::ProcessNextEvent(bool, bool*) xpcom/threads/nsThread.cpp:848:7
#13 0x7f616e53419c in NS_ProcessNextEvent(nsIThread*, bool) xpcom/glue/nsThreadUtils.cpp:265:10
#14 0x7f616ede4a82 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) ipc/glue/MessagePump.cpp:355:5
#15 0x7f616ed6e6a1 in MessageLoop::Run() ipc/chromium/src/base/message_loop.cc:234:3
#16 0x7f616e4b9c51 in nsThread::ThreadFunc(void*) xpcom/threads/nsThread.cpp:360:5
#17 0x7f617bca0ffa in _pt_root nsprpub/pr/src/pthreads/ptthread.c:212:5
#18 0x7f617c2e5181 in start_thread /build/buildd/eglibc-2.19/nptl/pthread_create.c:312
Thread T22 (MediaPl~back #2) created by T0 (Web Content) here: #0 0x430269 in pthread_create asan_rtl #1 0x7f617bc9ddbf in _PR_CreateThread nsprpub/pr/src/pthreads/ptthread.c:453:14 #2 0x7f617bc9d9ea in PR_CreateThread nsprpub/pr/src/pthreads/ptthread.c:544:12 #3 0x7f616e4bb016 in nsThread::Init() xpcom/threads/nsThread.cpp:470:19 #4 0x7f616e4c0d1f in nsThreadManager::NewThread(unsigned int, unsigned int, nsIThread**) xpcom/threads/nsThreadManager.cpp:253:17 #5 0x7f616e4c248d in nsThreadPool::PutEvent(nsIRunnable*) xpcom/threads/nsThreadPool.cpp:102:3 #6 0x7f616e4c3f8a in nsThreadPool::Dispatch(nsIRunnable*, unsigned int) xpcom/threads/nsThreadPool.cpp:262:5 #7 0x7f6172f27dce in mozilla::MediaTaskQueue::DispatchLocked(already_AddRefed<nsIRunnable>, mozilla::MediaTaskQueue::DispatchMode, mozilla::AbstractThread::DispatchFailureHandling, mozilla::AbstractThread::DispatchReason) dom/media/MediaTaskQueue.cpp:65:17 #8 0x7f6172e8b4ff in mozilla::MediaTaskQueue::Dispatch(already_AddRefed<nsIRunnable>, mozilla::AbstractThread::DispatchFailureHandling, mozilla::AbstractThread::DispatchReason) objdir-ff-asan/dist/include/MediaTaskQueue.h:52:19 #9 0x7f6172d9bcc8 in mozilla::AutoTaskDispatcher::~AutoTaskDispatcher() dom/media/TaskDispatcher.h:233:5 #10 0x7f6172d9b8d7 in mozilla::XPCOMThreadWrapper::FireTailDispatcher() objdir-ff-asan/dist/include/mozilla/Maybe.h:373:7 #11 0x7f6172d9df20 in nsRunnableMethodImpl<void (mozilla::XPCOMThreadWrapper::)(), true>::Run() objdir-ff-asan/dist/include/nsThreadUtils.h:618:5 #12 0x7f6173e669c1 in nsBaseAppShell::RunSyncSectionsInternal(bool, unsigned int) widget/nsBaseAppShell.cpp:376:7 #13 0x7f6173e67c9e in non-virtual thunk to nsBaseAppShell::AfterProcessNextEvent(nsIThreadInternal, unsigned int, bool) widget/nsBaseAppShell.h:95:7 #14 0x7f616e4bd613 in nsThread::ProcessNextEvent(bool, bool*) xpcom/threads/nsThread.cpp:862:5 #15 0x7f616e53419c in NS_ProcessNextEvent(nsIThread*, bool) xpcom/glue/nsThreadUtils.cpp:265:10 #16 0x7f616ede3b2e in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) ipc/glue/MessagePump.cpp:95:21 #17 0x7f616ed6e6a1 in MessageLoop::Run() ipc/chromium/src/base/message_loop.cc:234:3 #18 0x7f6173e6524f in nsBaseAppShell::Run() widget/nsBaseAppShell.cpp:165:3 #19 0x7f6175d451f3 in XRE_RunAppShell toolkit/xre/nsEmbedFunctions.cpp:778:12 #20 0x7f616ed6e6a1 in MessageLoop::Run() ipc/chromium/src/base/message_loop.cc:234:3 #21 0x7f6175d44717 in XRE_InitChildProcess toolkit/xre/nsEmbedFunctions.cpp:614:7 #22 0x4dbbf2 in content_process_main(int, char**) ipc/contentproc/plugin-container.cpp:236:19 #23 0x7f616b8c2ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
Thread T24 (MediaPlback #3) created by T22 (MediaPlback #2) here:
#0 0x430269 in pthread_create asan_rtl
#1 0x7f617bc9ddbf in _PR_CreateThread nsprpub/pr/src/pthreads/ptthread.c:453:14
#2 0x7f617bc9d9ea in PR_CreateThread nsprpub/pr/src/pthreads/ptthread.c:544:12
#3 0x7f616e4bb016 in nsThread::Init() xpcom/threads/nsThread.cpp:470:19
#4 0x7f616e4c0d1f in nsThreadManager::NewThread(unsigned int, unsigned int, nsIThread**) xpcom/threads/nsThreadManager.cpp:253:17
#5 0x7f616e4c248d in nsThreadPool::PutEvent(nsIRunnable*) xpcom/threads/nsThreadPool.cpp:102:3
#6 0x7f616e4c3f8a in nsThreadPool::Dispatch(nsIRunnable*, unsigned int) xpcom/threads/nsThreadPool.cpp:262:5
#7 0x7f6172f27dce in mozilla::MediaTaskQueue::DispatchLocked(already_AddRefed<nsIRunnable>, mozilla::MediaTaskQueue::DispatchMode, mozilla::AbstractThread::DispatchFailureHandling, mozilla::AbstractThread::DispatchReason) dom/media/MediaTaskQueue.cpp:65:17
#8 0x7f6172e8b4ff in mozilla::MediaTaskQueue::Dispatch(already_AddRefed<nsIRunnable>, mozilla::AbstractThread::DispatchFailureHandling, mozilla::AbstractThread::DispatchReason) objdir-ff-asan/dist/include/MediaTaskQueue.h:52:19
#9 0x7f6172d9bcc8 in mozilla::AutoTaskDispatcher::~AutoTaskDispatcher() dom/media/TaskDispatcher.h:233:5
#10 0x7f6172f29980 in mozilla::MediaTaskQueue::Runner::Run() objdir-ff-asan/dist/include/MediaTaskQueue.h:152:5
#11 0x7f616e4c353e in nsThreadPool::Run() xpcom/threads/nsThreadPool.cpp:221:7
#12 0x7f616e4c3b1c in non-virtual thunk to nsThreadPool::Run() xpcom/threads/nsThreadPool.cpp:151:15
#13 0x7f616e4bd1b6 in nsThread::ProcessNextEvent(bool, bool*) xpcom/threads/nsThread.cpp:848:7
#14 0x7f616e53419c in NS_ProcessNextEvent(nsIThread*, bool) xpcom/glue/nsThreadUtils.cpp:265:10
#15 0x7f616ede4906 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) ipc/glue/MessagePump.cpp:326:20
#16 0x7f616ed6e6a1 in MessageLoop::Run() ipc/chromium/src/base/message_loop.cc:234:3
#17 0x7f616e4b9c51 in nsThread::ThreadFunc(void*) xpcom/threads/nsThread.cpp:360:5
#18 0x7f617bca0ffa in _pt_root nsprpub/pr/src/pthreads/ptthread.c:212:5
#19 0x7f617c2e5181 in start_thread /build/buildd/eglibc-2.19/nptl/pthread_create.c:312
Shadow bytes around the buggy address: 0x0c3e80005c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c3e80005c10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c3e80005c20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c3e80005c30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c3e80005c40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c3e80005c50: 00 00 00[07]fa fa fa fa fa fa fa fa fa fa fa fa 0x0c3e80005c60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c3e80005c70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c3e80005c80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c3e80005c90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c3e80005ca0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==15811==ABORTING
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A critical-severity memory corruption bug in Audio/Video. Mozilla made it public on 9 July 2015 as CVE-2015-4485.
About Memory corruption
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.