Skip to content
Memory corruption Disclosed report

Out of bounds read in nsCellMap::GetRowSpanForNewCell

Abhishek Arya Follow

Originally disclosed on Mozilla

Critical View original
  • Fixed in 13 days
  • Paid in 15 days
  • Disclosed after 13 days

Created attachment 701648 Testcase

==26516== ERROR: AddressSanitizer: global-buffer-overflow on address 0x7ffc05bd5070 at pc 0x7ffbe9bbd2a3 bp 0x7fffd602c1b0 sp 0x7fffd602c1a8 READ of size 8 at 0x7ffc05bd5070 thread T0 #0 0x7ffbe9bbd2a2 in nsCellMap::GetRowSpanForNewCell(nsTableCellFrame*, int, bool&) const src/layout/tables/nsCellMap.cpp:2082 #1 0x7ffbe9b8ebce in nsCellMap::AppendCell(nsTableCellMap&, nsTableCellFrame*, int, bool, int, nsIntRect&, int*) src/layout/tables/nsCellMap.cpp:1429 #2 0x7ffbe9b8dd8b in nsTableCellMap::AppendCell(nsTableCellFrame&, int, bool, nsIntRect&) src/layout/tables/nsCellMap.cpp:562 #3 0x7ffbe9c1d97c in nsTableFrame::AppendCell(nsTableCellFrame&, int) src/layout/tables/nsTableFrame.cpp:751 #4 0x7ffbe9ce748c in nsTableRowFrame::AppendFrames(mozilla::layout::FrameChildListID, nsFrameList&) src/layout/tables/nsTableRowFrame.cpp:184 #5 0x7ffbe89a08ea in nsFrameManager::AppendFrames(nsIFrame*, mozilla::layout::FrameChildListID, nsFrameList&) src/layout/base/nsFrameManager.cpp:446 #6 0x7ffbe85f3b75 in nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems&, mozilla::layout::FrameChildListID) src/layout/base/nsCSSFrameConstructor.cpp:1286 #7 0x7ffbe85f24e6 in nsFrameConstructorState::~nsFrameConstructorState() src/layout/base/nsCSSFrameConstructor.cpp:996 #8 0x7ffbe867759a in nsCSSFrameConstructor::ContentRangeInserted(nsIContent*, nsIContent*, nsIContent*, nsILayoutHistoryState*, bool) src/layout/base/nsCSSFrameConstructor.cpp:7401 #9 0x7ffbe866edf7 in nsCSSFrameConstructor::ContentInserted(nsIContent*, nsIContent*, nsILayoutHistoryState*, bool) src/layout/base/nsCSSFrameConstructor.cpp:6849 #10 0x7ffbe865f1c9 in nsCSSFrameConstructor::RecreateFramesForContent(nsIContent*, bool) src/layout/base/nsCSSFrameConstructor.cpp:9420 #11 0x7ffbe868fce3 in nsCSSFrameConstructor::ProcessRestyledFrames(nsStyleChangeList&, mozilla::css::OverflowChangedTracker&) src/layout/base/nsCSSFrameConstructor.cpp:8210 #12 0x7ffbe8696788 in nsCSSFrameConstructor::RestyleElement(mozilla::dom::Element*, nsIFrame*, nsChangeHint, mozilla::css::RestyleTracker&, bool, mozilla::css::OverflowChangedTracker&) src/layout/base/nsCSSFrameConstructor.cpp:8358 #13 0x7ffbe85d5446 in mozilla::css::RestyleTracker::ProcessOneRestyle(mozilla::dom::Element*, nsRestyleHint, nsChangeHint, mozilla::css::OverflowChangedTracker&) src/layout/base/RestyleTracker.cpp:123 #14 0x7ffbe85d0478 in mozilla::css::RestyleTracker::DoProcessRestyles() src/layout/base/RestyleTracker.cpp:213 #15 0x7ffbe86c2701 in mozilla::css::RestyleTracker::ProcessRestyles() src/layout/base/RestyleTracker.h:192 #16 0x7ffbe86c2039 in nsCSSFrameConstructor::ProcessPendingRestyles() src/layout/base/nsCSSFrameConstructor.cpp:12156 #17 0x7ffbe8b2ce12 in PresShell::FlushPendingNotifications(mozilla::ChangesToFlush) src/layout/base/nsPresShell.cpp:3867 #18 0x7ffbe8bdbe35 in nsRefreshDriver::Tick(long, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:898 #19 0x7ffbe8bf391b in mozilla::RefreshDriverTimer::TickDriver(nsRefreshDriver*, long, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:164 #20 0x7ffbe8bf2f32 in mozilla::RefreshDriverTimer::Tick() src/layout/base/nsRefreshDriver.cpp:156 #21 0x7ffbe8bf23db in mozilla::RefreshDriverTimer::TimerTick(nsITimer*, void*) src/layout/base/nsRefreshDriver.cpp:181 #22 0x7ffbf63cc9db in nsTimerImpl::Fire() src/xpcom/threads/nsTimerImpl.cpp:482 #23 0x7ffbf63cde64 in nsTimerEvent::Run() src/xpcom/threads/nsTimerImpl.cpp:565 #24 0x7ffbf639024f in nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:627 #25 0x7ffbf6004bd5 in NS_ProcessNextEvent_P(nsIThread*, bool) src/objdir-ff-asan-sym/xpcom/build/nsThreadUtils.cpp:238 #26 0x7ffbf361517c in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:82 #27 0x7ffbf66821d2 in MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:215 #28 0x7ffbf6682009 in MessageLoop::RunHandler() src/ipc/chromium/src/base/message_loop.cc:208 #29 0x7ffbf6681ede in MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:182 #30 0x7ffbf29d07f7 in nsBaseAppShell::Run() src/widget/xpwidgets/nsBaseAppShell.cpp:163 #31 0x7ffbf14dc0e5 in nsAppStartup::Run() src/toolkit/components/startup/nsAppStartup.cpp:288 #32 0x7ffbe67427b4 in XREMain::XRE_mainRun() src/toolkit/xre/nsAppRunner.cpp:3823 #33 0x7ffbe674839a in XREMain::XRE_main(int, char**, nsXREAppData const*) src/toolkit/xre/nsAppRunner.cpp:3890 #34 0x7ffbe674b170 in XRE_main src/toolkit/xre/nsAppRunner.cpp:4093 #35 0x41d963 in do_main(int, char**, nsIFile*) src/browser/app/nsBrowserApp.cpp:195 #36 0x41ac69 in main src/browser/app/nsBrowserApp.cpp:388 #37 0x7ffc098f276c in 0x7ffc05bd5070 is located 16 bytes to the right of global variable 'vtable for nsTableOuterFrame (src/layout/tables/nsTableOuterFrame.cpp)' (0x7ffc05bd4be0) of size 1152 Shadow bytes around the buggy address: 0x1fff80b7a9b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fff80b7a9c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fff80b7a9d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fff80b7a9e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fff80b7a9f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x1fff80b7aa00: 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9[f9]f9 0x1fff80b7aa10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fff80b7aa20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fff80b7aa30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fff80b7aa40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fff80b7aa50: 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 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 Stats: 249M malloced (269M for red zones) by 401098 calls Stats: 47M realloced by 24048 calls Stats: 215M freed by 270001 calls Stats: 81M really freed by 188881 calls Stats: 472M (472M-0M) mmaped; 118 maps, 0 unmaps mmaps by size class: 8:294894; 9:32764; 10:8190; 11:14329; 12:2048; 13:1536; 14:1280; 15:384; 16:1216; 17:1312; 18:48; 19:40; 20:24; mallocs by size class: 8:334868; 9:32118; 10:8856; 11:16113; 12:2497; 13:1708; 14:1597; 15:401; 16:1446; 17:1362; 18:69; 19:40; 20:23; frees by size class: 8:221635; 9:22227; 10:5199; 11:13888; 12:1473; 13:1251; 14:1432; 15:276; 16:1161; 17:1344; 18:57; 19:38; 20:20; rfrees by size class: 8:166822; 9:7743; 10:2132; 11:9241; 12:606; 13:512; 14:448; 15:160; 16:970; 17:216; 18:26; 19:4; 20:1; Stats: malloc large: 1494 small slow: 2344 Stats: StackDepot: 0 ids; 0M mapped ==26516== ABORTING

The original report as published on Mozilla's Bugzilla, by Abhishek Arya. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 27 January 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.

More by Abhishek Arya

View all

130 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.