<?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>42959</bug_id>
          
          <creation_ts>2010-07-26 01:09:24 -0700</creation_ts>
          <short_desc>Security meta: investigate cross_fuzz crashes</short_desc>
          <delta_ts>2013-04-03 13:09:21 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Security</product>
          <component>Security</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://lcamtuf.coredump.cx/cross_fuzz/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>43040</dependson>
    
    <dependson>43041</dependson>
    
    <dependson>43139</dependson>
    
    <dependson>43140</dependson>
    
    <dependson>43295</dependson>
    
    <dependson>43297</dependson>
    
    <dependson>43299</dependson>
    
    <dependson>43667</dependson>
    
    <dependson>43676</dependson>
    
    <dependson>43722</dependson>
    
    <dependson>43888</dependson>
    
    <dependson>44150</dependson>
    
    <dependson>44151</dependson>
    
    <dependson>44152</dependson>
    
    <dependson>44153</dependson>
    
    <dependson>45681</dependson>
    
    <dependson>45852</dependson>
    
    <dependson>46222</dependson>
    
    <dependson>46326</dependson>
    
    <dependson>46410</dependson>
    
    <dependson>46427</dependson>
    
    <dependson>46434</dependson>
    
    <dependson>57140</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michal Zalewski">lcamtuf</reporter>
          <assigned_to name="WebKit Security Group">webkit-security-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>aroben</cc>
    
    <cc>bthomas</cc>
    
    <cc>cevans</cc>
    
    <cc>darin</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>dumi</cc>
    
    <cc>gazmyaser</cc>
    
    <cc>joepeck</cc>
    
    <cc>jschuh</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>sam</cc>
    
    <cc>skylined</cc>
    
    <cc>slewis</cc>
    
    <cc>yong.li.webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>255932</commentid>
    <comment_count>0</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-07-26 01:09:24 -0700</bug_when>
    <thetext>Hi folks,

This fuzzer tends to crash WebKit nightly within several seconds (r63957):

http://lcamtuf.coredump.cx/cross_fuzz/cross_fuzz_fixed.html

The bulk of these crashes are NULL pointers, but I allowed it to run for about 2 hours while collecting crash data, and there seems to be a body of more elusive reads and writes to invalid memory addresses (with a prevalence of about 1 per 100 crashes) that seem exploitable, but will be impossible to track down without these NULL ptrs cleaned up.

