<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Out of bounds read in operatorString()"
   href="https://bugs.webkit.org/show_bug.cgi?id=165091">165091</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Out of bounds read in operatorString()
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>fumfi.255&#64;gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=295490" name="attach_295490" title="POC to trigger out of bounds read (jsc)">attachment 295490</a> <a href="attachment.cgi?id=295490&amp;action=edit" title="POC to trigger out of bounds read (jsc)">[details]</a></span>
POC to trigger out of bounds read (jsc)

Affected SVN revision: 208970

To reproduce the problem:
./jsc jsc_operator_string_segfault.js

ASAN Output:

==27690==ERROR: AddressSanitizer: SEGV on unknown address 0x0000977537dd (pc 0x7ff9b41478f7 bp 0x7fff076ec010 sp 0x7fff076eb220 T0)
==27690==The signal is caused by a READ memory access.
    #0 0x7ff9b41478f6 in WTFCrash XYZ/WebKit/Source/WTF/wtf/Assertions.cpp:322:5
    #1 0x7ff9b2f9e230 in JSC::operatorString(bool, unsigned int) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:4625:5
    #2 0x7ff9b2f9e230 in JSC::ASTBuilder::Expression JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseUnaryExpression&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:4675
    #3 0x7ff9b2f9e230 in JSC::ASTBuilder::Expression JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseBinaryExpression&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:3658
    #4 0x7ff9b2f9e230 in JSC::ASTBuilder::Expression JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseConditionalExpression&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:3614
    #5 0x7ff9b2f9e230 in JSC::ASTBuilder::Expression JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseAssignmentExpression&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;, JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::ExpressionErrorClassifier&amp;) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:3454
    #6 0x7ff9b2ea0cae in JSC::ASTBuilder::Expression JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseAssignmentExpression&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:3423:12
    #7 0x7ff9b2ea0cae in JSC::ASTBuilder::Expression JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseExpression&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:3385
    #8 0x7ff9b301081b in JSC::ASTBuilder::Statement JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseExpressionStatement&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:2883:33
    #9 0x7ff9b2fe070a in JSC::ASTBuilder::Statement JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseStatement&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;, JSC::Identifier const*&amp;, unsigned int*) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:1806:39
    #10 0x7ff9b2fc3ed6 in JSC::ASTBuilder::Statement JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseStatementListItem&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;, JSC::Identifier const*&amp;, unsigned int*) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:669:18
    #11 0x7ff9b2e083d2 in JSC::ASTBuilder::SourceElements JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseSourceElements&lt;JSC::ASTBuilder&gt;(JSC::ASTBuilder&amp;, JSC::SourceElementsMode) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:410:38
    #12 0x7ff9b2df5391 in JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parseInner(JSC::Identifier const&amp;, JSC::SourceParseMode) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.cpp:295:30
    #13 0x7ff9afddeb20 in std::unique_ptr&lt;JSC::ProgramNode, std::default_delete&lt;JSC::ProgramNode&gt; &gt; JSC::Parser&lt;JSC::Lexer&lt;unsigned char&gt; &gt;::parse&lt;JSC::ProgramNode&gt;(JSC::ParserError&amp;, JSC::Identifier const&amp;, JSC::SourceParseMode) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.h:1796:25
    #14 0x7ff9afdde2fc in std::unique_ptr&lt;JSC::ProgramNode, std::default_delete&lt;JSC::ProgramNode&gt; &gt; JSC::parse&lt;JSC::ProgramNode&gt;(JSC::VM*, JSC::SourceCode const&amp;, JSC::Identifier const&amp;, JSC::JSParserBuiltinMode, JSC::JSParserStrictMode, JSC::JSParserScriptMode, JSC::SourceParseMode, JSC::SuperBinding, JSC::ParserError&amp;, JSC::JSTextPosition*, JSC::ConstructorKind, JSC::DerivedContextType, JSC::EvalContextType, JSC::DebuggerParseData*) XYZ/WebKit/Source/JavaScriptCore/parser/Parser.h:1885:53
    #15 0x7ff9b32b1937 in JSC::UnlinkedProgramCodeBlock* JSC::generateUnlinkedCodeBlock&lt;JSC::UnlinkedProgramCodeBlock, JSC::ProgramExecutable&gt;(JSC::VM&amp;, JSC::ProgramExecutable*, JSC::SourceCode const&amp;, JSC::JSParserStrictMode, JSC::JSParserScriptMode, JSC::DebuggerMode, JSC::ParserError&amp;, JSC::EvalContextType, JSC::VariableEnvironment const*) XYZ/WebKit/Source/JavaScriptCore/runtime/CodeCache.h:235:42
    #16 0x7ff9b32a76d3 in JSC::UnlinkedProgramCodeBlock* JSC::CodeCache::getUnlinkedGlobalCodeBlock&lt;JSC::UnlinkedProgramCodeBlock, JSC::ProgramExecutable&gt;(JSC::VM&amp;, JSC::ProgramExecutable*, JSC::SourceCode const&amp;, JSC::JSParserStrictMode, JSC::JSParserScriptMode, JSC::DebuggerMode, JSC::ParserError&amp;, JSC::EvalContextType) XYZ/WebKit/Source/JavaScriptCore/runtime/CodeCache.cpp:75:48
    #17 0x7ff9b32a381f in JSC::CodeCache::getUnlinkedProgramCodeBlock(JSC::VM&amp;, JSC::ProgramExecutable*, JSC::SourceCode const&amp;, JSC::JSParserStrictMode, JSC::DebuggerMode, JSC::ParserError&amp;) XYZ/WebKit/Source/JavaScriptCore/runtime/CodeCache.cpp:85:12
    #18 0x7ff9b3699f25 in JSC::JSGlobalObject::createProgramCodeBlock(JSC::ExecState*, JSC::ProgramExecutable*, JSC::JSObject**) XYZ/WebKit/Source/JavaScriptCore/runtime/JSGlobalObject.cpp:1336:69
    #19 0x7ff9b3b15a33 in JSC::ProgramExecutable::initializeGlobalProperties(JSC::VM&amp;, JSC::ExecState*, JSC::JSScope*) XYZ/WebKit/Source/JavaScriptCore/runtime/ProgramExecutable.cpp:83:65
    #20 0x7ff9b2814431 in JSC::Interpreter::execute(JSC::ProgramExecutable*, JSC::ExecState*, JSC::JSObject*) XYZ/WebKit/Source/JavaScriptCore/interpreter/Interpreter.cpp:874:36
    #21 0x7ff9b34234e5 in JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;) XYZ/WebKit/Source/JavaScriptCore/runtime/Completion.cpp:110:43
    #22 0x4feada in runWithScripts(GlobalObject*, WTF::Vector&lt;Script, 0ul, WTF::CrashOnOverflow, 16ul&gt; const&amp;, WTF::String const&amp;, bool, bool, bool) XYZ/WebKit/Source/JavaScriptCore/jsc.cpp:2825:35
    #23 0x4feada in runJSC(JSC::VM*, CommandLine) XYZ/WebKit/Source/JavaScriptCore/jsc.cpp:3102
    #24 0x4fa755 in jscmain(int, char**) XYZ/WebKit/Source/JavaScriptCore/jsc.cpp:3154:14
    #25 0x4fa389 in main XYZ/WebKit/Source/JavaScriptCore/jsc.cpp:2672:15
    #26 0x7ff9ac57e82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #27 0x4249a8 in _start (/home/kamil/Fuzzing/webkit_jsc_240616/jsc+0x4249a8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV XYZ/WebKit/Source/WTF/wtf/Assertions.cpp:322:5 in WTFCrash
==27690==ABORTING

Regards,
Kamil Frankowicz</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>