<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>312263</bug_id>
          
          <creation_ts>2026-04-14 06:01:19 -0700</creation_ts>
          <short_desc>[scroll-animations] null deref under `WebAnimation::range()` when a scroll-driven animation has no effect target</short_desc>
          <delta_ts>2026-04-15 04:13:27 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Animations</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://github.com/web-platform-tests/wpt/pull/59209</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antoine Quint">graouts</reporter>
          <assigned_to name="Antoine Quint">graouts</assigned_to>
          <cc>graouts</cc>
    
    <cc>heg1090</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2200168</commentid>
    <comment_count>0</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2026-04-14 06:01:19 -0700</bug_when>
    <thetext>If a scroll-driven animation has its effect target set to nullptr, a null deref will happen in ` Style::deprecatedLengthConversionCreateCSSToLengthConversionData(RefPtr&lt;Element&gt;)` because we pass a null value from `WebAnimation::range()`. Here&apos;s a stack trace:

#0 0x00014f80e424 in WebCore::Style::deprecatedLengthConversionCreateCSSToLengthConversionData(WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt;&gt;)
#1 0x00014f5d928c in WebCore::Style::DeprecatedCSSValueConversion&lt;WebCore::Style::SingleAnimationRangeLength&gt;::operator()(WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt;&gt; const&amp;, WebCore::CSSPrimitiveValue const&amp;)::&apos;lambda&apos;()::operator()()
#2 0x00014f5d0118 in WebCore::Style::DeprecatedCSSValueConversion&lt;WebCore::Style::SingleAnimationRangeStart&gt;::operator()(WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt;&gt; const&amp;, WebCore::CSSValue const&amp;)
#3 0x000149444f6c in WebCore::WebAnimation::range()
#4 0x0001494445c4 in WebCore::WebAnimation::autoAlignStartTime()
#5 0x0001493ec2b8 in WebCore::WebAnimation::tick()
#6 0x0001492f1c28 in WebCore::AnimationTimelinesController::updateAnimationsAndSendEvents(WTF::Seconds)
#7 0x00014a8f535c in WebCore::Document::updateAnimationsAndSendEvents()
#8 0x00014d0f6680 in WebCore::Page::forEachRenderableDocument(WTF::Function&lt;void (WebCore::Document&amp;)&gt; const&amp;) const
#9 0x0001420ceebc in WebCore::Page::updateRendering()
#10 0x00011ebc6e20 in WebKit::WebPage::updateRendering()
#11 0x00011905a6d4 in WebKit::RemoteLayerTreeDrawingArea::updateRendering()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200169</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-04-14 06:01:33 -0700</bug_when>
    <thetext>&lt;rdar://problem/174738722&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200173</commentid>
    <comment_count>2</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2026-04-14 06:26:17 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/62728</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200180</commentid>
    <comment_count>3</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2026-04-14 06:49:34 -0700</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/59209</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200507</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-04-14 22:48:11 -0700</bug_when>
    <thetext>Committed 311262@main (9cc00aab3dc8): &lt;https://commits.webkit.org/311262@main&gt;

Reviewed commits have been landed. Closing PR #62728 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200589</commentid>
    <comment_count>5</comment_count>
    <who name="">heg1090</who>
    <bug_when>2026-04-15 04:13:27 -0700</bug_when>
    <thetext>(In reply to Antoine Quint from comment #0)
&gt; If a scroll-driven animation has its effect target set to nullptr, a null
&gt; deref will happen in `
&gt; Style::
&gt; deprecatedLengthConversionCreateCSSToLengthConversionData(RefPtr&lt;Element&gt;)`
&gt; because we pass a null value from `WebAnimation::range()`. Here&apos;s a stack
&gt; trace:
&gt; 
&gt; #0 0x00014f80e424 in
&gt; WebCore::Style::
&gt; deprecatedLengthConversionCreateCSSToLengthConversionData(WTF::
&gt; RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;,
&gt; WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt;&gt;)
&gt; #1 0x00014f5d928c in
&gt; WebCore::Style::DeprecatedCSSValueConversion&lt;WebCore::Style::
&gt; SingleAnimationRangeLength&gt;::operator()(WTF::RefPtr&lt;WebCore::Element,
&gt; WTF::RawPtrTraits&lt;WebCore::Element&gt;,
&gt; WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt;&gt; const&amp;,
&gt; WebCore::CSSPrimitiveValue const&amp;)::&apos;lambda&apos;()::operator()()
&gt; #2 0x00014f5d0118 in
&gt; WebCore::Style::DeprecatedCSSValueConversion&lt;WebCore::Style::
&gt; SingleAnimationRangeStart&gt;::operator()(WTF::RefPtr&lt;WebCore::Element,
&gt; WTF::RawPtrTraits&lt;WebCore::Element&gt;,
&gt; WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt;&gt; const&amp;, WebCore::CSSValue
&gt; const&amp;)
&gt; #3 0x000149444f6c in WebCore::WebAnimation::range()
&gt; #4 0x0001494445c4 in WebCore::WebAnimation::autoAlignStartTime()
&gt; #5 0x0001493ec2b8 in WebCore::WebAnimation::tick()
&gt; #6 0x0001492f1c28 in
&gt; WebCore::AnimationTimelinesController::updateAnimationsAndSendEvents(WTF::
&gt; Seconds)
&gt; #7 0x00014a8f535c in WebCore::Document::updateAnimationsAndSendEvents()
&gt; #8 0x00014d0f6680 in
&gt; WebCore::Page::forEachRenderableDocument(WTF::Function&lt;void
&gt; (WebCore::Document&amp;)&gt; const&amp;) const
&gt; #9 0x0001420ceebc in WebCore::Page::updateRendering()
&gt; #10 0x00011ebc6e20 in WebKit::WebPage::updateRendering()
&gt; #11 0x00011905a6d4 in WebKit::RemoteLayerTreeDrawingArea::updateRendering()</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>