Heap-buffer-overflow in nsWindow::OnExposeEvent
Originally disclosed on Mozilla
- Fixed in 6 days
- Paid in 2 months
- Disclosed after 6 days
Reproduces on trunk. Testcase reproduces extremely flakily if i first run firefox with a clean profile (and testcase path on cmd line), then close the firefox completely, and then rerun it again with testcase. Trying to get a minimized testcase. The second-time need might be coming from this line in the testcase
InstallTrigger.install({
"Unsigned XPI": "http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/unsigned.xpi"
});
=================================================================
==12538== ERROR: AddressSanitizer heap-buffer-overflow on address 0x7f0886f066d8 at pc 0x7f08b8658875 bp 0x7fff30d69ab0 sp 0x7fff30d69aa8
READ of size 1 at 0x7f0886f066d8 thread T0
#0 0x7f08b8658874 in UpdateMaskBits(char*, int, int, nsIntRect const&, unsigned char*, int) widget/gtk2/nsWindow.cpp:4261
#1 0x7f08b8657a51 in nsWindow::OnExposeEvent(_GdkEventExpose*) widget/gtk2/nsWindow.cpp:2222
#2 0x7f08b866816e in expose_event_cb(_GtkWidget*, _GdkEventExpose*) widget/gtk2/nsWindow.cpp:5042
0x7f0886f066d8 is located 0 bytes to the right of 5720-byte region [0x7f0886f05080,0x7f0886f066d8)
allocated by thread T0 here:
#0 0x4343e0 in __interceptor_malloc
#1 0x7f08bc70c3a8 in moz_xmalloc memory/mozalloc/mozalloc.cpp:57
#2 0x7f08b8657a51 in nsWindow::OnExposeEvent(_GdkEventExpose*) widget/gtk2/nsWindow.cpp:2222
#3 0x7f08b866816e in expose_event_cb(_GtkWidget*, _GdkEventExpose*) widget/gtk2/nsWindow.cpp:5042
Shadow byte and word:
0x1fe110de0cdb: fb
0x1fe110de0cd8: 00 00 00 fb fb fb fb fb
More shadow bytes:
0x1fe110de0cb8: 00 00 00 00 00 00 00 00
0x1fe110de0cc0: 00 00 00 00 00 00 00 00
0x1fe110de0cc8: 00 00 00 00 00 00 00 00
0x1fe110de0cd0: 00 00 00 00 00 00 00 00
=>0x1fe110de0cd8: 00 00 00 fb fb fb fb fb
0x1fe110de0ce0: fa fa fa fa fa fa fa fa
0x1fe110de0ce8: fa fa fa fa fa fa fa fa
0x1fe110de0cf0: fa fa fa fa fa fa fa fa
0x1fe110de0cf8: fa fa fa fa fa fa fa fa
Stats: 293M malloced (320M for red zones) by 521376 calls
Stats: 41M realloced by 23856 calls
Stats: 248M freed by 255478 calls
Stats: 115M really freed by 96425 calls
Stats: 532M (136284 full pages) mmaped in 133 calls
mmaps by size class: 8:376809; 9:49146; 10:20475; 11:14329; 12:4096; 13:2560; 14:1280; 15:256; 16:576; 17:1248; 18:288; 19:40; 20:20;
mallocs by size class: 8:419076; 9:53870; 10:19196; 11:16732; 12:4893; 13:2792; 14:1719; 15:362; 16:881; 17:1501; 18:294; 19:41; 20:19;
frees by size class: 8:178304; 9:39375; 10:14131; 11:13204; 12:3650; 13:2549; 14:1466; 15:306; 16:738; 17:1481; 18:219; 19:39; 20:16;
rfrees by size class: 8:64681; 9:13811; 10:3824; 11:9587; 12:1194; 13:844; 14:914; 15:151; 16:412; 17:990; 18:11; 19:5; 20:1;
Stats: malloc large: 1855 small slow: 2608
==12538== ABORTING
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 Widget: Gtk. Mozilla made it public on 25 September 2012 as CVE-2012-5829.
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.