Skip to content
Memory corruption Disclosed report CVE-2012-4186

Heap-buffer-overflow in nsWaveReader::DecodeAudioData

Atte Kettunen Follow

Originally disclosed on Mozilla

Critical View original
  • Fixed in 30 hours
  • Paid in 5 months
  • Disclosed after 30 hours
Text
Created attachment 655670
Repro-file

This bug was filed from the Socorro interface and is 
report bp-edaabcc3-a4c5-4935-b00e-940a22120827 .
============================================================= 

I'm trying to minimize the testcase further and I'll add new testcase if I make any progress worth it.

ASAN-report from opt-build:

==10566== ERROR: AddressSanitizer heap-buffer-overflow on address 0x7f8860191081 at pc 0x7f8888de9ee1 bp 0x7f88311df4e0 sp 0x7f88311df4d8
READ of size 1 at 0x7f8860191081 thread T18
    #0 0x7f8888de9ee1 in nsWaveReader::DecodeAudioData() /home/attekett/firefox/src/content/media/wave/nsWaveReader.cpp:192
0x7f8860191081 is located 1 bytes to the right of 4096-byte region [0x7f8860190080,0x7f8860191080)
allocated by thread T18 here:
    #0 0x425141 in __interceptor_malloc ??:0
    #1 0x7f888d468228 in moz_xmalloc /home/attekett/firefox/src/memory/mozalloc/mozalloc.cpp:57
Thread T18 created by T17 here:
    #0 0x420e15 in pthread_create ??:0
    #1 0x7f888efac45f in _PR_CreateThread /home/attekett/firefox/src/nsprpub/pr/src/pthreads/ptthread.c:393
    #2 0x7f888efabeb8 in PR_CreateThread /home/attekett/firefox/src/nsprpub/pr/src/pthreads/ptthread.c:476
==10566== ABORTING
Stats: 329M malloced (591M for red zones) by 1746645 calls
Stats: 58M realloced by 20510 calls
Stats: 256M freed by 217843 calls
Stats: 97M really freed by 154806 calls
Stats: 864M (221280 full pages) mmaped in 209 calls
  mmaps   by size class: 8:1589151; 9:32764; 10:16380; 11:16376; 12:3072; 13:1536; 14:1280; 15:256; 16:384; 17:1248; 18:176; 19:40; 20:16; 21:2; 22:12; 23:4; 24:1;
  mallocs by size class: 8:1664564; 9:38223; 10:17175; 11:18265; 12:2582; 13:1803; 14:1539; 15:361; 16:558; 17:1303; 18:195; 19:41; 20:17; 21:2; 22:12; 23:4; 24:1;
  frees   by size class: 8:153178; 9:28974; 10:13767; 11:14943; 12:1700; 13:1601; 14:1361; 15:309; 16:484; 17:1289; 18:169; 19:40; 20:15; 21:2; 22:11;
  rfrees  by size class: 8:114243; 9:17260; 10:9448; 11:10197; 12:972; 13:748; 14:839; 15:190; 16:184; 17:695; 18:25; 19:4; 20:1;
Stats: malloc large: 1575 small slow: 4633
Shadow byte and word:
  0x1ff10c032210: fa
  0x1ff10c032210: fa fa fa fa fa fa fa fa
More shadow bytes:
  0x1ff10c0321f0: 00 00 00 00 00 00 00 00
  0x1ff10c0321f8: 00 00 00 00 00 00 00 00
  0x1ff10c032200: 00 00 00 00 00 00 00 00
  0x1ff10c032208: 00 00 00 00 00 00 00 00
=>0x1ff10c032210: fa fa fa fa fa fa fa fa
  0x1ff10c032218: fa fa fa fa fa fa fa fa
  0x1ff10c032220: fa fa fa fa fa fa fa fa
  0x1ff10c032228: fa fa fa fa fa fa fa fa
  0x1ff10c032230: fa fa fa fa fa fa fa fa

The original report as published on Mozilla's Bugzilla, by Atte Kettunen. 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 Audio/Video. Mozilla made it public on 29 August 2012 as CVE-2012-4186.

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 Atte Kettunen

View all

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