Heap-use-after-free READ 8 in gfxTextRun::GetUserData
Originally disclosed on Mozilla
- Fixed in 7 days
- Paid in 14 months
- Disclosed after 7 days
Created attachment 624862
Testcase
Reproduces on trunk
20120517130245
http://hg.mozilla.org/mozilla-central/rev/895e12563245
=================================================================
==6180== ERROR: AddressSanitizer heap-use-after-free on address 0x7f861c5860b8 at pc 0x7f863c987298 bp 0x7fff028995e0 sp 0x7fff028995d8
READ of size 8 at 0x7f861c5860b8 thread T0
#0 0x7f863c987298 in gfxTextRun::GetUserData() const src/modules/zlib/src/inffast.c:0
0x7f861c5860b8 is located 56 bytes inside of 6712-byte region [0x7f861c586080,0x7f861c587ab8)
freed by thread T0 here:
#0 0x4244a2 in free
#1 0x7f863c9941bd in nsTextFrame::ClearTextRuns() src/layout/generic/nsTextFrame.h:432
previously allocated by thread T0 here:
#0 0x424562 in malloc
#1 0x7f863e38da84 in gfxTextRun::AllocateStorageForTextRun(unsigned long, unsigned int) src/gfx/thebes/gfxFont.cpp:4290
==6180== ABORTING
Stats: 125M malloced (131M for red zones) by 252339 calls
Stats: 28M realloced by 12734 calls
Stats: 85M freed by 119994 calls
Stats: 0M really freed by 0 calls
Stats: 292M (74798 full pages) mmaped in 73 calls
mmaps by size class: 8:212979; 9:40955; 10:12285; 11:12282; 12:3072; 13:2048; 14:1536; 15:384; 16:576; 17:96; 18:144; 19:40; 20:16;
mallocs by size class: 8:191798; 9:34053; 10:9717; 11:10403; 12:2011; 13:1813; 14:1446; 15:277; 16:565; 17:65; 18:139; 19:39; 20:13;
frees by size class: 8:80912; 9:21306; 10:5944; 11:7541; 12:1292; 13:971; 14:1169; 15:231; 16:498; 17:52; 18:29; 19:38; 20:11;
rfrees by size class:
Stats: malloc large: 256 small slow: 1500
Shadow byte and word:
0x1ff0c38b0c17: fd
0x1ff0c38b0c10: fd fd fd fd fd fd fd fd
More shadow bytes:
0x1ff0c38b0bf0: fa fa fa fa fa fa fa fa
0x1ff0c38b0bf8: fa fa fa fa fa fa fa fa
0x1ff0c38b0c00: fa fa fa fa fa fa fa fa
0x1ff0c38b0c08: fa fa fa fa fa fa fa fa
=>0x1ff0c38b0c10: fd fd fd fd fd fd fd fd
0x1ff0c38b0c18: fd fd fd fd fd fd fd fd
0x1ff0c38b0c20: fd fd fd fd fd fd fd fd
0x1ff0c38b0c28: fd fd fd fd fd fd fd fd
0x1ff0c38b0c30: fd fd fd fd fd fd fd fd
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: Text and Fonts. Mozilla made it public on 24 May 2012 as CVE-2012-3964.
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.