Tracer generates bad code for {__proto__: ...}, leading to a crash
Originally disclosed on Mozilla
- Fixed in 30 hours
- Paid in 2.5 years
- Disclosed after 30 hours
Created attachment 504522
Test case for shell (run without -j, contains options() call)
The attached test case crashes on TM tip both 32 and 64 bit. The gdb trace reveals a corrupted function pointer:
Program received signal SIGSEGV, Segmentation fault.
0x00000000004f45a7 in js::DefaultValue (cx=0xab4da0, obj=0x7ffff690a640, hint=JSTYPE_VOID, vp=0x7ffff6abf148) at jsobj.cpp:5897
5897 if (!obj->getClass()->convert(cx, obj, hint, &v))
(gdb) bt 4
#0 0x00000000004f45a7 in js::DefaultValue (cx=0xab4da0, obj=0x7ffff690a640, hint=JSTYPE_VOID, vp=0x7ffff6abf148) at jsobj.cpp:5897
#1 0x00000000006d9add in js::Interpret (cx=0xab4da0, entryFrame=0x7ffff6abf048, inlineCallCount=1, interpMode=JSINTERP_NORMAL) at jsinterp.cpp:3677
#2 0x00000000004ca661 in js::RunScript (cx=0xab4da0, script=0xaf8670, fp=0x7ffff6abf048) at jsinterp.cpp:657
#3 0x00000000004cbab6 in js::Execute (cx=0xab4da0, chain=0x7ffff6903048, script=0xaf8670, prev=0x0, flags=0, result=0x0) at jsinterp.cpp:1023
(More stack frames follow...)
(gdb) print obj->getClass()->convert
$1 = (JSBool (*)(JSContext *, JSObject *, JSType, js::Value *)) 0x74006f00750071
The function pointer here could be a unicode string, but it's at least corrupted in some way. Locking this because it's possibly exploitable.
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 prototype pollution bug in JavaScript Engine. Mozilla made it public on 19 January 2011.
About Prototype pollution
Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Prototype pollution?
Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.