ap@ proved to be instrumental in tracking down crashes for a related fuzzer, ref_fuzz (https://bugs.webkit.org/show_bug.cgi?id=26824), so cc:ing him here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256180</commentid>
    <comment_count>1</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-07-26 12:45:37 -0700</bug_when>
    <thetext>Just FYI, to help prioritize: my current plan is to publish this fuzzer in approx 60 days (or earlier, if all vendors address the problems sooner).

Currently, looks like all the major browsers are affected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256258</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Evans">cevans</who>
    <bug_when>2010-07-26 14:49:26 -0700</bug_when>
    <thetext>@Alexey, how much beer do I need to bribe you to clean this up like you did Michal&apos;s ref_fuzz?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256510</commentid>
    <comment_count>3</comment_count>
    <who name="Berend-Jan Wever">skylined</who>
    <bug_when>2010-07-27 04:28:36 -0700</bug_when>
    <thetext>I&apos;ve collected some information about crashes and I am opening up bugs to track each crash when I have enough details.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>257043</commentid>
    <comment_count>4</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2010-07-27 23:18:55 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Just FYI, to help prioritize: my current plan is to publish this fuzzer in approx 60 days (or earlier, if all vendors address the problems sooner).
&gt; 
&gt; Currently, looks like all the major browsers are affected.

Can you bring this up on webkit-security.  That is a much better place for us to discuss timelines.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>257073</commentid>
    <comment_count>5</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-07-28 02:04:36 -0700</bug_when>
    <thetext>For the record, the most current &amp; reliable version is:

http://lcamtuf.coredump.cx/cross_fuzz/cross_fuzz_final_20100728.html

There is substantial logging code in the fuzzer, but disabled for performance reasons; it can probably be diverted to some low-overhead channel to recover additional data.

Sadly, the dynamic DOM-crawling behavior of the fuzzer largely rules out the possibility to generate repros in the form of batches of static JS. I am not sure I can simplify this much further.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>257108</commentid>
    <comment_count>6</comment_count>
      <attachid>62812</attachid>
    <who name="Berend-Jan Wever">skylined</who>
    <bug_when>2010-07-28 04:46:19 -0700</bug_when>
    <thetext>Created attachment 62812
Server to use to log what the fuzzer does.

I have implemented a server in Python that can accept XHR requests to log information to a file. With minimal changes, the existing fuzzer can use this to output to a file:

- function LOG(message) {

+ var log_id = new Date().valueOf().toString(16).toUpperCase();
+ var log_counter = 0;
+ 
+ function LOG(message) {
+   var xhr = new XMLHttpRequest();
+   xhr.open(&apos;POST&apos;, &apos;/logs/&apos; + log_id + &apos;.log?&apos; + log_counter++, false);
+   xhr.setRequestHeader(&quot;Content-Type&quot;, &quot;text/plain; charset=UTF-8&quot;);
+   xhr.send(message);

Note that this server was not designed with security in mind: it does allow full R/W access to your file system, so please do not expose it to the intertubes.

How to use this:
1) Put a copy of the fuzzer in a local folder.
2) Copy the Python server in the same folder.
3) Update the LOG function in the fuzzer as described above.
4) Optionally modify the settings at the start of the Python server code.
5) Start the Python server.
6) Point your favorite browser to the server.
The fuzzer will run as usual, but send the log messages to the server along with a unique ID which is based on the start time of the fuzzer. The server will save the messages in a log file based on the unique ID, so you get a new log each time you run the fuzzer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>257201</commentid>
    <comment_count>7</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-07-28 09:33:44 -0700</bug_when>
    <thetext>Keep in mind that there is something like 50,000-100,000 LOG() calls per second if you uncomment all the instances, and probably should be even more to better track references.

Replacing this with a mechanism that is some three orders of magnitude slower (XHR) is probably not going to be conductive of getting results in a sane timeframe (at least for the more elusive arbitrary memory access bugs).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>257297</commentid>
    <comment_count>8</comment_count>
    <who name="Berend-Jan Wever">skylined</who>
    <bug_when>2010-07-28 12:46:12 -0700</bug_when>
    <thetext>@mz: I was working under the assumption that any way to log data is better than nothing. We should be able to get some info if we run it for, say, 60 days :)

Either way, I got my FuzzFramework port of ref_fuzz updated to work in a similar manner and be more effective at finding bugs. Today it started finding many of the same bugs and producing reduced repros. I&apos;ll start filing bugs now :).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>257342</commentid>
    <comment_count>9</comment_count>
    <who name="Berend-Jan Wever">skylined</who>
    <bug_when>2010-07-28 13:48:18 -0700</bug_when>
    <thetext>Here&apos;s a list of crashes I found during an earlier run in Chromium. This list is probably not exhaustive; I&apos;ve found crashes not included in this list with my own port of the fuzzer. Note that I have already found a number of different crashes that are caused by almost the same repro, which seems to imply that they are caused by the same bug in different locations. However, the list is quite long, so I expect we have a lot of bugs to fix.

