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

out-of-bounds read at mozilla::image::nsGIFDecoder2::WriteInternal

Aki Helin Follow

Originally disclosed on Mozilla

  • Fixed in 7 days
  • Paid in 7 days
  • Disclosed after 7 days
Text
Created attachment 757352
repro

ASan reports a heap buffer overflow (read) when the attached image is opened in current aurora or beta builds. This looks a lot like 856616, but the testcase there didn't work in my build and the log showed a less severe null dereference, so failing on the safe side and filing this separately.

==4517== ERROR: AddressSanitizer heap-buffer-overflow on address 0x7fc412193bdc at pc 0x7fc42ef6a445 bp 0x7fc417
7f71f0 sp 0x7fc4177f71e8
READ of size 1 at 0x7fc412193bdc thread T13
    #0 0x7fc42ef6a444 in mozilla::image::nsGIFDecoder2::WriteInternal(char const*, unsigned int) /home/aki/src/m
ozilla-aurora/image/decoders/nsGIFDecoder2.cpp:830
    #1 0x7fc42eeee694 in mozilla::image::Decoder::Write(char const*, unsigned int) /home/aki/src/mozilla-aurora/
image/src/Decoder.cpp:106
    #2 0x7fc42eefec1c in mozilla::image::RasterImage::WriteToDecoder(char const*, unsigned int) /home/aki/src/mo
zilla-aurora/image/src/RasterImage.cpp:2691
0x7fc412193bdc is located 0 bytes to the right of 860-byte region [0x7fc412193880,0x7fc412193bdc)
allocated by thread T0 here:
    #0 0x43db50 in __interceptor_malloc ??:0
    #1 0x7fc42ea08cc2 in nsTArrayFallibleAllocator::Malloc(unsigned long) /home/aki/src/mozilla-aurora/../../dis
t/include/nsTArray.h:174
    #2 0xff887206571
Thread T13 created by T0 here:
    #0 0x439d84 in pthread_create ??:0
    #1 0x7fc4386fa176 in _PR_CreateThread /home/aki/src/mozilla-aurora/nsprpub/pr/src/pthreads/ptthread.c:444
    #2 0x7fc4386f9c77 in PR_CreateThread /home/aki/src/mozilla-aurora/nsprpub/pr/src/pthreads/ptthread.c:527

The original report as published on Mozilla's Bugzilla, by Aki Helin. 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 low-severity memory corruption bug in Graphics: ImageLib. Mozilla made it public on 10 June 2013 as CVE-2013-1691.

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 Aki Helin

View all

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