Stack-buffer-overflow Write in mozilla::FileBlockCache::Read
Originally disclosed on Mozilla
- Fixed in 23 days
- Paid in 3 months
- Disclosed after 23 days
Created attachment 8507575 stackw.zip
==35313==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f042e1930d1 at pc 0x000000454893 bp 0x7f042e192af0 sp 0x7f042e1922b0 WRITE of size 8200 at 0x7f042e1930d1 thread T83 (Media Decode #1) #0 0x454892 in __interceptor_read.part.40 /build/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:352 #1 0x7f0467295fc7 in pt_Read /build/firefox/src/nsprpub/pr/src/pthreads/ptio.c:1287:13 #2 0x7f0459e1962f in (anonymous namespace)::interposedRead(PRFileDesc*, void*, int) /build/firefox/src/xpcom/build/NSPRInterposer.cpp:58:10 #3 0x7f045e2b92ec in mozilla::FileBlockCache::Read(long, unsigned char*, int, int*) /build/firefox/src/content/media/FileBlockCache.cpp:146:16 #4 0x7f045e2d380c in mozilla::MediaCacheStream::Read(char*, unsigned int, unsigned int*) /build/firefox/src/content/media/MediaCache.cpp:672:10 #5 0x7f045e32395d in mozilla::ChannelMediaResource::Read(char*, unsigned int, unsigned int*) #6 0x7f045e4e8875 in mozilla::webm_read(void*, unsigned long, void*) #7 0x7f046047b1f6 in ne_peek_element /build/firefox/src/media/libnestegg/src/nestegg.c:551:10 #8 0x5d8997ddbd0d9e6f (<unknown module>)
Address 0x7f042e1930d1 is located in stack of thread T83 (Media Decode #1) at offset 49 in frame #0 0x7f046047b05f in ne_peek_element /build/firefox/src/media/libnestegg/src/nestegg.c:892
This frame has 2 object(s): [32, 33) 'b.i.i1' [48, 49) 'b.i.i' <== Memory access at offset 49 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions are supported) Thread T83 (Media Decode #1) created by T82 (Media S~hine #1) here: #0 0x439cbe in __interceptor_pthread_create asan_rtl #1 0x7f0467297030 in _PR_CreateThread /build/firefox/src/nsprpub/pr/src/pthreads/ptthread.c:453:14 #2 0x7f0467296c5a in PR_CreateThread /build/firefox/src/nsprpub/pr/src/pthreads/ptthread.c:544:12 #3 0x7f0459de2805 in nsThread::Init() /build/firefox/src/xpcom/threads/nsThread.cpp:455:19 #4 0x7f0459de7d94 in nsThreadManager::NewThread(unsigned int, unsigned int, nsIThread**) /build/firefox/src/xpcom/threads/nsThreadManager.cpp:269:17 #5 0x7f0459de91e0 in nsThreadPool::PutEvent(nsIRunnable*) /build/firefox/src/xpcom/threads/nsThreadPool.cpp:101:3 #6 0x7f0459deaa0c in nsThreadPool::Dispatch(nsIRunnable*, unsigned int) /build/firefox/src/xpcom/threads/nsThreadPool.cpp:261:5 #7 0x7f045e3469a4 in mozilla::MediaTaskQueue::DispatchLocked(mozilla::TemporaryRef<nsIRunnable>, mozilla::MediaTaskQueue::DispatchMode) /build/firefox/src/content/media/MediaTaskQueue.cpp:53:17 #8 0x7f045e30bc08 in mozilla::MediaDecoderStateMachine::EnqueueDecodeMetadataTask() /build/firefox/src/content/media/MediaTaskQueue.cpp:34:10 #9 0x7f045e31045a in mozilla::MediaDecoderStateMachine::RunStateMachine() /build/firefox/src/content/media/MediaDecoderStateMachine.cpp:2376:14 #10 0x7f045e364136 in non-virtual thunk to (anonymous namespace)::TimerEvent::Run() /build/firefox/src/content/media/MediaDecoderStateMachineScheduler.cpp:160:10 #11 0x7f0459dea070 in nsThreadPool::Run() /build/firefox/src/xpcom/threads/nsThreadPool.cpp:220:7 #12 0x7f0459dea5bc in non-virtual thunk to nsThreadPool::Run() #13 0x7f0459de46f6 in nsThread::ProcessNextEvent(bool, bool*) /build/firefox/src/xpcom/threads/nsThread.cpp:830:7 #14 0x7f0459e3aa66 in NS_ProcessNextEvent(nsIThread*, bool) /build/firefox/src/xpcom/glue/nsThreadUtils.cpp:265:10 #15 0x7f045a66d29e in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /build/firefox/src/ipc/glue/MessagePump.cpp:368:5 #16 0x7f045a61c561 in MessageLoop::Run() /build/firefox/src/ipc/chromium/src/base/message_loop.cc:233:3 #17 0x7f0459de14a6 in nsThread::ThreadFunc(void*) /build/firefox/src/xpcom/threads/nsThread.cpp:350:5 #18 0x7f046729a4d0 in _pt_root /build/firefox/src/nsprpub/pr/src/pthreads/ptthread.c:212:5 #19 0x7f046aa1fe99 in start_thread /build/buildd/eglibc-2.15/nptl/pthread_create.c:308
Thread T82 (Media S~hine #1) created by T0 here: #0 0x439cbe in __interceptor_pthread_create asan_rtl #1 0x7f0467297030 in _PR_CreateThread /build/firefox/src/nsprpub/pr/src/pthreads/ptthread.c:453:14 #2 0x7f0467296c5a in PR_CreateThread /build/firefox/src/nsprpub/pr/src/pthreads/ptthread.c:544:12 #3 0x7f0459de2805 in nsThread::Init() /build/firefox/src/xpcom/threads/nsThread.cpp:455:19 #4 0x7f0459de7d94 in nsThreadManager::NewThread(unsigned int, unsigned int, nsIThread**) /build/firefox/src/xpcom/threads/nsThreadManager.cpp:269:17 #5 0x7f0459de91e0 in nsThreadPool::PutEvent(nsIRunnable*) /build/firefox/src/xpcom/threads/nsThreadPool.cpp:101:3 #6 0x7f0459deaa0c in nsThreadPool::Dispatch(nsIRunnable*, unsigned int) /build/firefox/src/xpcom/threads/nsThreadPool.cpp:261:5 #7 0x7f045e315989 in mozilla::MediaDecoderStateMachineScheduler::Schedule(long) /build/firefox/src/content/media/MediaDecoderStateMachineScheduler.cpp:129:10 #8 0x7f045e2e2fde in mozilla::MediaDecoder::InitializeStateMachine(mozilla::MediaDecoder*) /build/firefox/src/content/media/MediaDecoderStateMachine.cpp:3025:10 #9 0x7f045e14c73d in mozilla::dom::HTMLMediaElement::FinishDecoderSetup(mozilla::MediaDecoder*, mozilla::MediaResource*, nsIStreamListener**, mozilla::MediaDecoder*) /build/firefox/src/content/html/content/src/HTMLMediaElement.cpp:2659:17 #10 0x7f045e13b388 in mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /build/firefox/src/content/html/content/src/HTMLMediaElement.cpp:2607:12 #11 0x7f045e13a0b3 in mozilla::dom::HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*, nsISupports*) /build/firefox/src/content/html/content/src/HTMLMediaElement.cpp:349:7 #12 0x7f045a33ce42 in mozilla::net::nsHttpChannel::CallOnStartRequest() /build/firefox/src/netwerk/protocol/http/nsHttpChannel.cpp:914:14 #13 0x7f045a348c45 in mozilla::net::nsHttpChannel::ContinueProcessNormal(tag_nsresult) /build/firefox/src/netwerk/protocol/http/nsHttpChannel.cpp:1668:10 #14 0x7f045a34555a in mozilla::net::nsHttpChannel::ProcessNormal() /build/firefox/src/netwerk/protocol/http/nsHttpChannel.cpp:1603:12 #15 0x7f045a344a55 in mozilla::net::nsHttpChannel::ProcessResponse() /build/firefox/src/netwerk/protocol/http/nsHttpChannel.cpp:1513:14 #16 0x7f045a362e4e in mozilla::net::nsHttpChannel::OnStartRequest(nsIRequest*, nsISupports*) /build/firefox/src/netwerk/protocol/http/nsHttpChannel.cpp:5172:20 #17 0x7f0459f73fb6 in nsInputStreamPump::OnStateStart() /build/firefox/src/netwerk/base/src/nsInputStreamPump.cpp:531:14 #18 0x7f0459f734c0 in nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*) /build/firefox/src/netwerk/base/src/nsInputStreamPump.cpp:433:25 #19 0x7f0459dac829 in nsInputStreamReadyEvent::Run() /build/firefox/src/xpcom/io/nsStreamUtils.cpp:88:9 #20 0x7f0459de46f6 in nsThread::ProcessNextEvent(bool, bool*) /build/firefox/src/xpcom/threads/nsThread.cpp:830:7 #21 0x7f0459e3aa66 in NS_ProcessNextEvent(nsIThread*, bool) /build/firefox/src/xpcom/glue/nsThreadUtils.cpp:265:10 #22 0x7f045a66c34f in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /build/firefox/src/ipc/glue/MessagePump.cpp:99:21 #23 0x7f045a61c561 in MessageLoop::Run() /build/firefox/src/ipc/chromium/src/base/message_loop.cc:233:3 #24 0x7f045dbd214f in nsBaseAppShell::Run() #25 0x7f04600884f1 in nsAppStartup::Run() /build/firefox/src/toolkit/components/startup/nsAppStartup.cpp:280:19 #26 0x7f0460169c9e in XREMain::XRE_mainRun() /build/firefox/src/toolkit/xre/nsAppRunner.cpp:4095:10 #27 0x7f046016ac86 in XREMain::XRE_main(int, char**, nsXREAppData const*) /build/firefox/src/toolkit/xre/nsAppRunner.cpp:4168:8 #28 0x7f046016bac6 in XRE_main /build/firefox/src/toolkit/xre/nsAppRunner.cpp:4382:16 #29 0x4bf702 in main /build/firefox/src/browser/app/nsBrowserApp.cpp:287:12 #30 0x7f0469a5c76c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226
SUMMARY: AddressSanitizer: stack-buffer-overflow ??:0 ?? Shadow bytes around the buggy address: 0x0fe105c2a5c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe105c2a5d0: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 0x0fe105c2a5e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe105c2a5f0: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 0x0fe105c2a600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0fe105c2a610: 00 00 00 00 f1 f1 f1 f1 01 f2[01]f3 00 00 00 00 0x0fe105c2a620: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe105c2a630: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe105c2a640: f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe105c2a650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe105c2a660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 ASan internal: fe ==35313==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 11 November 2014 as CVE-2014-1593.
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.