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

ASAN: heap-use-after-free READ of size 8 at nsSMILTimeValueSpec::ConvertBetweenTimeContainers

Atte Kettunen Follow

Originally disclosed on Mozilla

  • Fixed in 12 days
  • Paid in 18 months
  • Disclosed after 12 days
Text
Created attachment 590449
repro-file

Repro-file as attachment.

==21012== ERROR: AddressSanitizer heap-use-after-free on address 0x7fa967597e88 at pc 0x7fa98a245854 bp 0x7fffc4ef2160 sp 0x7fffc4ef2158
READ of size 8 at 0x7fa967597e88 thread T0
    #0 0x7fa98a245854 (/home/ouspg/firefox/objdir-ff-asan/toolkit/library/libxul.so+0x1df2854)
    #1 0x7fa98a256c18 (/home/ouspg/firefox/objdir-ff-asan/toolkit/library/libxul.so+0x1e03c18)
0x7fa967597e88 is located 8 bytes inside of 32-byte region [0x7fa967597e80,0x7fa967597ea0)
freed by thread T0 here:
    #0 0x40ad84 (/home/ouspg/firefox/objdir-ff-asan/dist/bin/firefox+0x40ad84)
    #1 0x7fa98a2548d5 (/home/ouspg/firefox/objdir-ff-asan/toolkit/library/libxul.so+0x1e018d5)
    #2 0x7fa98a24f4c6 (/home/ouspg/firefox/objdir-ff-asan/toolkit/library/libxul.so+0x1dfc4c6)
    #3 0x7fa98a24ef4e (/home/ouspg/firefox/objdir-ff-asan/toolkit/library/libxul.so+0x1dfbf4e)
    #4 0x7fa98a259776 (/home/ouspg/firefox/objdir-ff-asan/toolkit/library/libxul.so+0x1e06776)
    #5 0x7fa98a256c18 (/home/ouspg/firefox/objdir-ff-asan/toolkit/library/libxul.so+0x1e03c18)
previously allocated by thread T0 here:
    #0 0x40ae64 (/home/ouspg/firefox/objdir-ff-asan/dist/bin/firefox+0x40ae64)
    #1 0x7fa98e37613d (/home/ouspg/firefox/objdir-ff-asan/memory/mozalloc/libmozalloc.so+0x113d)
    #2 0x7fa98a24f8cd (/home/ouspg/firefox/objdir-ff-asan/toolkit/library/libxul.so+0x1dfc8cd)
    #3 0x7fa98a24473f (/home/ouspg/firefox/objdir-ff-asan/toolkit/library/libxul.so+0x1df173f)
    #4 0x7fa98a244e05 (/home/ouspg/firefox/objdir-ff-asan/toolkit/library/libxul.so+0x1df1e05)
==21012== ABORTING
Stats: 54M malloced (77M for red zones) by 226646 calls
Stats: 3M realloced by 10807 calls
Stats: 29M freed by 100041 calls
Stats: 0M really freed by 0 calls
Stats: 160M (40979 full pages) mmaped in 40 calls
  mmaps   by size class: 8:196596; 9:32764; 10:8190; 11:6141; 12:2048; 13:1024; 14:512; 15:256; 16:256; 17:32; 18:64; 19:8; 20:4; 
  mallocs by size class: 8:187646; 9:23438; 10:7261; 11:5113; 12:1486; 13:776; 14:463; 15:169; 16:213; 17:23; 18:51; 19:5; 20:2; 
  frees   by size class: 8:78129; 9:12741; 10:4539; 11:2633; 12:830; 13:600; 14:244; 15:132; 16:163; 17:17; 18:10; 19:2; 20:1; 
  rfrees  by size class: 
Stats: malloc large: 81 small slow: 942
Shadow byte and word:
  0x1ff52ceb2fd1: fd
  0x1ff52ceb2fd0: fd fd fd fd fd fd fd fd
More shadow bytes:
  0x1ff52ceb2fb0: 00 00 00 00 00 00 fb fb
  0x1ff52ceb2fb8: fb fb fb fb fb fb fb fb
  0x1ff52ceb2fc0: fa fa fa fa fa fa fa fa
  0x1ff52ceb2fc8: fa fa fa fa fa fa fa fa
