Skip to content
Memory corruption Disclosed report

Global-buffer-overflow in ConvertKeyframeSequence

Abhishek Arya Follow

Originally disclosed on Mozilla

  • Fixed in 4 days
  • Paid in 4 months
  • Disclosed after 4 days

Repro:

<div id=target><script> var player = target.animate([{background: 'green'}, {background: 'green'}]); </script>

Stacktrace:

==7359==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f2c1baf56dc at pc 0x7f2c127e074b bp 0x7ffed2a5cd30 sp 0x7ffed2a5cd28 READ of size 4 at 0x7f2c1baf56dc thread T0 (Web Content) #0 0x7f2c127e074a in mozilla::dom::GetPropertyValuesPairs(JSContext*, JS::Handle<JSObject*>, mozilla::dom::ListAllowance, nsTArraymozilla::dom::PropertyValuesPair&) /build/firefox/src/dom/animation/KeyframeEffect.cpp:1050:9 #1 0x7f2c127d2164 in ConvertKeyframeSequence /build/firefox/src/dom/animation/KeyframeEffect.cpp:1115:12 #2 0x7f2c127d2164 in BuildAnimationPropertyListFromKeyframeSequence /build/firefox/src/dom/animation/KeyframeEffect.cpp:1409 #3 0x7f2c127d2164 in mozilla::dom::KeyframeEffectReadOnly::BuildAnimationPropertyList(JSContext*, mozilla::dom::Element*, JS::Handle<JSObject*>, nsTArraymozilla::AnimationProperty&, mozilla::ErrorResult&) /build/firefox/src/dom/animation/KeyframeEffect.cpp:1662 #4 0x7f2c127d6ffe in mozilla::dom::KeyframeEffectReadOnly::Constructor(mozilla::dom::GlobalObject const&, mozilla::dom::Element*, JS::Handle<JSObject*>, mozilla::TimingParams const&, mozilla::ErrorResult&) /build/firefox/src/dom/animation/KeyframeEffect.cpp:1686:3 #5 0x7f2c129f2dde in mozilla::dom::Element::Animate(JSContext*, JS::Handle<JSObject*>, mozilla::dom::UnrestrictedDoubleOrKeyframeAnimationOptions const&, mozilla::ErrorResult&) /build/firefox/src/dom/base/Element.cpp:3341:5 #6 0x7f2c14392f87 in mozilla::dom::ElementBinding::animate(JSContext*, JS::Handle<JSObject*>, mozilla::dom::Element*, JSJitMethodCallArgs const&) /build/firefox/src/objdir-ff-asan/dom/bindings/ElementBinding.cpp:3074:55 #7 0x7f2c1473c22c in mozilla::dom::GenericBindingMethod(JSContext*, unsigned int, JS::Value*) /build/firefox/src/dom/bindings/BindingUtils.cpp:2715:13 #8 0x7f2c1a8cb885 in CallJSNative /build/firefox/src/js/src/jscntxtinlines.h:235:15 #9 0x7f2c1a8cb885 in js::Invoke(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /build/firefox/src/js/src/vm/Interpreter.cpp:463 #10 0x7f2c1a8b2162 in Interpret(JSContext*, js::RunState&) /build/firefox/src/js/src/vm/Interpreter.cpp:2799:18 #11 0x7f2c1a898816 in js::RunScript(JSContext*, js::RunState&) /build/firefox/src/js/src/vm/Interpreter.cpp:425:12 #12 0x7f2c1a8cddcc in js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /build/firefox/src/js/src/vm/Interpreter.cpp:681:15 #13 0x7f2c1a8ce38c in js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*) /build/firefox/src/js/src/vm/Interpreter.cpp:713:12 #14 0x7f2c1a393da3 in Evaluate(JSContext*, JS::Handle<JSObject*>, JS::Handlejs::StaticScope*, JS::ReadOnlyCompileOptions const&, JS::SourceBufferHolder&, JS::MutableHandleJS::Value) /build/firefox/src/js/src/jsapi.cpp:4451:19 #15 0x7f2c1a394717 in Evaluate /build/firefox/src/js/src/jsapi.cpp:4478:12 #16 0x7f2c1a394717 in JS::Evaluate(JSContext*, JS::AutoVectorRooter<JSObject*>&, JS::ReadOnlyCompileOptions const&, JS::SourceBufferHolder&, JS::MutableHandleJS::Value) /build/firefox/src/js/src/jsapi.cpp:4539 #17 0x7f2c12d1536b in nsJSUtils::EvaluateString(JSContext*, JS::SourceBufferHolder&, JS::Handle<JSObject*>, JS::CompileOptions&, nsJSUtils::EvaluateOptions const&, JS::MutableHandleJS::Value, void**) /build/firefox/src/dom/base/nsJSUtils.cpp:224:12 #18 0x7f2c12d161ca in nsJSUtils::EvaluateString(JSContext*, JS::SourceBufferHolder&, JS::Handle<JSObject*>, JS::CompileOptions&, void**) /build/firefox/src/dom/base/nsJSUtils.cpp:286:10 #19 0x7f2c12da398f in nsScriptLoader::EvaluateScript(nsScriptLoadRequest*, JS::SourceBufferHolder&) /build/firefox/src/dom/base/nsScriptLoader.cpp:1151:10 #20 0x7f2c12da03ec in nsScriptLoader::ProcessRequest(nsScriptLoadRequest*) /build/firefox/src/dom/base/nsScriptLoader.cpp:970:10 #21 0x7f2c12d978c8 in nsScriptLoader::ProcessScriptElement(nsIScriptElement*) /build/firefox/src/dom/base/nsScriptLoader.cpp:726:10 #22 0x7f2c12d954bf in nsScriptElement::MaybeProcessScript() /build/firefox/src/dom/base/nsScriptElement.cpp:142:10 #23 0x7f2c11ff50ba in AttemptToExecute /build/firefox/src/dom/base/nsIScriptElement.h:221:18 #24 0x7f2c11ff50ba in nsHtml5TreeOpExecutor::RunScript(nsIContent*) /build/firefox/src/parser/html/nsHtml5TreeOpExecutor.cpp:666 #25 0x7f2c11ff3971 in nsHtml5TreeOpExecutor::RunFlushLoop() /build/firefox/src/parser/html/nsHtml5TreeOpExecutor.cpp:491:7 #26 0x7f2c11ff809b in nsHtml5ExecutorFlusher::Run() /build/firefox/src/parser/html/nsHtml5StreamParser.cpp:128:9 #27 0x7f2c103e1742 in nsThread::ProcessNextEvent(bool, bool*) /build/firefox/src/xpcom/threads/nsThread.cpp:995:7 #28 0x7f2c1046392c in NS_ProcessNextEvent(nsIThread*, bool) /build/firefox/src/xpcom/glue/nsThreadUtils.cpp:297:10 #29 0x7f2c10e5595f in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /build/firefox/src/ipc/glue/MessagePump.cpp:127:5 #30 0x7f2c10dbc8f1 in RunInternal /build/firefox/src/ipc/chromium/src/base/message_loop.cc:234:3 #31 0x7f2c10dbc8f1 in RunHandler /build/firefox/src/ipc/chromium/src/base/message_loop.cc:227 #32 0x7f2c10dbc8f1 in MessageLoop::Run() /build/firefox/src/ipc/chromium/src/base/message_loop.cc:201 #33 0x7f2c1621339f in nsBaseAppShell::Run() /build/firefox/src/widget/nsBaseAppShell.cpp:156:3 #34 0x7f2c18293c13 in XRE_RunAppShell /build/firefox/src/toolkit/xre/nsEmbedFunctions.cpp:789:12 #35 0x7f2c10dbc8f1 in RunInternal /build/firefox/src/ipc/chromium/src/base/message_loop.cc:234:3 #36 0x7f2c10dbc8f1 in RunHandler /build/firefox/src/ipc/chromium/src/base/message_loop.cc:227 #37 0x7f2c10dbc8f1 in MessageLoop::Run() /build/firefox/src/ipc/chromium/src/base/message_loop.cc:201 #38 0x7f2c182931b9 in XRE_InitChildProcess /build/firefox/src/toolkit/xre/nsEmbedFunctions.cpp:625:7 #39 0x4ea61e in content_process_main(int, char**) /build/firefox/src/ipc/app/../contentproc/plugin-container.cpp:237:19 #40 0x7f2c0d528ec4 in __libc_start_main #41 0x41dc56 in _start

0x7f2c1baf56dc is located 12 bytes to the right of global variable 'nsCSSProps::kAnimTypeTable' defined in '/build/firefox/src/layout/style/nsCSSProps.cpp:2462:13' (0x7f2c1baf5200) of size 1232 SUMMARY: AddressSanitizer: global-buffer-overflow (/build/firefox/src/objdir-ff-asan/dist/bin/libxul.so+0x42e874a) Shadow bytes around the buggy address: 0x0fe603756a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe603756a90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe603756aa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe603756ab0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe603756ac0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0fe603756ad0: 00 00 00 00 00 00 00 00 00 00 f9[f9]f9 f9 f9 f9 0x0fe603756ae0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0fe603756af0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0fe603756b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe603756b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fe603756b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==7359==ABORTING

The original report as published on Mozilla's Bugzilla, by Abhishek Arya. 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 DOM: Animation. Mozilla made it public on 5 February 2016.

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 Abhishek Arya

View all

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