<?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>241813</bug_id>
          
          <creation_ts>2022-06-21 11:50:24 -0700</creation_ts>
          <short_desc>std::variant decoding with out-of-bounds index should fail instead of decoding the 0&apos;th type</short_desc>
          <delta_ts>2022-06-28 00:41:30 -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>WebKit2</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Alex Christensen">achristensen</reporter>
          <assigned_to name="Alex Christensen">achristensen</assigned_to>
          <cc>cdumez</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1877013</commentid>
    <comment_count>0</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2022-06-21 11:50:24 -0700</bug_when>
    <thetext>Doesn&apos;t really decrease any powers of a compromised process, but IPC bounds checks are generally a good idea.  This prevents a debug assertion in fuzzers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877014</commentid>
    <comment_count>1</comment_count>
      <attachid>460377</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2022-06-21 11:51:35 -0700</bug_when>
    <thetext>Created attachment 460377
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877015</commentid>
    <comment_count>2</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2022-06-21 11:58:38 -0700</bug_when>
    <thetext>See rdar://82979527</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877017</commentid>
    <comment_count>3</comment_count>
      <attachid>460377</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2022-06-21 12:46:24 -0700</bug_when>
    <thetext>Comment on attachment 460377
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877204</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-06-21 20:23:03 -0700</bug_when>
    <thetext>Committed r295719 (251724@main): &lt;https://commits.webkit.org/251724@main&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 460377.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877206</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-21 20:24:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/95657318&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878694</commentid>
    <comment_count>6</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2022-06-28 00:41:30 -0700</bug_when>
    <thetext>FWIW, the added `if` is actually dead code since bug 241547, as there are no callers with `i != index`. It&apos;s just an artefact of how the recursion for variadic templates is written. E.g. there&apos;s no fuzzer in the world that would&apos;ve hit that assertion.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>460377</attachid>
            <date>2022-06-21 11:51:35 -0700</date>
            <delta_ts>2022-06-21 20:23:04 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-241813-20220621115134.patch</filename>
            <type>text/plain</type>
            <size>1187</size>
            <attacher name="Alex Christensen">achristensen</attacher>
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