--- Totals ---------------------------------------------------------------------
Total runs: 1632 in 47588 seconds.
Application crashed 1548 out of 1632 runs
Crashes found:
    31 * WebCore::v8ValueToWebCoreString ReadAV@NULL (cb89e8eb9c0d203f405c1d6513d14b97)
        Attempt to read from NULL pointer in WebCore::v8ValueToWebCoreString
     1 * WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector ReadAV@NULL (ee1436017020027e7d0af466472ee8a3)
        Attempt to read from NULL pointer (+0x10) in WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector
     1 * WTF::HashTable&lt;...&gt; ReadAV@NULL (0ad97e2f1c02a050003c01b3c6661a98)
        Attempt to read from NULL pointer (+0x10) in WTF::HashTable&lt;...&gt;
     2 * v8::internal::ProfileTree::TraverseDepthFirst&lt;...&gt; ReadAV@NULL (e6dd0db2316d0681041db7df20ab48ef)
        Attempt to read from NULL pointer (+0x2C) in v8::internal::ProfileTree::TraverseDepthFirst&lt;...&gt;
     4 * [unknown] in v8::internal::Heap::UpdateNewSpaceReferenceInExternalStringTableEntry ExecAV@NULL (e04c151252e686bfdc36fe357a9556c4)
        Security: Attempt to execute non-executable NULL pointer (+0x1F) in [unknown] in v8::internal::Heap::UpdateNewSpaceReferenceInExternalStringTableEntry
    14 * WebCore::v8StringToWebCoreString&lt;...&gt; ReadAV@NULL (82c75721458c2d1fce8189ca52cd8701)
        Attempt to read from NULL pointer in WebCore::v8StringToWebCoreString&lt;...&gt;
    30 * [unknown] in v8::internal::SymbolTableCleaner::VisitPointers ExecAV@NULL (c875397782229150cc8e13416ac91a39)
        Security: Attempt to execute non-executable NULL pointer (+0x1F) in [unknown] in v8::internal::SymbolTableCleaner::VisitPointers
    27 * tcmalloc::ThreadCache::FreeList::PopRange ReadAV@NULL (4f2e4263d2cc9083a01e819d73b99a15)
        Attempt to read from NULL pointer (+0x1FA0) in tcmalloc::ThreadCache::FreeList::PopRange
     1 * v8::internal::ExternalTwoByteString::ExternalTwoByteStringGet ReadAV@NULL (7e0dc27afae1303f90f31a7b5be2731c)
        Attempt to read from NULL pointer (+0x8) in v8::internal::ExternalTwoByteString::ExternalTwoByteStringGet
    27 * WebCore::v8StringToWebCoreString&lt;...&gt; ReadAV@NULL (f8422e8b997988240159f083e2806467)
        Attempt to read from NULL pointer in WebCore::v8StringToWebCoreString&lt;...&gt;
     2 * [unknown] in IPC::ChannelProxy::Context::TryFilters ExecAV@NULL (230f5af34b088778e449a311ae7b95b2)
        Security: Attempt to execute non-executable NULL pointer in [unknown] in IPC::ChannelProxy::Context::TryFilters
  1084 * WebCore::CSSStyleSelector::styleForElement ReadAV@NULL (dc7b32067c1b2c657a6337dd1beb1998)
        Attempt to read from NULL pointer (+0x24) in WebCore::CSSStyleSelector::styleForElement
    55 * v8::Value::IsUndefined ReadAV@NULL (46cf324ff4d90096390ce66a8724d8a2)
        Attempt to read from NULL pointer in v8::Value::IsUndefined
     3 * kZerob ExecAV@Arbitrary (4b1acb8b140d549bc5c7757b28cf9713)
        Security: Attempt to execute non-executable arbitrary memory @ 0x64A68528 in kZerob
     2 * [unknown] in WebCore::V8Storage::namedPropertyEnumerator ExecAV@NULL (de39145667a622f56fc4cf25af85441c)
        Security: Attempt to execute non-executable NULL pointer (+0x1F) in [unknown] in WebCore::V8Storage::namedPropertyEnumerator
    11 * v8::internal::ExternalTwoByteString::ExternalTwoByteStringGet ReadAV@NULL (63208b4dfc31329f25be59e71b94da52)
        Attempt to read from NULL pointer (+0x8) in v8::internal::ExternalTwoByteString::ExternalTwoByteStringGet
    40 * tcmalloc::CentralFreeList::RemoveRange ReadAV@NULL (861a4f18fc3c9a208ad77c4a73079962)
        Attempt to read from NULL pointer (+0x4830) in tcmalloc::CentralFreeList::RemoveRange
     2 * std::list&lt;...&gt;::_Tidy ReadAV@NULL (7db290478ddc450ea5eda549e811f84b)
        Attempt to read from NULL pointer (+0x239E) in std::list&lt;...&gt;::_Tidy
     1 * tcmalloc::ThreadCache::FreeList::PopRange ReadAV@NULL (e7f247aaf6305bd98a58b66163f32ecf)
        Attempt to read from NULL pointer in tcmalloc::ThreadCache::FreeList::PopRange
    86 * tcmalloc::ThreadCache::Allocate ReadAV@NULL (916b1b80b0657b01ca62e934c8bfe435)
        Attempt to read from NULL pointer (+0x6060) in tcmalloc::ThreadCache::Allocate
     1 * WTF::HashMap&lt;...&gt;::find ReadAV@NULL (57234c212b70515421f7f0a865c70d63)
        Attempt to read from NULL pointer (+0x40) in WTF::HashMap&lt;...&gt;::find
     1 * WebCore::ResourceHandle::setDefersLoading ReadAV@NULL (964235000062ac871e13770a6f2465db)
        Attempt to read from NULL pointer (+0x5E4) in WebCore::ResourceHandle::setDefersLoading
     1 * WebCore::Frame::settings ReadAV@Arbitrary (f1f252723a8fba1d1ab2d5638719d85c)
        Security: Attempt to read from arbitrary memory @ 0x1B056606 in WebCore::Frame::settings
    48 * WebCore::v8StringToWebCoreString&lt;...&gt; ReadAV@NULL (13d73eadafae4a0e3f3be0f8b67da3b5)
        Attempt to read from NULL pointer in WebCore::v8StringToWebCoreString&lt;...&gt;
     1 * WebCore::ResourceLoader::releaseResources ReadAV@NULL (b41759dd7a44d2220455d8b6133966f7)
        Attempt to read from NULL pointer in WebCore::ResourceLoader::releaseResources
    13 * v8::internal::SymbolTableCleaner::VisitPointers ReadAV@NULL (b18a7578fdd9e438e324ca402e05de54)
        Attempt to read from NULL pointer (+0x4) in v8::internal::SymbolTableCleaner::VisitPointers
     1 * WebCore::AutoTableLayout::recalcColumn ReadAV@NULL (47c4a759037b83d2f9f51ff84aeecef3)
        Attempt to read from NULL pointer (+0xAF) in WebCore::AutoTableLayout::recalcColumn
     3 * [unknown] in WebCore::CSSStyleSelector::applyProperty ExecAV@NULL (976755a6a4943014432368bf55b269fc)
        Security: Attempt to execute non-executable NULL pointer in [unknown] in WebCore::CSSStyleSelector::applyProperty
     3 * tcmalloc::CentralFreeList::FetchFromSpansSafe ReadAV@NULL (25a95c62d87e4e6097c3c1c93a7fcefa)
        Attempt to read from NULL pointer (+0x1D2C) in tcmalloc::CentralFreeList::FetchFromSpansSafe
     1 * v8::internal::ExternalTwoByteString::ExternalTwoByteStringReadBlockIntoBuffer ReadAV@NULL (52da055f45c2cf4cf2cfed5e67a916b4)
        Attempt to read from NULL pointer (+0x8) in v8::internal::ExternalTwoByteString::ExternalTwoByteStringReadBlockIntoBuffer
     1 * webkit_glue::SerializeNPIdentifier ReadAV@NULL (d8225a2aa13e714081e3b7b3879c10f2)
        Attempt to read from NULL pointer in webkit_glue::SerializeNPIdentifier
     4 * v8::internal::Heap::UpdateNewSpaceReferenceInExternalStringTableEntry ReadAV@NULL (d91d2eb1264f5476ad2c929c9091e3e0)
        Attempt to read from NULL pointer (+0x4) in v8::internal::Heap::UpdateNewSpaceReferenceInExternalStringTableEntry
     9 * std::basic_string&lt;...&gt; ReadAV@NULL (b1664ffeee133fe441240d0f384f63cd)
        Attempt to read from NULL pointer in std::basic_string&lt;...&gt;
     1 * WebCore::Chrome::windowRect ReadAV@NULL (83c16086e53c44a806a015b12dbab5a5)
        Attempt to read from NULL pointer (+0x1760) in WebCore::Chrome::windowRect
     1 * [unknown] in WebCore::V8Proxy::runScript ExecAV@Arbitrary (103362849b00f5068909c9bbc1d8faf5)
        Security: Attempt to execute non-executable arbitrary memory @ 0x00EB45A0 in [unknown] in WebCore::V8Proxy::runScript
     1 * `anonymous namespace&apos;::PureCall DebugBreak (318e1cd3ad6ea781d52d6600f83d944d)
        Debugger breakpoint in `anonymous namespace&apos;::PureCall
     1 * WebCore::RenderLayer::paintList ReadAV@NULL (14683c4f4c3756ddb633951de3999428)
        Attempt to read from NULL pointer in WebCore::RenderLayer::paintList
     1 * [unknown] in WebCore::CSSRule::parentStyleSheet ExecAV@Arbitrary (85dce828ec3b4dcd1e8309a8628d368f)
        Security: Attempt to execute non-executable arbitrary memory @ 0x37353A38 in [unknown] in WebCore::CSSRule::parentStyleSheet
     8 * WebCore::CSSStyleSelector::matchRules ReadAV@NULL (ddadcc564002a587b76843cf206b4d62)
        Attempt to read from NULL pointer (+0x8) in WebCore::CSSStyleSelector::matchRules
    14 * v8::internal::ProfilerEventsProcessor::AddCurrentStack ReadAV@NULL (480a56e37d10e09542742ea90abe880c)
        Attempt to read from NULL pointer (+0x50) in v8::internal::ProfilerEventsProcessor::AddCurrentStack
     8 * kZerob ExecAV@Arbitrary (a9ede760a659c2e0e07f2ceaa3e0f871)
        Security: Attempt to execute non-executable arbitrary memory @ 0x63138528 in kZerob
     2 * tcmalloc::ThreadCache::ReleaseToCentralCache ReadAV@NULL (c17ede9be4ef0c35752557d3b9fd0595)
        Attempt to read from NULL pointer in tcmalloc::ThreadCache::ReleaseToCentralCache</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>257945</commentid>
    <comment_count>10</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-07-29 15:51:44 -0700</bug_when>
    <thetext>New major version. The two most significant changes include randomizing DOM crawl order, and limiting object crawl fanout.

