Heap-use-after-free in mozilla::dom::SVGPolygonElement::GetMarkPoints
Originally disclosed on Mozilla
- Fixed in 46 hours
- Paid in 2 months
- Disclosed after 46 hours
Created attachment 775254 Testcase
Looks like yesterday's regression from http://hg.mozilla.org/mozilla-central/rev/89f980fdb567
==1682==ERROR: AddressSanitizer: heap-use-after-free on address 0x60300031d3f4 at pc 0x7f8518da638c bp 0x7fffbdc0c300 sp 0x7fffbdc0c2f8 WRITE of size 4 at 0x60300031d3f4 thread T0 #0 0x7f8518da638b in mozilla::dom::SVGPolygonElement::GetMarkPoints(nsTArray<nsSVGMark>) content/svg/content/src/SVGPolygonElement.cpp:58 #1 0x7f8518c9d3f9 in nsSVGPathGeometryFrame::GetBBoxContribution(gfxMatrix const&, unsigned int) layout/svg/nsSVGPathGeometryFrame.cpp:452 #2 0x7f8518c9c19d in nsSVGPathGeometryFrame::ReflowSVG() layout/svg/nsSVGPathGeometryFrame.cpp:314 #3 0x7f8518c49e35 in nsSVGDisplayContainerFrame::ReflowSVG() layout/svg/nsSVGContainerFrame.cpp:331 #4 0x7f8518c94aaa in nsSVGOuterSVGFrame::Reflow(nsPresContext, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) layout/svg/nsSVGOuterSVGFrame.cpp:475 #5 0x7f851744f97b in nsLineLayout::ReflowFrame(nsIFrame*, unsigned int&, nsHTMLReflowMetrics*, bool&) layout/generic/nsLineLayout.cpp:830 #6 0x7f85173473d0 in nsBlockFrame::ReflowInlineFrame(nsBlockReflowState&, nsLineLayout&, nsLineList_iterator, nsIFrame*, LineReflowStatus*) layout/generic/nsBlockFrame.cpp:3696 #7 0x7f85173462d6 in nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState&, nsLineLayout&, nsLineList_iterator, nsFlowAreaRect&, int&, nsFloatManager::SavedState*, bool*, LineReflowStatus*, bool) layout/generic/nsBlockFrame.cpp:3493 #8 0x7f85173435b1 in nsBlockFrame::ReflowInlineFrames(nsBlockReflowState&, nsLineList_iterator, bool*) layout/generic/nsBlockFrame.cpp:3351 #9 0x7f8517338b23 in nsBlockFrame::ReflowDirtyLines(nsBlockReflowState&) layout/generic/nsBlockFrame.cpp:2492 #10 0x7f85173336c1 in nsBlockFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) layout/generic/nsBlockFrame.cpp:1010 #11 0x7f8517358692 in nsBlockReflowContext::ReflowBlock(nsRect const&, bool, nsCollapsingMargin&, int, bool, nsLineBox*, nsHTMLReflowState&, unsigned int&, nsBlockReflowState&) layout/generic/nsBlockReflowContext.cpp:266 #12 0x7f8517340cc7 in nsBlockFrame::ReflowBlockFrame(nsBlockReflowState&, nsLineList_iterator, bool*) layout/generic/nsBlockFrame.cpp:3078 #13 0x7f8517338dc1 in nsBlockFrame::ReflowDirtyLines(nsBlockReflowState&) layout/generic/nsBlockFrame.cpp:2489 #14 0x7f85173336c1 in nsBlockFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) layout/generic/nsBlockFrame.cpp:1010 #15 0x7f851737ad04 in nsContainerFrame::ReflowChild(nsIFrame*, nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, int, int, unsigned int, unsigned int&, nsOverflowContinuationTracker*) layout/generic/nsContainerFrame.cpp:970 #16 0x7f851736ee10 in nsCanvasFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) layout/generic/nsCanvasFrame.cpp:487 #17 0x7f851737ad04 in nsContainerFrame::ReflowChild(nsIFrame*, nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, int, int, unsigned int, unsigned int&, nsOverflowContinuationTracker*) layout/generic/nsContainerFrame.cpp:970 #18 0x7f85173eba46 in nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState*, bool, bool, nsHTMLReflowMetrics*, bool) layout/generic/nsGfxScrollFrame.cpp:445 #19 0x7f85173ec7e7 in nsHTMLScrollFrame::ReflowContents(ScrollReflowState*, nsHTMLReflowMetrics const&) layout/generic/nsGfxScrollFrame.cpp:545 #20 0x7f85173ee901 in nsHTMLScrollFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) layout/generic/nsGfxScrollFrame.cpp:786 #21 0x7f851737ad04 in nsContainerFrame::ReflowChild(nsIFrame*, nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, int, int, unsigned int, unsigned int&, nsOverflowContinuationTracker*) layout/generic/nsContainerFrame.cpp:970 #22 0x7f8517500351 in ViewportFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) layout/generic/nsViewportFrame.cpp:225 #23 0x7f851728340c in PresShell::DoReflow(nsIFrame*, bool) layout/base/nsPresShell.cpp:7831 #24 0x7f85172939b2 in PresShell::ProcessReflowCommands(bool) layout/base/nsPresShell.cpp:7972 #25 0x7f851729334e in PresShell::FlushPendingNotifications(mozilla::ChangesToFlush) layout/base/nsPresShell.cpp:3897 #26 0x7f85172c1f0c in nsRefreshDriver::Tick(long, mozilla::TimeStamp) layout/base/nsRefreshDriver.cpp:1183 #27 0x7f85172c79c3 in mozilla::RefreshDriverTimer::Tick() layout/base/nsRefreshDriver.cpp:171 #28 0x7f851693636c in nsTimerImpl::Fire() xpcom/threads/nsTimerImpl.cpp:543 #29 0x7f8516936896 in nsTimerEvent::Run() xpcom/threads/nsTimerImpl.cpp:627 #30 0x7f851692c955 in nsThread::ProcessNextEvent(bool, bool*) xpcom/threads/nsThread.cpp:621 #31 0x7f851686973a in NS_ProcessNextEvent(nsIThread*, bool) objdir-ff-asan/xpcom/build/nsThreadUtils.cpp:238 #32 0x7f8515a8cc6c in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) ipc/glue/MessagePump.cpp:81 #33 0x7f85169d7039 in MessageLoop::Run() ipc/chromium/src/base/message_loop.cc:219 #34 0x7f85196f192c in nsBaseAppShell::Run() widget/xpwidgets/nsBaseAppShell.cpp:163 #35 0x7f85191bb29a in nsAppStartup::Run() toolkit/components/startup/nsAppStartup.cpp:269 #36 0x7f851579286a in XREMain::XRE_mainRun() toolkit/xre/nsAppRunner.cpp:3853 #37 0x7f85157936a9 in XREMain::XRE_main(int, char**, nsXREAppData const*) toolkit/xre/nsAppRunner.cpp:3921 #38 0x7f8515794519 in XRE_main toolkit/xre/nsAppRunner.cpp:4123 #39 0x4282a4 in main browser/app/nsBrowserApp.cpp:272 #40 0x7f851fd3b76c in ?? ?? #41 0x4275b4 in _start ?? 0x60300031d3f4 is located 20 bytes inside of 24-byte region [0x60300031d3e0,0x60300031d3f8) freed by thread T0 here: #0 0x41b577 in realloc #1 0x7f851e27241e in moz_xrealloc memory/mozalloc/mozalloc.cpp:86 previously allocated by thread T0 here: #0 0x41b432 in malloc #1 0x7f851e272388 in moz_xmalloc memory/mozalloc/mozalloc.cpp:54 Shadow bytes around the buggy address: 0x0c068005ba20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c068005ba30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c068005ba40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c068005ba50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c068005ba60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c068005ba70: fa fa fa fa fa fa fa fa fa fa fa fa fd fd[fd]fa 0x0c068005ba80: fa fa 00 00 02 fa fa fa 00 00 02 fa fa fa 00 00 0x0c068005ba90: 00 00 fa fa fd fd fd fa fa fa fd fd fd fa fa fa 0x0c068005baa0: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd 0x0c068005bab0: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd 0x0c068005bac0: fd fd fa fa fd fd fd fd fa fa fd fd fd fd 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 righ 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 ==1682==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 SVG. Mozilla made it public on 15 July 2013.
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.