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

Out of bounds read in str_unescape

Scott Bell Follow

Originally disclosed on Mozilla

  • Fixed in 3 days
  • Paid in 6 months
  • Disclosed after 3 days
Text
I ran into this issue while fuzzing.  ASAN reports this as a heap overflow.  I wasn't able to symbolize the ASAN output for some unknown reason.  However, I see it crashing at strange locations on different runs on optimized builds.

In debug builds, it hits this assertion and crashes @ NULL: 
Assertion failure: mLength + 1 <= mReserved, at ./../../dist/include/js/Vector.h:788

Windbg references this code: mozjs!str_unescape+0x23e [e:\builds\moz2_slave\rel-m-rel-w32-bld\build\js\src\jsstr.cpp @ 352]

I have attached some logs from both debug and optimized builds.

The original report as published on Mozilla's Bugzilla, by Scott Bell. 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 high-severity memory corruption bug in JavaScript Engine. Mozilla made it public on 2 August 2012 as CVE-2012-4204.

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 Scott Bell

View all

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