http://lcamtuf.coredump.cx/cross_fuzz/cross_fuzz_randomized_20100729.html

It seems to trigger a more varied set of faults, and is less prone to hitting the NULL ptrs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>258733</commentid>
    <comment_count>11</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-08-01 23:13:27 -0700</bug_when>
    <thetext>&lt;rdar://problem/8260939&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>261774</commentid>
    <comment_count>12</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-08-07 14:28:44 -0700</bug_when>
    <thetext>https://bugs.webkit.org/show_bug.cgi?id=43677
https://bugs.webkit.org/show_bug.cgi?id=43680

Not marking as blockers because I don&apos;t want to link to this bug from non-security bugs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>261775</commentid>
    <comment_count>13</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-08-07 14:34:24 -0700</bug_when>
    <thetext>I can&apos;t get much more useful out of this fuzzer because I keep hitting Bug 43676.  Hopefully dumi can fix that one soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>262478</commentid>
    <comment_count>14</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-08-09 20:35:56 -0700</bug_when>
    <thetext>dumi posted a patch for Bug 43676.  He says he ran the fuzzer for a while after that without hitting any other problems.  I&apos;ll give it another spin at some point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>265959</commentid>
    <comment_count>15</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-08-17 23:02:03 -0700</bug_when>
    <thetext>I played with this a bit more and filed a bunch of bugs (some with patches).  It found at least one real security bug.  I suspect there&apos;s more to find here.  On my last run, it ran for a while and then locked up in some SVG morphology code that I didn&apos;t understand.

