out-of-bounds read at mozilla::image::nsGIFDecoder2::WriteInternal
- Fixed in 7 days
- Paid in 7 days
- Disclosed after 7 days
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
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.