Skip to content
Memory corruption Disclosed report CVE-2013-0762

Heap-use-after-free in imgRequest::OnStopFrame

Abhishek Arya Follow

Originally disclosed on Mozilla

Critical View original
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 3 months

Reproduces on trunk. Testcase with better stack coming.

================================================================= ==6483== ERROR: AddressSanitizer heap-use-after-free on address 0x7f12bb7cef80 at pc 0x7f12ebf2a6ad bp 0x7fff1ecacb70 sp 0x7fff1ecacb68 READ of size 8 at 0x7f12bb7cef80 thread T0 #0 0x7f12ebf2a6ac in nsQueryInterface::operator()(nsID const&, void**) const objdir-ff-asan/xpcom/build/nsCOMPtr.cpp:14 #1 0x7f12e91b069d in nsCOMPtr ../../dist/include/nsCOMPtr.h:554 #2 0x7f12e919e955 in imgRequest::OnStopFrame(imgIRequest*, unsigned int) image/src/imgRequest.cpp:645 #3 0x7f12e914d3cb in mozilla::image::Decoder::PostFrameStop() image/src/Decoder.cpp:246 0x7f12bb7cef80 is located 0 bytes inside of 24-byte region [0x7f12bb7cef80,0x7f12bb7cef98) freed by thread T0 here: #0 0x42b630 in free #1 0x7f12e948ca4d in nsBulletListener::Release() layout/generic/nsBulletFrame.cpp:1622 previously allocated by thread T0 here: #0 0x42b6f0 in __interceptor_malloc #1 0x7f12ef58f3a8 in moz_xmalloc memory/mozalloc/mozalloc.cpp:57 #2 0x7f12e94a86d4 in nsFrame::Init(nsIContent*, nsIFrame*, nsIFrame*) layout/generic/nsFrame.cpp:535 Shadow byte and word: 0x1fe2576f9df0: fd 0x1fe2576f9df0: fd fd fd fd fd fd fd fd More shadow bytes: 0x1fe2576f9dd0: fd fd fd fd fd fd fd fd 0x1fe2576f9dd8: fd fd fd fd fd fd fd fd 0x1fe2576f9de0: fa fa fa fa fa fa fa fa 0x1fe2576f9de8: fa fa fa fa fa fa fa fa =>0x1fe2576f9df0: fd fd fd fd fd fd fd fd 0x1fe2576f9df8: fd fd fd fd fd fd fd fd 0x1fe2576f9e00: fa fa fa fa fa fa fa fa 0x1fe2576f9e08: fa fa fa fa fa fa fa fa 0x1fe2576f9e10: 00 00 00 00 00 00 00 00 Stats: 352M malloced (405M for red zones) by 832581 calls Stats: 60M realloced by 88678 calls Stats: 304M freed by 665969 calls Stats: 197M really freed by 173839 calls Stats: 612M (156759 full pages) mmaped in 153 calls mmaps by size class: 8:557022; 9:49146; 10:81900; 11:12282; 12:3072; 13:2048; 14:1280; 15:256; 16:448; 17:1280; 18:240; 19:40; 20:20; 21:2; mallocs by size class: 8:655210; 9:61844; 10:88875; 11:13927; 12:4293; 13:2966; 14:2222; 15:488; 16:815; 17:1614; 18:259; 19:47; 20:19; 21:2; frees by size class: 8:513952; 9:46898; 10:84377; 11:10477; 12:3126; 13:2543; 14:1600; 15:435; 16:741; 17:1594; 18:165; 19:45; 20:16; rfrees by size class: 8:114982; 9:29585; 10:13571; 11:8791; 12:1614; 13:1699; 14:1294; 15:249; 16:554; 17:1311; 18:137; 19:37; 20:15; Stats: malloc large: 1941 small slow: 3643 ==6483== 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 Graphics: ImageLib. Mozilla made it public on 29 November 2012 as CVE-2013-0762.

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.