In any case, I think it would be more productive if other folks started looking at this fuzzer too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>276645</commentid>
    <comment_count>16</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-09-09 11:55:41 -0700</bug_when>
    <thetext>OK - not to be annoying, but is there any specific plan to tackle these issues any further at this point?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>276676</commentid>
    <comment_count>17</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-09-09 12:39:03 -0700</bug_when>
    <thetext>(In reply to comment #16)
&gt; OK - not to be annoying, but is there any specific plan to tackle these issues any further at this point?

Do you mean w.r.t. the open bugs?  The open bugs appear to be a null pointer crash, an assert, a request for a test case, and one nasty crash with zero information about how to reproduce.  That seems pretty non-actionable / low-impact to me.

If you mean w.r.t. finding new bugs with the fuzzer, I think there&apos;s more work to be done there, however.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>276679</commentid>
    <comment_count>18</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-09-09 12:41:59 -0700</bug_when>
    <thetext>Yes, the latter (unless there are no more exploitable crashes on trunk - in which case, I can verify and close this bug).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>276681</commentid>
    <comment_count>19</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-09-09 12:44:18 -0700</bug_when>
    <thetext>I think the fuzzer needs more running.  As I said in Comment #15, I&apos;d prefer if someone else would give it a spin, but if no one steps up to the plate, it will rise to the top of my list again at some point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>276690</commentid>
    <comment_count>20</comment_count>
    <who name="Justin Schuh">jschuh</who>
    <bug_when>2010-09-09 13:01:54 -0700</bug_when>
    <thetext>We got a bit delayed on our end, but we&apos;ll have it running and outputting reproductions in the next day or so. And we&apos;re just going to leave it chugging until it stops finding things.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>279301</commentid>
    <comment_count>21</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-09-14 18:31:49 -0700</bug_when>
    <thetext>Note that logging *can* be enabled in the original fuzzer very easily, to collect a trace of all executed JS commands.

There is some (commented out) code along these lines in place already, which also provides debug information about the DOM crawl status; but the surest and most robust way to do this is just to replace all calls to eval() with calls a logging version.

The only downside of this is that:

1) It is infuriatingly slow (but that&apos;s better than not making progress at all),

