out of bounds read in libxul.so!gfxContext::Polygon
Originally disclosed on Mozilla
- Fixed in 18 hours
- Paid in 11 days
- Disclosed after 18 hours
Created attachment 8364497 C9881027-223471-mathml.html
Found by the BlackBerry Security Automated Analysis Team's fuzzing framework ALF.
==7859==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffa141ed10 at pc 0x7fb96506196c bp 0x7fffa141e850 sp 0x7fffa141e848 READ of size 8 at 0x7fffa141ed10 thread T0 #0 0x7fb96506196b (libxul.so!gfxContext::Polygon(gfxPoint const*, unsigned int)+0x39b) Line 66 of "/builds/slave/m-in-l64-asan-0000000000000000/build/gfx/thebes/gfx2DGlue.h" #1 0x7fb9684f94a3 (libxul.so!nsDisplayNotation::Paint(nsDisplayListBuilder*, nsRenderingContext*)+0xa43) Line 803 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/mathml/nsMathMLmencloseFrame.cpp" #2 0x7fb967e481c7 (libxul.so!mozilla::FrameLayerBuilder::PaintItems(nsTArraymozilla::FrameLayerBuilder::ClippedDisplayItem&, nsIntRect const&, gfxContext*, nsRenderingContext*, nsDisplayListBuilder*, nsPresContext*, nsIntPoint const&, float, float, int)+0xe47) Line 3487 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/base/FrameLayerBuilder.cpp" #3 0x7fb967e4a4dd (libxul.so!mozilla::FrameLayerBuilder::DrawThebesLayer(mozilla::layers::ThebesLayer*, gfxContext*, nsIntRegion const&, mozilla::layers::DrawRegionClip, nsIntRegion const&, void*)+0x15fd) Line 3649 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/base/FrameLayerBuilder.cpp" #4 0x7fb965118b41 (libxul.so!mozilla::layers::BasicThebesLayer::PaintBuffer(gfxContext*, nsIntRegion const&, nsIntRegion const&, nsIntRegion const&, bool, mozilla::layers::DrawRegionClip, void ()(mozilla::layers::ThebesLayer, gfxContext*, nsIntRegion const&, mozilla::layers::DrawRegionClip, nsIntRegion const&, void*), void*)+0x81) Line 114 of "/builds/slave/m-in-l64-asan-0000000000000000/build/gfx/layers/basic/BasicThebesLayer.h" #5 0x7fb9650fa5aa (libxul.so!mozilla::layers::BasicThebesLayer::Validate(void ()(mozilla::layers::ThebesLayer, gfxContext*, nsIntRegion const&, mozilla::layers::DrawRegionClip, nsIntRegion const&, void*), void*)+0x69a) Line 208 of "/builds/slave/m-in-l64-asan-0000000000000000/build/gfx/layers/basic/BasicThebesLayer.cpp" #6 0x7fb9650ed4bd (libxul.so!non-virtual thunk to mozilla::layers::BasicContainerLayer::Validate(void ()(mozilla::layers::ThebesLayer, gfxContext*, nsIntRegion const&, mozilla::layers::DrawRegionClip, nsIntRegion const&, void*), void*)+0x8d) Line 124 of "/builds/slave/m-in-l64-asan-0000000000000000/build/gfx/layers/basic/BasicContainerLayer.cpp" #7 0x7fb9650ed4bd (libxul.so!non-virtual thunk to mozilla::layers::BasicContainerLayer::Validate(void ()(mozilla::layers::ThebesLayer, gfxContext*, nsIntRegion const&, mozilla::layers::DrawRegionClip, nsIntRegion const&, void*), void*)+0x8d) Line 124 of "/builds/slave/m-in-l64-asan-0000000000000000/build/gfx/layers/basic/BasicContainerLayer.cpp" #8 0x7fb9650f061f (libxul.so!mozilla::layers::BasicLayerManager::EndTransactionInternal(void ()(mozilla::layers::ThebesLayer, gfxContext*, nsIntRegion const&, mozilla::layers::DrawRegionClip, nsIntRegion const&, void*), void*, mozilla::layers::LayerManager::EndTransactionFlags)+0x56f) Line 597 of "/builds/slave/m-in-l64-asan-0000000000000000/build/gfx/layers/basic/BasicLayerManager.cpp" #9 0x7fb967f256ef (libxul.so!nsDisplayList::PaintForFrame(nsDisplayListBuilder*, nsRenderingContext*, nsIFrame*, unsigned int) const+0x13bf) Line 1231 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/base/nsDisplayList.cpp" #10 0x7fb967f2424a (libxul.so!nsDisplayList::PaintRoot(nsDisplayListBuilder*, nsRenderingContext*, unsigned int) const+0x24a) Line 1076 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/base/nsDisplayList.cpp" #11 0x7fb967f75d95 (libxul.so!nsLayoutUtils::PaintFrame(nsRenderingContext*, nsIFrame*, nsRegion const&, unsigned int, unsigned int)+0x2205) Line 2339 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/base/nsLayoutUtils.cpp" #12 0x7fb967dee741 (libxul.so!PresShell::Paint(nsView*, nsRegion const&, unsigned int)+0xe11) Line 5847 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/base/nsPresShell.cpp" #13 0x7fb966d8e87c (libxul.so!nsViewManager::ProcessPendingUpdatesForView(nsView*, bool)+0x3fc) Line 420 of "/builds/slave/m-in-l64-asan-0000000000000000/build/view/src/nsViewManager.cpp" #14 0x7fb967e121d0 (libxul.so!nsRefreshDriver::Tick(long, mozilla::TimeStamp)+0x2ba0) Line 1207 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/base/nsRefreshDriver.cpp" #15 0x7fb967e16030 (libxul.so!mozilla::RefreshDriverTimer::Tick()+0x1f0) Line 168 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/base/nsRefreshDriver.cpp" #16 0x7fb963af5d83 (libxul.so!nsTimerImpl::Fire()+0x6b3) Line 551 of "/builds/slave/m-in-l64-asan-0000000000000000/build/xpcom/threads/nsTimerImpl.cpp" #17 0x7fb963af64e6 (libxul.so!nsTimerEvent::Run()+0x66) Line 635 of "/builds/slave/m-in-l64-asan-0000000000000000/build/xpcom/threads/nsTimerImpl.cpp" #18 0x7fb963aedcf7 (libxul.so!nsThread::ProcessNextEvent(bool, bool*)+0xbd7) Line 637 of "/builds/slave/m-in-l64-asan-0000000000000000/build/xpcom/threads/nsThread.cpp" #19 0x7fb9639c66d1 (libxul.so!NS_ProcessNextEvent(nsIThread*, bool)+0xb1) Line 263 of "/builds/slave/m-in-l64-asan-0000000000000000/build/xpcom/glue/nsThreadUtils.cpp" #20 0x7fb9642e7a81 (libxul.so!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*)+0x311) Line 95 of "/builds/slave/m-in-l64-asan-0000000000000000/build/ipc/glue/MessagePump.cpp" #21 0x7fb9642592f3 (libxul.so!MessageLoop::Run()+0x1c3) Line 226 of "/builds/slave/m-in-l64-asan-0000000000000000/build/ipc/chromium/src/base/message_loop.cc" #22 0x7fb966421a5c (libxul.so!nsBaseAppShell::Run()+0x5c) Line 161 of "/builds/slave/m-in-l64-asan-0000000000000000/build/widget/xpwidgets/nsBaseAppShell.cpp" #23 0x7fb969111676 (libxul.so!nsAppStartup::Run()+0xc6) Line 276 of "/builds/slave/m-in-l64-asan-0000000000000000/build/toolkit/components/startup/nsAppStartup.cpp" #24 0x7fb968f29ca5 (libxul.so!XREMain::XRE_mainRun()+0x1de5) Line 4023 of "/builds/slave/m-in-l64-asan-0000000000000000/build/toolkit/xre/nsAppRunner.cpp" #25 0x7fb968f2abda (libxul.so!XREMain::XRE_main(int, char**, nsXREAppData const*)+0x4fa) Line 4091 of "/builds/slave/m-in-l64-asan-0000000000000000/build/toolkit/xre/nsAppRunner.cpp" #26 0x7fb968f2bb0b (libxul.so!XRE_main+0x3ab) Line 4331 of "/builds/slave/m-in-l64-asan-0000000000000000/build/toolkit/xre/nsAppRunner.cpp" #27 0x459dcd (firefox!main+0x94d) Line 280 of "/builds/slave/m-in-l64-asan-0000000000000000/build/browser/app/nsBrowserApp.cpp" #28 0x7fb97416676c (libc.so.6!__libc_start_main+0xec) Line 226 of "libc-start.c" #29 0x45934c (firefox!_start+0x28) Address 0x7fffa141ed10 is located in stack of thread T0 at offset 784 in frame #0 0x7fb9684f8a6f (libxul.so!nsDisplayNotation::Paint(nsDisplayListBuilder*, nsRenderingContext*)+0xf) Line 739 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/mathml/nsMathMLmencloseFrame.cpp" This frame has 11 object(s): [32, 64) 'rect' [96, 112) '' [160, 176) '' [224, 288) '' [320, 336) '' [384, 400) '' [448, 464) '' [512, 528) '' [576, 592) '' [640, 656) '' [704, 784) 'p' HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions are supported) Shadow bytes around the buggy address: 0x10007427bd50: f2 f2 f2 f2 00 00 f4 f4 f2 f2 f2 f2 00 00 00 00 0x10007427bd60: 00 00 00 00 f2 f2 f2 f2 00 00 f4 f4 f2 f2 f2 f2 0x10007427bd70: 00 00 f4 f4 f2 f2 f2 f2 00 00 f4 f4 f2 f2 f2 f2 0x10007427bd80: 00 00 f4 f4 f2 f2 f2 f2 00 00 f4 f4 f2 f2 f2 f2 0x10007427bd90: 00 00 f4 f4 f2 f2 f2 f2 00 00 00 00 00 00 00 00 =>0x10007427bda0: 00 00[f4]f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00 0x10007427bdb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10007427bdc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10007427bdd0: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 0x10007427bde0: 00 00 f4 f4 f2 f2 f2 f2 00 00 00 00 f2 f2 f2 f2 0x10007427bdf0: 00 00 00 00 f3 f3 f3 f3 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 ASan internal: fe ==7859==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 high-severity memory corruption bug in MathML. Mozilla made it public on 24 January 2014 as CVE-2014-1508.
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.