<?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>275528</bug_id>
          
          <creation_ts>2024-06-15 07:00:22 -0700</creation_ts>
          <short_desc>SEGV YarrJIT.h:350:28</short_desc>
          <delta_ts>2024-07-01 19:14:38 -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>JavaScriptCore</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>katoshi1337</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>msaboff</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2041519</commentid>
    <comment_count>0</comment_count>
    <who name="">katoshi1337</who>
    <bug_when>2024-06-15 07:00:22 -0700</bug_when>
    <thetext>Step:

./jsc ./poc.js


ASAN:

==40829==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x562a749076de (pc 0x7fbad4c28159 bp 0x7ffc6f134250 sp 0x7ffc6f1341b8 T40829)
==40829==The signal is caused by a READ memory access.
    #0 0x7fbad4c28159  (&lt;unknown module&gt;)
    #1 0x562875470c61 in JSC::Yarr::YarrCodeBlock::execute(std::span&lt;char16_t const, 18446744073709551615ul&gt;, unsigned int, int*, JSC::Yarr::MatchingContextHolder*) /home/fuzzer/webkit_fuzzing/WebKit-main/Source/JavaScriptCore/yarr/YarrJIT.h:350:28
    #2 0x562875470c61 in int JSC::RegExp::matchInline&lt;WTF::Vector&lt;int, 32ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;, (JSC::Yarr::MatchFrom)0&gt;(JSC::JSGlobalObject*, JSC::VM&amp;, WTF::String const&amp;, unsigned int, WTF::Vector&lt;int, 32ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;) /home/fuzzer/webkit_fuzzing/WebKit-main/Source/JavaScriptCore/runtime/RegExpInlines.h:144:43

UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV (&lt;unknown module&gt;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2041520</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-06-15 07:00:33 -0700</bug_when>
    <thetext>&lt;rdar://problem/129910892&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2041521</commentid>
    <comment_count>2</comment_count>
    <who name="">katoshi1337</who>
    <bug_when>2024-06-15 07:02:49 -0700</bug_when>
    <thetext>poc.js:


```
/[a]/iu.test(&quot;₠a&quot;);
const v4 = /[a]/iu;
v4.test(&quot;₠A&quot;);
/[A]/iu.test(&quot;₠a&quot;);
/[A]/iu.test(&quot;₠A&quot;);
const v13 = /[\u00e5]/i;
v13.test(&quot;Å&quot;);
/[\u212b]/dyiu.test(&quot;Å&quot;);
/[\u212b]/i.test(&quot;å&quot;);
const v21 = (&quot;Å&quot;).toLowerCase();
v21 == &quot;å&quot;;
(&quot;Å&quot;).toLowerCase();
v21 == &quot;å&quot;;
(&quot;Å&quot;).toUpperCase();
&quot;Å&quot; == &quot;å&quot;;
const v32 = /\u00e5/iu;
v32.test(&quot;Å&quot;);
/\u00e5/iu.test(&quot;Å&quot;);
/\u00e5/iu.test(&quot;å&quot;);
v4.test(&quot;Å&quot;);
/\u00c5/iu.test(&quot;Å&quot;);
/\u00c5/iu.test(&quot;Å&quot;);
/\u00c5/iu.test(&quot;å&quot;);
/\u212b/iu.test(&quot;Å&quot;);
v4.test(&quot;Å&quot;);
/\u{10400}/i.test(&quot;𐐨&quot;);
/\ud801\udc00/iu.test(&quot;𐐨&quot;);
v13.test(&quot;𐐀&quot;);
/[\ud801\udc28]/iu.test(&quot;𐐀&quot;);
[&quot;Ａ𐐀&quot;];
v32.test(&quot;ἅι&quot;);
/(.)\1\1/iu.exec(&quot;Ａ𐐀abc&quot;);
/(.)\1/iu.exec(&quot;𑢪𑣊&quot;);
/^\u017F/iu.exec();
/^\u017F/iu;
gc();
print(1111)

```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2043286</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2024-06-26 15:03:03 -0700</bug_when>
    <thetext>Pull request: https://github.com/apple/WebKit/pull/1343</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2044053</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2024-07-01 14:28:16 -0700</bug_when>
    <thetext>*** Bug 276046 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2044055</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2024-07-01 14:36:45 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/30360</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2044116</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-07-01 19:14:37 -0700</bug_when>
    <thetext>Committed 280563@main (8802eec90fd4): &lt;https://commits.webkit.org/280563@main&gt;

Reviewed commits have been landed. Closing PR #30360 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>471686</attachid>
            <date>2024-06-15 07:00:22 -0700</date>
            <delta_ts>2024-06-15 07:00:22 -0700</delta_ts>
            <desc>poc.js</desc>
            <filename>file_275528.txt</filename>
            <type>text/plain</type>
            <size>0</size>
            <attacher>katoshi1337</attacher>
            
              <data encoding="base64"></data>

          </attachment>
      

    </bug>

</bugzilla>