2) The repros will be huge and not necessarily easy to minimize.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>279345</commentid>
    <comment_count>22</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-09-14 19:44:40 -0700</bug_when>
    <thetext>Here&apos;s an untested, but probably close-to-usable version of the fuzzer that passes all the executed JS commands to LOG() - which in turn can be piped to a suitable channel, and with minimal effort, used to recover (probably still very unhelpful) repro cases. The default &lt;textarea&gt; output is painfully slow. Perhaps console.log() is better.

http://lcamtuf.coredump.cx/cross_fuzz/cross_fuzz_randomized_20100729_logging.html

Note that cross_fuzz_randomized_20100729.html should remain the canonical test case for confirming there are no outstanding issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>279352</commentid>
    <comment_count>23</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-09-14 20:26:11 -0700</bug_when>
    <thetext>The important part is being able to reproduce whatever crash was encountered during a given run. Logging all operations is one way to approach this. Another way is to log pseudo-random number generator seed, and then replay a sequence of subtests - that&apos;s what we&apos;ve been getting from iExploder, for example. 

There might be other ways that are more appropriate for cross_fuzz. We could even add temporary hooks in local builds for that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>279356</commentid>
    <comment_count>24</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-09-14 20:33:07 -0700</bug_when>
    <thetext>Yes, sure; plugging a seed-enabled PRNG into the fuzzer is 2 minutes of work, but in the previous conversations, I had the impression that people are not happy with this alone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>279360</commentid>
    <comment_count>25</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-09-14 20:43:11 -0700</bug_when>
    <thetext>Here&apos;s a version that does just that:

http://lcamtuf.coredump.cx/cross_fuzz/cross_fuzz_randomized_20100729_seed.html

It accepts seed in location.hash, say:

http://lcamtuf.coredump.cx/cross_fuzz/cross_fuzz_randomized_20100729_seed.html#1234

