<?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>236622</bug_id>
          
          <creation_ts>2022-02-14 17:07:37 -0800</creation_ts>
          <short_desc>Safari 15.2 crashes when degenerate webp images are decoded with createImageBitmap</short_desc>
          <delta_ts>2022-02-18 14:51:38 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Images</component>
          <version>Safari 15</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>231794</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=219977</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>ryan.hamley</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>johncunningham</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1841490</commentid>
    <comment_count>0</comment_count>
      <attachid>451964</attachid>
    <who name="">ryan.hamley</who>
    <bug_when>2022-02-14 17:07:37 -0800</bug_when>
    <thetext>Created attachment 451964
Solid black WebP image

Safari 15.2 and 15.3 crash when decoding certain WebP images with `window.createImageBitmap`. This happens with images that have a channel depth of 1-bit in a channel (e.g. solid color images such as https://bug-219977-attachments.webkit.org/attachment.cgi?id=421723). The underlying WebP issue was logged in https://bugs.webkit.org/show_bug.cgi?id=219977 but previous versions of Safari handled the error gracefully (logging &quot;Cannot decode the data in the argument to createImageBitmap&quot;) and error handling in sites/apps could handle the error successfully. Since Safari 15.2, the error isn&apos;t handled and causes the tab to crash.

https://jsbin.com/cetawaqudo/edit?js,output is a basic reproduction using the black square image from above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1841562</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-02-14 19:58:42 -0800</bug_when>
    <thetext>&lt;rdar://problem/88943597&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1842036</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-02-15 16:59:29 -0800</bug_when>
    <thetext>This looks like a duplicate of bug 231794. Can you reproduce this with Safari technology Preview?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1842489</commentid>
    <comment_count>3</comment_count>
    <who name="">ryan.hamley</who>
    <bug_when>2022-02-16 13:26:34 -0800</bug_when>
    <thetext>I couldn&apos;t replicate this in Tech Preview 140 so I think this is likely a duplicate and has been fixed. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1843661</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-02-18 14:51:38 -0800</bug_when>
    <thetext>Thank you for confirming this!

*** This bug has been marked as a duplicate of bug 231794 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>451964</attachid>
            <date>2022-02-14 17:07:37 -0800</date>
            <delta_ts>2022-02-14 17:07:37 -0800</delta_ts>
            <desc>Solid black WebP image</desc>
            <filename>color_000000.webp</filename>
            <type>image/webp</type>
            <size>54</size>
            <attacher>ryan.hamley</attacher>
            
              <data encoding="base64">UklGRi4AAABXRUJQVlA4TCIAAAAvV8KVAAcQEf0PACjS//8U0f/U//73v//973//+9///oce
</data>

          </attachment>
      

    </bug>

</bugzilla>