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

Use-After-Free crash @xul!nsImageLoadingContent::OnStopContainer

Nils Follow

Originally disclosed on Mozilla

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

Created attachment 702600 testcase, crashes the browser

The attached testcase crashes when loaded in latest Firefox nightly. Crashes at random memory addresses.

Stack trace on windows (this was with the previous testcase which loaded a jpeg file instead of png from data uri): xul!nsImageLoadingContent::OnStopContainer+0x37: 64fcc61e ff5128 call dword ptr [ecx+28h] ds:002b:00000029=???????? 0:000:x86> cdb: Reading initial command 'kp 16;q' ChildEBP RetAddr
0033cb58 64e6eac6 xul!nsImageLoadingContent::OnStopContainer(class imgIRequest * aRequest = 0x07dc8e00, class imgIContainer * aContainer = 0x0779a790)+0x37 0033cb6c 64e2229d xul!imgRequestProxy::OnStopContainer(class imgIContainer * image = 0x0779a790)+0x36 0033cbfc 64dfd62b xul!imgRequest::OnStopDecode(class imgIRequest * aRequest = 0x00000000, tag_nsresult aStatus = NS_OK (0n0), wchar_t * aStatusArg = 0x00000000 "")+0xad 0033cc24 6501fca4 xul!mozilla::image::Decoder::PostDecodeDone(void)+0x67 *** WARNING: Unable to verify checksum for C:\Program Files (x86)\Mozilla Firefox\gkmedias.dll 0033cc2c 66072e8f xul!mozilla::image::term_source(struct jpeg_decompress_struct * jd = 0x07d47438)+0x14 0033cc38 64f86b63 gkmedias!jpeg_finish_decompress(struct jpeg_decompress_struct * cinfo = 0x07d47438)+0x5a 0033ce74 64f5beaf xul!mozilla::image::nsJPEGDecoder::WriteInternal(char * aBuffer = 0x07df5008 "G???", unsigned int aCount = 0x18e)+0x359 0033ce90 64faf970 xul!mozilla::image::RasterImage::WriteToDecoder(char * aBuffer = 0x07df5008 "G???", unsigned int aCount = 0x18e)+0x41 0033ceac 64f6ff0b xul!mozilla::image::RasterImage::DecodeSomeData(unsigned int aMaxBytes = 0x1000)+0x37 0033ceec 64fbaa9b xul!mozilla::image::RasterImage::DecodeWorker::DecodeSomeOfImage(class mozilla::image::RasterImage * aImg = 0x0779a790, mozilla::image::RasterImage::DecodeWorker::DecodeType aDecodeType = DECODE_TYPE_NORMAL (0n0))+0xbc 0033cf28 64e91dbf xul!mozilla::image::RasterImage::DecodeWorker::Run(void)+0xb6 0033cf98 6503c86f xul!nsThread::ProcessNextEvent(bool mayWait = false, bool * result = 0x0033cfd4)+0x2cf 0033cfcc 6504ca2b xul!mozilla::ipc::MessagePump::Run(class base::MessagePump::Delegate * aDelegate = 0x00a42001)+0x5f 0033d004 6504c9d3 xul!MessageLoop::RunHandler(void)+0x21 0033d020 6502fc8f xul!MessageLoop::Run(void)+0x15 0033d02c 6504c953 xul!nsBaseAppShell::Run(void)+0x34 0033ef80 65076c9d xul!nsAppShell::Run(void)+0x4e 0033ef8c 64fbc83a xul!nsAppStartup::Run(void)+0x1e 0033f058 6501522d xul!XREMain::XRE_mainRun(void)+0x405 0033f074 65037bb4 xul!XREMain::XRE_main(int argc = 0n5, char ** argv = 0x00134660, struct nsXREAppData * aAppData = 0x00c332e0)+0xde *** WARNING: Unable to verify checksum for firefox.exe 0033f18c 00c31742 xul!XRE_main(int argc = 0n5, char ** argv = 0x00134660, struct nsXREAppData * aAppData = 0x00c332e0, unsigned int aFlags = 0)+0x30 0033fc64 00c31a64 firefox!wmain(int argc = 0n5, wchar_t ** argv = 0x00132e90)+0x742 quit:

The original report as published on Mozilla's Bugzilla, by Nils. 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 DOM: Core & HTML. Mozilla made it public on 19 January 2013 as CVE-2013-0775.

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 Nils

View all

133 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.