If no seed is found, it picks one based on system time, and updates location.hash accordingly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>280505</commentid>
    <comment_count>26</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-09-16 19:11:16 -0700</bug_when>
    <thetext>Alas, this doesn&apos;t seem to help much for some reason - even with a seed, I&apos;m getting wildly different crashes each time.

Logging versions seem to be quite slow indeed, even when using console.log. I&apos;ve modified JSC to add all eval arguments to a static Vector&lt;UChar*&gt; internally, that seem to work better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>280550</commentid>
    <comment_count>27</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-09-16 23:25:43 -0700</bug_when>
    <thetext>The seeded version works reasonably well for me in Chrome, but there is probably some jitter related to document loading times, etc. Do you mean you can never repro anything with the same seed, or that results vary only from time to time?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>280557</commentid>
    <comment_count>28</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-09-16 23:56:41 -0700</bug_when>
    <thetext>In my experience, it seemed like the seed didn&apos;t help achieve reproducible results. But it usually takes a minute or two to crash, so there is a lot of time for loading time to affect results.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293119</commentid>
    <comment_count>29</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2010-10-12 14:28:06 -0700</bug_when>
    <thetext>There hasn&apos;t been any activity on this bug for a while, so just wanted to check status. Looks like almost all the linked bugs are fixed, but I think there are still some security-relevant crashes in nightly builds?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>329803</commentid>
    <comment_count>30</comment_count>
    <who name="Michal Zalewski">lcamtuf</who>
    <bug_when>2011-01-05 14:43:51 -0800</bug_when>
    <thetext>Just FYI, I have made modifications to cross_fuzz that greatly improve the ability to reproduce crashes from a known seed. It&apos;s not nearly as good as having clean repros, but it allows you to run cross_fuzz continuously, pick the seed that crashed the soonest, and work from there reproducing at will.

To make it work, you need to do the following:

1) wget -r -np the entire http://lcamtuf.coredump.cx/cross_fuzz/ directory to file:///

2) Set home page for the test profile to about:blank, disable
safesearch, auto-updates, and any other mechanisms that may be introducing additional unpredictable latency. Also disable pop-up blocking.

3) Start the browser in incognito mode, allowing JS file:/// access. For Chrome, this is:

chrome --incognito --allow-file-access-from-files
file:///somewhere/cross_fuzz_randomized_20110105_seed.html#1234

...where #1234 is your desired seed (pick a 32-bit random integer across fuzzing runs).

In Chrome, this yields a very good repro rate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>611074</commentid>
    <comment_count>31</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-04-26 16:37:03 -0700</bug_when>
    <thetext>We&apos;ve got a lot of mileage from this, and this bug doesn&apos;t appear to be tracking anything practical at this time. Folks of course continue running fuzzers, but there has been no orchestrated effort to fix cross_fuzz crashes in more than two years.

Resolved/Fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>868869</commentid>
    <comment_count>32</comment_count>
    <who name="Alex Mayer">gazmyaser</who>
    <bug_when>2013-04-03 13:03:47 -0700</bug_when>
    <thetext>Hi!
I added cross _fuzz preservation test pages. Store them in localStorage. When you restart, the last test page in a browser, on which there was a crash, crash does not happen again. Why is that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>868874</commentid>
    <comment_count>33</comment_count>
    <who name="Alex Mayer">gazmyaser</who>
    <bug_when>2013-04-03 13:09:21 -0700</bug_when>
    <thetext>Hi!
