Negative-size-param in nsTableFrame::InsertCol, with "writing-mode: vertical-rl"
Originally disclosed on Mozilla
- Fixed in 22 days
- Paid in 3 months
- Disclosed after 22 days
Created attachment 8598431 Testcase
==4114==ERROR: AddressSanitizer: negative-size-param: (size=-16) #0 0x4a0fd0 in __asan_memmove asan_rtl #1 0x7f09dd574dfd in MoveElements /build/firefox/src/objdir-ff-asan/layout/tables/../../dist/include/nsTArray.h:588:5 #2 0x7f09dd574dfd in ShiftData /build/firefox/src/objdir-ff-asan/layout/tables/../../dist/include/nsTArray-inl.h:268 #3 0x7f09dd574dfd in InsertElementAt<nsTableColFrame > /build/firefox/src/objdir-ff-asan/layout/tables/../../dist/include/nsTArray.h:1295 #4 0x7f09dd574dfd in nsTableFrame::InsertCol(nsTableColFrame&, int) /build/firefox/src/layout/tables/nsTableFrame.cpp:578 #5 0x7f09dd574933 in nsTableColGroupFrame::AddColsToTable(int, bool, nsFrameList::Slice const&) /build/firefox/src/layout/tables/nsTableColGroupFrame.cpp:88:5 #6 0x7f09dd5a0974 in InsertColGroups /build/firefox/src/layout/tables/nsTableFrame.cpp:562:5 #7 0x7f09dd5a0974 in nsTableFrame::AppendFrames(mozilla::layout::FrameChildListID, nsFrameList&) /build/firefox/src/layout/tables/nsTableFrame.cpp:2256 #8 0x7f09dd5a170e in nsTableFrame::InsertFrames(mozilla::layout::FrameChildListID, nsIFrame, nsFrameList&) /build/firefox/src/layout/tables/nsTableFrame.cpp:2304:5 #9 0x7f09dd04a75c in InsertFrames /build/firefox/src/layout/base/nsFrameManager.cpp:486:5 #10 0x7f09dd04a75c in nsCSSFrameConstructor::AppendFramesToParent(nsFrameConstructorState&, nsContainerFrame*, nsFrameItems&, nsIFrame*, bool) /build/firefox/src/layout/base/nsCSSFrameConstructor.cpp:6288 #11 0x7f09dd0565e1 in nsCSSFrameConstructor::ContentAppended(nsIContent*, nsIContent*, bool) /build/firefox/src/layout/base/nsCSSFrameConstructor.cpp:7290:5 #12 0x7f09dd04fd3c in nsCSSFrameConstructor::CreateNeededFrames(nsIContent*) /build/firefox/src/layout/base/nsCSSFrameConstructor.cpp:6888:5 #13 0x7f09dd04fdf5 in nsCSSFrameConstructor::CreateNeededFrames(nsIContent*) /build/firefox/src/layout/base/nsCSSFrameConstructor.cpp:6895:7 #14 0x7f09dd04fdf5 in nsCSSFrameConstructor::CreateNeededFrames(nsIContent*) /build/firefox/src/layout/base/nsCSSFrameConstructor.cpp:6895:7 #15 0x7f09dd056f2a in nsCSSFrameConstructor::CreateNeededFrames() /build/firefox/src/layout/base/nsCSSFrameConstructor.cpp:6910:5 #16 0x7f09dcfc46bf in mozilla::RestyleManager::ProcessPendingRestyles() /build/firefox/src/layout/base/RestyleManager.cpp:1627:3 #17 0x7f09dd1ee5a1 in PresShell::FlushPendingNotifications(mozilla::ChangesToFlush) /build/firefox/src/layout/base/nsPresShell.cpp:4273:9 #18 0x7f09dcf54100 in nsRefreshDriver::Tick(long, mozilla::TimeStamp) /build/firefox/src/layout/base/nsRefreshDriver.cpp:1679:11 #19 0x7f09dcf5e723 in TickDriver /build/firefox/src/layout/base/nsRefreshDriver.cpp:198:5 #20 0x7f09dcf5e723 in mozilla::RefreshDriverTimer::Tick(long, mozilla::TimeStamp) /build/firefox/src/layout/base/nsRefreshDriver.cpp:189 #21 0x7f09dcf605e9 in RunRefreshDrivers /build/firefox/src/layout/base/nsRefreshDriver.cpp:440:5 #22 0x7f09dcf605e9 in TickRefreshDriver /build/firefox/src/layout/base/nsRefreshDriver.cpp:374 #23 0x7f09dcf605e9 in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::TimeStamp) /build/firefox/src/layout/base/nsRefreshDriver.cpp:345 #24 0x7f09dd7ecdb4 in mozilla::layout::VsyncChild::RecvNotify(mozilla::TimeStamp const&) /build/firefox/src/layout/ipc/VsyncChild.cpp:63:5 #25 0x7f09d7fd0b8b in mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) /build/firefox/src/objdir-ff-asan/ipc/ipdl/./PVsyncChild.cpp:224:20 #26 0x7f09d7b67eb7 in mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) /build/firefox/src/objdir-ff-asan/ipc/ipdl/./PBackgroundChild.cpp:1082:16 #27 0x7f09d7af28fb in mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) /build/firefox/src/ipc/glue/MessageChannel.cpp:1248:14 #28 0x7f09d7aefdaa in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message const&) /build/firefox/src/ipc/glue/MessageChannel.cpp:1167:9 #29 0x7f09d7ae2db0 in mozilla::ipc::MessageChannel::OnMaybeDequeueOne() /build/firefox/src/ipc/glue/MessageChannel.cpp:1151:9 #30 0x7f09d7a84c1d in RunTask /build/firefox/src/ipc/chromium/src/base/message_loop.cc:361:3 #31 0x7f09d7a84c1d in MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) /build/firefox/src/ipc/chromium/src/base/message_loop.cc:369 #32 0x7f09d7a858ea in MessageLoop::DoWork() /build/firefox/src/ipc/chromium/src/base/message_loop.cc:456:13 #33 0x7f09d7af9f02 in mozilla::ipc::DoWorkRunnable::Run() /build/firefox/src/ipc/glue/MessagePump.cpp:233:3 #34 0x7f09d71e67e5 in nsThread::ProcessNextEvent(bool, bool*) /build/firefox/src/xpcom/threads/nsThread.cpp:866:7 #35 0x7f09d7245b5c in NS_ProcessNextEvent(nsIThread*, bool) /build/firefox/src/xpcom/glue/nsThreadUtils.cpp:265:10 #36 0x7f09d71e593a in nsThread::Shutdown() /build/firefox/src/xpcom/threads/nsThread.cpp:667:5 #37 0x7f09d71f9620 in apply<nsIThread, nsresult (nsIThread::)()> /build/firefox/src/objdir-ff-asan/xpcom/threads/../../dist/include/nsThreadUtils.h:602:5 #38 0x7f09d71f9620 in nsRunnableMethodImpl<nsresult (nsIThread::)(), true>::Run() /build/firefox/src/objdir-ff-asan/xpcom/threads/../../dist/include/nsThreadUtils.h:809 #39 0x7f09d71e67e5 in nsThread::ProcessNextEvent(bool, bool*) /build/firefox/src/xpcom/threads/nsThread.cpp:866:7 #40 0x7f09d7245b5c in NS_ProcessNextEvent(nsIThread*, bool) /build/firefox/src/xpcom/glue/nsThreadUtils.cpp:265:10 #41 0x7f09d7af96ae in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /build/firefox/src/ipc/glue/MessagePump.cpp:99:21 #42 0x7f09d7a83891 in RunInternal /build/firefox/src/ipc/chromium/src/base/message_loop.cc:233:3 #43 0x7f09d7a83891 in RunHandler /build/firefox/src/ipc/chromium/src/base/message_loop.cc:226 #44 0x7f09d7a83891 in MessageLoop::Run() /build/firefox/src/ipc/chromium/src/base/message_loop.cc:200 #45 0x7f09dc90087f in nsBaseAppShell::Run() /build/firefox/src/widget/nsBaseAppShell.cpp:165:3 #46 0x7f09de589263 in XRE_RunAppShell /build/firefox/src/toolkit/xre/nsEmbedFunctions.cpp:738:12 #47 0x7f09d7a83891 in RunInternal /build/firefox/src/ipc/chromium/src/base/message_loop.cc:233:3 #48 0x7f09d7a83891 in RunHandler /build/firefox/src/ipc/chromium/src/base/message_loop.cc:226 #49 0x7f09d7a83891 in MessageLoop::Run() /build/firefox/src/ipc/chromium/src/base/message_loop.cc:200 #50 0x7f09de5887db in XRE_InitChildProcess /build/firefox/src/toolkit/xre/nsEmbedFunctions.cpp:575:7 #51 0x4db762 in content_process_main(int, char**) /build/firefox/src/ipc/app/../contentproc/plugin-container.cpp:236:19 #52 0x7f09d46c6ec4 in __libc_start_main #53 0x41cfb1 in _start
0x6250001f87a8 is located 7848 bytes inside of 8192-byte region [0x6250001f6900,0x6250001f8900) allocated by thread T0 (Web Content) here: #0 0x4b5ea8 in __interceptor_malloc asan_rtl #1 0x7f09e4775ed8 in PL_ArenaAllocate /build/firefox/src/nsprpub/lib/ds/plarena.c:203:27 #2 0x7f09dcf4a171 in nsPresArena::Allocate(unsigned int, unsigned long) /build/firefox/src/layout/base/nsPresArena.cpp:99:3 #3 0x7f09dce99072 in AllocateByObjectID /build/firefox/src/layout/style/../base/nsPresArena.h:93:12 #4 0x7f09dce99072 in AllocateByObjectID /build/firefox/src/layout/style/../base/nsIPresShell.h:253 #5 0x7f09dce99072 in operator new /build/firefox/src/layout/style/nsStyleStruct.h:1327 #6 0x7f09dce99072 in nsRuleNode::ComputePositionData(void*, nsRuleData const*, nsStyleContext*, nsRuleNode*, nsRuleNode::RuleDetail, bool) /build/firefox/src/layout/style/nsRuleNode.cpp:7579 #7 0x7f09dce7c1ac in nsRuleNode::WalkRuleTree(nsStyleStructID, nsStyleContext*) /build/firefox/src/objdir-ff-asan/layout/style/./nsStyleStructList.h:127:1 #8 0x7f09dcedccf4 in nsRuleNode::GetStylePosition(nsStyleContext*, bool) /build/firefox/src/objdir-ff-asan/layout/style/./nsStyleStructList.h:127:1 #9 0x7f09dd2fa3fe in DoGetStylePosition /build/firefox/src/objdir-ff-asan/layout/generic/../../dist/include/nsStyleStructList.h:127:1 #10 0x7f09dd2fa3fe in StylePosition /build/firefox/src/objdir-ff-asan/layout/generic/../../dist/include/nsStyleStructList.h:127 #11 0x7f09dd2fa3fe in StylePosition /build/firefox/src/objdir-ff-asan/layout/generic/../../dist/include/nsStyleStructList.h:127 #12 0x7f09dd2fa3fe in nsHTMLReflowState::Init(nsPresContext*, int, int, nsMargin const*, nsMargin const*) /build/firefox/src/layout/generic/nsHTMLReflowState.cpp:362 #13 0x7f09dd298a92 in nsBlockReflowContext::ComputeCollapsedBStartMargin(nsHTMLReflowState const&, nsCollapsingMargin*, nsIFrame*, bool*, bool*) /build/firefox/src/layout/generic/nsBlockReflowContext.cpp:162:31 #14 0x7f09dd291b1d in nsBlockFrame::ReflowBlockFrame(nsBlockReflowState&, nsLineList_iterator, bool*) /build/firefox/src/layout/generic/nsBlockFrame.cpp:3209:7 #15 0x7f09dd2860b4 in ReflowLine /build/firefox/src/layout/generic/nsBlockFrame.cpp:2710:5 #16 0x7f09dd2860b4 in nsBlockFrame::ReflowDirtyLines(nsBlockReflowState&) /build/firefox/src/layout/generic/nsBlockFrame.cpp:2248 #17 0x7f09dd27f53c in nsBlockFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) /build/firefox/src/layout/generic/nsBlockFrame.cpp:1160:3 #18 0x7f09dd2e6e98 in nsContainerFrame::ReflowChild(nsIFrame*, nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, mozilla::WritingMode const&, mozilla::LogicalPoint const&, int, unsigned int, unsigned int&, nsOverflowContinuationTracker*) /build/firefox/src/layout/generic/nsContainerFrame.cpp:965:3 #19 0x7f09dd2cc74d in nsCanvasFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) /build/firefox/src/layout/generic/nsCanvasFrame.cpp:676:5 #20 0x7f09dd375b16 in ReflowChild /build/firefox/src/layout/generic/nsContainerFrame.cpp:965:3 #21 0x7f09dd375b16 in nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState*, bool, bool, nsHTMLReflowMetrics*, bool) /build/firefox/src/layout/generic/nsGfxScrollFrame.cpp:510 #22 0x7f09dd377129 in nsHTMLScrollFrame::ReflowContents(ScrollReflowState*, nsHTMLReflowMetrics const&) /build/firefox/src/layout/generic/nsGfxScrollFrame.cpp:621:3 #23 0x7f09dd3795e9 in nsHTMLScrollFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) /build/firefox/src/layout/generic/nsGfxScrollFrame.cpp:856:3 #24 0x7f09dd2e7294 in nsContainerFrame::ReflowChild(nsIFrame*, nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, int, int, unsigned int, unsigned int&, nsOverflowContinuationTracker*) /build/firefox/src/layout/generic/nsContainerFrame.cpp:1007:3 #25 0x7f09dd4d22df in ViewportFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) /build/firefox/src/layout/generic/nsViewportFrame.cpp:217:7 #26 0x7f09dd1da4e3 in PresShell::DoReflow(nsIFrame*, bool) /build/firefox/src/layout/base/nsPresShell.cpp:9216:3 #27 0x7f09dd1ef6bd in PresShell::ProcessReflowCommands(bool) /build/firefox/src/layout/base/nsPresShell.cpp:9376:24 #28 0x7f09dd1ee844 in PresShell::FlushPendingNotifications(mozilla::ChangesToFlush) /build/firefox/src/layout/base/nsPresShell.cpp:4314:11 #29 0x7f09dcf53aa1 in nsRefreshDriver::Tick(long, mozilla::TimeStamp) /build/firefox/src/layout/base/nsRefreshDriver.cpp:1729:11 #30 0x7f09dcf5e723 in TickDriver /build/firefox/src/layout/base/nsRefreshDriver.cpp:198:5 #31 0x7f09dcf5e723 in mozilla::RefreshDriverTimer::Tick(long, mozilla::TimeStamp) /build/firefox/src/layout/base/nsRefreshDriver.cpp:189 #32 0x7f09dcf605e9 in RunRefreshDrivers /build/firefox/src/layout/base/nsRefreshDriver.cpp:440:5 #33 0x7f09dcf605e9 in TickRefreshDriver /build/firefox/src/layout/base/nsRefreshDriver.cpp:374 #34 0x7f09dcf605e9 in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::TimeStamp) /build/firefox/src/layout/base/nsRefreshDriver.cpp:345 #35 0x7f09dd7ecdb4 in mozilla::layout::VsyncChild::RecvNotify(mozilla::TimeStamp const&) /build/firefox/src/layout/ipc/VsyncChild.cpp:63:5 #36 0x7f09d7fd0b8b in mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) /build/firefox/src/objdir-ff-asan/ipc/ipdl/./PVsyncChild.cpp:224:20 #37 0x7f09d7b67eb7 in mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) /build/firefox/src/objdir-ff-asan/ipc/ipdl/./PBackgroundChild.cpp:1082:16 #38 0x7f09d7af28fb in mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) /build/firefox/src/ipc/glue/MessageChannel.cpp:1248:14 #39 0x7f09d7aefdaa in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message const&) /build/firefox/src/ipc/glue/MessageChannel.cpp:1167:9 #40 0x7f09d7ae2db0 in mozilla::ipc::MessageChannel::OnMaybeDequeueOne() /build/firefox/src/ipc/glue/MessageChannel.cpp:1151:9
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 Layout: Tables. Mozilla made it public on 20 May 2015.
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.