=>0x1ff52ceb2fd0: fd fd fd fd fd fd fd fd
  0x1ff52ceb2fd8: fd fd fd fd fd fd fd fd
  0x1ff52ceb2fe0: fa fa fa fa fa fa fa fa
  0x1ff52ceb2fe8: fa fa fa fa fa fa fa fa
  0x1ff52ceb2ff0: fd fd fd fd fd fd fd fd


GDB:

(gdb) i r
rax            0x0	0
rbx            0x7fffd8221180	140736819499392
rcx            0x7fffffff9a50	140737488329296
rdx            0x7fffd84a4dc0	140736822136256
rsi            0x8	8
rdi            0x7fffd8221180	140736819499392
rbp            0x8	0x8
rsp            0x7fffffff9940	0x7fffffff9940
r8             0x7ffff7ec6048	140737352851528
r9             0xc2b	3115
r10            0x7fffd8161bc0	140736818715584
r11            0x0	0
r12            0x7fffd84a4dc0	140736822136256
r13            0x0	0
r14            0x3	3
r15            0x7ffff4290b88	140737289718664
rip            0x7ffff42944b6	0x7ffff42944b6 <nsSMILTimeValueSpec::ConvertBetweenTimeContainers(nsSMILTimeValue const&, nsSMILTimeContainer const*)+14>
eflags         0x10202	[ IF RF ]
cs             0x33	51
ss             0x2b	43
ds             0x0	0
es             0x0	0
fs             0x0	0
gs             0x0	0
(gdb) i s
#0  nsSMILTimeValueSpec::ConvertBetweenTimeContainers (this=0x7fffd8221180, aSrcTime=..., aSrcContainer=0x7fffd84a4dc0) at /build/buildd/firefox-trunk-12.0~a1~hg20120114r84451/build-tree/mozilla/content/smil/nsSMILTimeValueSpec.cpp:546
#1  0x00007ffff42946fa in nsSMILTimeValueSpec::HandleNewInterval (this=0x7fffd8221180, aInterval=..., aSrcContainer=0x7fffd84a4dc0) at /build/buildd/firefox-trunk-12.0~a1~hg20120114r84451/build-tree/mozilla/content/smil/nsSMILTimeValueSpec.cpp:183
#2  0x00007ffff4290ba8 in nsSMILTimedElement::NotifyNewIntervalCallback (aKey=<value optimized out>, aData=<value optimized out>) at /build/buildd/firefox-trunk-12.0~a1~hg20120114r84451/build-tree/mozilla/content/smil/nsSMILTimedElement.cpp:2315
#3  0x00007ffff45c415b in PL_DHashTableEnumerate (table=0x7fffd82119b0, etor=0x7ffff4290b88 <nsTHashtable<nsPtrHashKey<nsSMILTimeValueSpec> >::s_EnumStub(PLDHashTable*, PLDHashEntryHdr*, PRUint32, void*)>, arg=0x7fffffff9a50) at /build/buildd/firefox-trunk-12.0~a1~hg20120114r84451/build-tree/mozilla/obj-x86_64-linux-gnu/xpcom/build/pldhash.cpp:754
#4  0x00007ffff4291c54 in nsTHashtable<nsPtrHashKey<nsSMILTimeValueSpec> >::EnumerateEntries (this=<value optimized out>, enumFunc=<value optimized out>, userArg=<value optimized out>) at ../../dist/include/nsTHashtable.h:241
#5  0x00007ffff4291c9e in nsSMILTimedElement::NotifyNewInterval (this=0x7fffd8211900) at /build/buildd/firefox-trunk-12.0~a1~hg20120114r84451/build-tree/mozilla/content/smil/nsSMILTimedElement.cpp:2203
#6  0x00007ffff42926c5 in nsSMILTimedElement::UpdateCurrentInterval (this=0x7fffd8211900, aForceChangeNotice=<value optimized out>) at /build/buildd/firefox-trunk-12.0~a1~hg20120114r84451/build-tree/mozilla/content/smil/nsSMILTimedElement.cpp:1989
.
.
.

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 memory corruption bug in SVG. Mozilla made it public on 2 February 2012 as CVE-2012-0457.

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.