I added cross _fuzz preservation test pages. Store them in localStorage. When you restart, the last test page in a browser, on which there was a crash, crash does not happen again. Why is that?(In reply to comment #30)
&gt; Just FYI, I have made modifications to cross_fuzz that greatly improve the ability to reproduce crashes from a known seed. It&apos;s not nearly as good as having clean repros, but it allows you to run cross_fuzz continuously, pick the seed that crashed the soonest, and work from there reproducing at will.
&gt; 
&gt; To make it work, you need to do the following:
&gt; 
&gt; 1) wget -r -np the entire http://lcamtuf.coredump.cx/cross_fuzz/ directory to file:///
&gt; 
&gt; 2) Set home page for the test profile to about:blank, disable
&gt; safesearch, auto-updates, and any other mechanisms that may be introducing additional unpredictable latency. Also disable pop-up blocking.
&gt; 
&gt; 3) Start the browser in incognito mode, allowing JS file:/// access. For Chrome, this is:
&gt; 
&gt; chrome --incognito --allow-file-access-from-files
&gt; file:///somewhere/cross_fuzz_randomized_20110105_seed.html#1234
&gt; 
&gt; ...where #1234 is your desired seed (pick a 32-bit random integer across fuzzing runs).
&gt; 
&gt; In Chrome, this yields a very good repro rate.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>62812</attachid>
            <date>2010-07-28 04:46:19 -0700</date>
            <delta_ts>2010-07-28 04:46:19 -0700</delta_ts>
            <desc>Server to use to log what the fuzzer does.</desc>
            <filename>mini_server.py</filename>
            <type>text/plain</type>
            <size>8926</size>
            <attacher name="Berend-Jan Wever">skylined</attacher>
            
              <data encoding="base64">aW1wb3J0IG9zLCByZSwgc29ja2V0LCB0aHJlYWQsIHRocmVhZGluZzsNCg0KIyBTZXR0aW5ncyB0
aGF0IHlvdSBtYXkgd2FudCB0byBjaGFuZ2U6DQpXRUJTRVJWRVJfUE9SVCA9IDI4ODc2Ow0KTE9H
U19GT0xERVIgPSBvcy5wYXRoLmpvaW4ob3MuZ2V0Y3dkKCksICdsb2dzJyk7DQpGVVpaRVJfSFRN
TCA9ICdjcm9zc19mdXp6X2ZpbmFsXzIwMTAwNzI4Lmh0bWwnOw0KVkVSQk9TRV9PVVRQVVQgPSBU
cnVlOw0KDQojIFNldHRpbmdzIHRoYXQgeW91IG1heSBuZWVkIHRvIGNoYW5nZSBpZiB5b3UgYWRk
IG5ldyBmaWxlIHR5cGVzOg0KREVGQVVMVF9NSU1FX1RZUEUgPSAnYXBwbGljYXRpb24vb2N0ZXQt
c3RyZWFtJzsNClJFR0lTVEVSRURfTUlNRV9UWVBFUyA9IHsNCiAgJ3RleHQvaHRtbCc6IFsnaHRt
JywgJ2h0bWwnXSwNCiAgJ3RleHQvamF2YXNjcmlwdCc6IFsnanMnXSwNCiAgJ2ltYWdlL3N2Zyt4
bWwnOiBbJ3N2ZyddLA0KICAnaW1hZ2UvanBlZyc6IFsnanBnJ10sDQp9Ow0KDQpkZWYgTWltZVR5
cGUocGF0aCk6DQogIGxhc3RfZG90ID0gcGF0aC5yZmluZCgnLicpOw0KICBpZiBsYXN0X2RvdCAh
PSAtMToNCiAgICBleHQgPSBwYXRoW2xhc3RfZG90ICsgMTpdLmxvd2VyKCk7DQogICAgZm9yIG1p
bWVfdHlwZSwgZXh0cyBpbiBSRUdJU1RFUkVEX01JTUVfVFlQRVMuaXRlbXMoKToNCiAgICAgIGlm
IGV4dCBpbiBleHRzOg0KICAgICAgICByZXR1cm4gbWltZV90eXBlOw0KICByZXR1cm4gREVGQVVM
VF9NSU1FX1RZUEU7DQoNCmRlZiB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Uuc3BsaXQoJ1xyXG4nKVswXSwg
bGVuKHJlc3BvbnNlKSwgbWltZV90eXBlKTsNCiAgcmV0dXJuIHJlc3BvbnNlOw0KDQppZiBfX25h
bWVfXyA9PSAiX19tYWluX18iOg0KICBNYWluKCk7DQogIA==
</data>

          </attachment>
      

    </bug>

</bugzilla>