Heap-buffer-overflow due to overflow in nestegg_track_codec_data
Originally disclosed on Mozilla
- Fixed in 11 days
- Paid in 14 days
- Disclosed after 11 days
Created attachment 8654765
repro-file.webm
Tested on:
OS: Ubuntu 14.04
Firefox: ASAN debug-build from https://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-linux64-asan-debug/latest/
ASAN-trace:
=================================================================
==28309==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6070000d1b9b at pc 0x46fac7 bp 0x7f81856f75f0 sp 0x7f81856f6db0
READ of size 110 at 0x6070000d1b9b thread T26 (MediaPl~back #1)
#0 0x46fac6 in memcpy /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:366
#1 0x7f81acac2b87 in void AssignRangeAlgorithm<true, true>::implementation<unsigned char, unsigned char, unsigned long, unsigned long>(unsigned char*, unsigned long, unsigned long, unsigned char const*
) /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/obj-firefox/media/libstagefright/../../dist/include/nsTArray.h:559
#2 0x7f81aca86265 in unsigned char* nsTArray_Impl<unsigned char, nsTArrayInfallibleAllocator>::AppendElements<unsigned char, nsTArrayInfallibleAllocator>(unsigned char const*, unsigned long) /builds/sl
ave/m-cen-l64-asan-d-0000000000000/build/src/obj-firefox/media/libstagefright/../../dist/include/nsTArray.h:1510
#3 0x7f81b07467d0 in mozilla::XiphHeadersToExtradata(mozilla::MediaByteBuffer*, nsTArray<unsigned char const*> const&, nsTArray<unsigned long> const&) /builds/slave/m-cen-l64-asan-d-0000000000000/build
/src/dom/media/XiphExtradata.cpp:26
#4 0x7f81b098652b in mozilla::WebMDemuxer::ReadMetadata() /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/dom/media/webm/WebMDemuxer.cpp:412
#5 0x7f81b09857c6 in mozilla::WebMDemuxer::Init() /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/dom/media/webm/WebMDemuxer.cpp:161
#6 0x7f81b062c2e2 in mozilla::MediaFormatReader::AsyncReadMetadata() /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/dom/media/MediaFormatReader.cpp:293
#7 0x7f81b06a8815 in nsRefPtr<mozilla::MozPromise<nsRefPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason, true> > mozilla::detail::MethodCallInvokeHelper<nsRefPtr<mozilla::MozPromise<nsR
efPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason, true> >, mozilla::MediaDecoderReader>(nsRefPtr<mozilla::MozPromise<nsRefPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason,
true> > (mozilla::MediaDecoderReader::*)(), mozilla::MediaDecoderReader*, mozilla::Tuple<>&, mozilla::IndexSequence<>) /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/obj-firefox/dom/media/../../di
st/include/mozilla/MozPromise.h:869
#8 0x7f81b06a86ce in mozilla::detail::MethodCall<mozilla::MozPromise<nsRefPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason, true>, mozilla::MediaDecoderReader>::Invoke() /builds/slave/m
-cen-l64-asan-d-0000000000000/build/src/obj-firefox/dom/media/../../dist/include/mozilla/MozPromise.h:894
#9 0x7f81b06a849c in mozilla::detail::ProxyRunnable<mozilla::MozPromise<nsRefPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason, true>, mozilla::MediaDecoderReader>::Run() /builds/slave/m
-cen-l64-asan-d-0000000000000/build/src/obj-firefox/dom/media/../../dist/include/mozilla/MozPromise.h:912
#10 0x7f81acc68727 in mozilla::AutoTaskDispatcher::TaskGroupRunnable::Run() /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/obj-firefox/xpcom/threads/../../dist/include/mozilla/TaskDispatcher.h:
180
.
.
.
0x6070000d1b9b is located 0 bytes to the right of 75-byte region [0x6070000d1b50,0x6070000d1b9b)
allocated by thread T26 (MediaPl~back #1) here:
#0 0x48290b in realloc /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:95
#1 0x7f81accafb02 in mozilla::CountingAllocatorBase<NesteggReporter>::CountingRealloc(void*, unsigned long) /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/obj-firefox/xpcom/build/../../dist/include/mozilla/CountingAllocatorBase.h:79
#2 0x7f81b2b11113 in halloc /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/media/libnestegg/src/halloc.c:78
#3 0x7f81b2b197c4 in ne_pool_alloc /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/media/libnestegg/src/nestegg.c:534
#4 0x7f81b2b1970d in ne_read_binary /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/media/libnestegg/src/nestegg.c:753
#5 0x7f81b2b191da in ne_read_simple /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/media/libnestegg/src/nestegg.c:1017
#6 0x7f81b2b128cf in ne_parse /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/media/libnestegg/src/nestegg.c:1088
#7 0x7f81b2b11c23 in nestegg_init /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/media/libnestegg/src/nestegg.c:1948
#8 0x7f81b0985bc0 in mozilla::WebMDemuxer::ReadMetadata() /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/dom/media/webm/WebMDemuxer.cpp:272
#9 0x7f81b09857c6 in mozilla::WebMDemuxer::Init() /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/dom/media/webm/WebMDemuxer.cpp:161
#10 0x7f81b062c2e2 in mozilla::MediaFormatReader::AsyncReadMetadata() /builds/slave/m-cen-l64-asan-d-0000000000000/build/src/dom/media/MediaFormatReader.cpp:293
.
.
.
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 high-severity memory corruption bug in Audio/Video: Playback. Mozilla made it public on 11 September 2015 as CVE-2015-4511.
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.