<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx</link><description>Hello NTDebuggers, we have been very impressed with the responses we’ve gotten to our previous puzzlers so far. We invited the Debug Ninja to come up with a real challenge for this week. This server blue screened with a Bug Check 0xD1: DRIVER_IRQL_NOT_LESS_OR_EQUAL.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8436117</link><pubDate>Tue, 29 Apr 2008 00:01:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8436117</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;tcpip!DeliverToUser+0x114:&lt;/p&gt;
&lt;p&gt;ba50df27 640fb60d51000000 movzx &amp;nbsp; ecx,byte ptr fs:[51h]&lt;/p&gt;
&lt;p&gt;ba50df2f 898880010000 &amp;nbsp; &amp;nbsp;mov &amp;nbsp; &amp;nbsp; dword ptr [eax+180h],ecx&lt;/p&gt;
&lt;p&gt;----&lt;/p&gt;
&lt;p&gt;tcpip!DeliverToUser+0x114:&lt;/p&gt;
&lt;p&gt;ba5024a5 e979ba0000 &amp;nbsp; &amp;nbsp; &amp;nbsp;jmp &amp;nbsp; &amp;nbsp; tcpip!DeliverToUser+0x110 (ba50df23)&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;Are you sure your code snippet isnt bugged?&lt;/p&gt;</description></item><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8436119</link><pubDate>Tue, 29 Apr 2008 00:01:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8436119</guid><dc:creator>Matt</dc:creator><description>&lt;P&gt;f78b6544 ba502493 badb0d00 00000001 00000000 nt!_KiTrap0E+0x2a7 (FPO: [0,0] TrapFrame @ f78b6544)&lt;/P&gt;
&lt;P&gt;Bad return address when KiTrap0E is called. It should be ba502494 instead of ba502493.&lt;/P&gt;
&lt;P&gt;tcpip!DeliverToUser+0x103:&lt;/P&gt;
&lt;P&gt;ba502494 8b15f84154ba &amp;nbsp; &amp;nbsp;mov &amp;nbsp; &amp;nbsp; edx,dword ptr [tcpip!_imp__KeNumberProcessors (ba5441f8)]&lt;/P&gt;
&lt;DIV class=commentowner&gt;[This was the first close response we got, and was a very good start. Is there a specific problem that could cause us to go to ba502493 instead of ba502494?]&lt;/DIV&gt;</description></item><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8441059</link><pubDate>Wed, 30 Apr 2008 06:44:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8441059</guid><dc:creator>MSDNTST</dc:creator><description>&lt;P&gt;I suspect this may be a code corruption.&lt;/P&gt;
&lt;P&gt;It is the code address "ba502493" == tcpip!GetAddrType+0x19f that caused the bugcheck. &lt;/P&gt;
&lt;P&gt;However, from the "ub ba50d9d8" output, it should call tcpip!DeliverToUser function instead of "tcpip!GetAddrType". &lt;/P&gt;
&lt;P&gt;Further searching with "ba5024" in the assembly output shows that the following instruction in tcpip!DeliverToUser will jump to one byte after the crashing address:&lt;/P&gt;
&lt;P&gt;"jne tcpip!DeliverToUser+0x103 (ba502494)"&lt;/P&gt;
&lt;P&gt;So, I believe this code instruction may be corrupted that the execution jumps one byte before the target "ba502493" which is the garbage instruction "add &amp;nbsp; &amp;nbsp; byte ptr [ebx+5441F815h],cl". It is this garbage instruction that caused the bugcheck. &lt;/P&gt;
&lt;P&gt;Jeffrey Tan&lt;/P&gt;
&lt;DIV class=commentowner&gt;[This answer is very close, but there is more that can be said about this problem. How can we jump to ba502493 instead of ba502494?]&lt;/DIV&gt;</description></item><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8444845</link><pubDate>Wed, 30 Apr 2008 23:36:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8444845</guid><dc:creator>Ryanman</dc:creator><description>&lt;P&gt;Was this a bitflip error causing the jump to the improper address?&lt;/P&gt;
&lt;P&gt;kd&amp;gt; .formats ba502493 &lt;/P&gt;
&lt;P&gt;10111010 01010000 00100100 10010011 &amp;lt;--last bit flipped?&lt;/P&gt;
&lt;P&gt;should have been:&lt;/P&gt;
&lt;P&gt;.formats ba502494&lt;/P&gt;
&lt;P&gt;10111010 01010000 00100100 10010100&lt;/P&gt;
&lt;P&gt;code path should have been:&lt;/P&gt;
&lt;P&gt;ba50df1d 0f857145ffff &amp;nbsp; &amp;nbsp;jne &amp;nbsp; &amp;nbsp; tcpip!DeliverToUser+0x103 (ba502494)&lt;/P&gt;
&lt;P&gt;tcpip!DeliverToUser+0x103:&lt;/P&gt;
&lt;P&gt;ba502494 8b15f84154ba &amp;nbsp; &amp;nbsp;mov &amp;nbsp; &amp;nbsp; edx,dword ptr [tcpip!_imp__KeNumberProcessors (ba5441f8)]&lt;/P&gt;
&lt;P&gt;But instead:&lt;/P&gt;
&lt;P&gt;We jump to the wrong location and interpret the instruction as:&lt;/P&gt;
&lt;P&gt;008b15f84154 &amp;nbsp;&amp;lt;--Should have started at 8b15 instead. So we end up with the garbage below:&lt;/P&gt;
&lt;P&gt;tcpip!GetAddrType+0x19f:&lt;/P&gt;
&lt;P&gt;ba502493 008b15f84154 &amp;nbsp; &amp;nbsp;add &amp;nbsp; &amp;nbsp; byte ptr [ebx+5441F815h],cl ds:0023:e074281d=??&lt;/P&gt;
&lt;DIV class=commentowner&gt;[Good effort, you’re getting very close to the answer. However, this example would require that three bits be flipped not just the last bit.]&lt;/DIV&gt;</description></item><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8444907</link><pubDate>Wed, 30 Apr 2008 23:51:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8444907</guid><dc:creator>Ryanman</dc:creator><description>&lt;p&gt;To add to what I posted before, bitfip errors are usually (or is it always??) hardware related. I recommend running a memory diagnostic utility (such as the one on the 2008/Vista DVD or running hardware diagnostics from the vendor. &lt;/p&gt;</description></item><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8447403</link><pubDate>Thu, 01 May 2008 21:36:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8447403</guid><dc:creator>Infro</dc:creator><description>&lt;P&gt;From 0f857145ffff jne ba502494&lt;/P&gt;
&lt;P&gt;Its a relative jump of FFFF4571 make that FFFF4570 and you'll jump back one more (negative numbers count downward) to ba502493. So you might have a memmory error at that location. &amp;nbsp;Another possibility that could occur is that because you are jumping into another page the page mechanism might have modified EIP if it was programmed incorrectly, but it shouldn't ever touch EIP.&lt;/P&gt;
&lt;DIV class=commentowner&gt;[WE HAVE A WINNER! Congratulations, you are the first person to identify and post the root cause of this problem.]&lt;/DIV&gt;</description></item><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8447559</link><pubDate>Thu, 01 May 2008 23:13:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8447559</guid><dc:creator>Ryanman</dc:creator><description>&lt;p&gt;I see now that it's 3 bits differing instead of just 1 (I should slow down and look at the data more carefully). &lt;/p&gt;
&lt;p&gt;Did an interrupt occur and then following the ISR the context was restored incorrectly?&lt;/p&gt;</description></item><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8447869</link><pubDate>Fri, 02 May 2008 02:32:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8447869</guid><dc:creator>Ben Voigt</dc:creator><description>&lt;p&gt;Although the hamming distance in the resultant address is 3 bits, the instruction appears to be using relative addressing, and in the relative address only one bit needs to be flipped.&lt;/p&gt;
&lt;p&gt;Anyway, tcpip!DeliverToUser+0x103 (ba502494) seems somewhat strange. &amp;nbsp;Aren't entrypoints typically word aligned?&lt;/p&gt;
&lt;p&gt;Oh, and the other strangeness -- there are two addresses which resolve to a name of tcpip!DeliverToUser apparently, perhaps taking error handling code out of the fast path or an overloaded name with the mangled part stripped.&lt;/p&gt;</description></item><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8448468</link><pubDate>Fri, 02 May 2008 06:00:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8448468</guid><dc:creator>Mo</dc:creator><description>&lt;p&gt;I'll take a guess of why it jump to ba502493 instead of ba502494.&lt;/p&gt;
&lt;p&gt;This line&lt;/p&gt;
&lt;p&gt;ba50df0d 640fb61551000000 movzx &amp;nbsp; edx,byte ptr fs:[51h]&lt;/p&gt;
&lt;p&gt;is this:&lt;/p&gt;
&lt;p&gt;FORCEINLINE&lt;/p&gt;
&lt;p&gt;ULONG&lt;/p&gt;
&lt;p&gt;NTAPI&lt;/p&gt;
&lt;p&gt;KeGetCurrentProcessorNumber(VOID)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;__asm { &amp;nbsp;movzx eax, _PCR KPCR.Number &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;The .trap ecx=edx=1 which explains why it did not jump on ba50df1d. It smells like SMP related issue.&lt;/p&gt;</description></item><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8449910</link><pubDate>Fri, 02 May 2008 12:08:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8449910</guid><dc:creator>dmitri</dc:creator><description>&lt;p&gt;Seems that the bitflip hit the instruction itself this time:&lt;/p&gt;
&lt;p&gt;0:000&amp;gt; .formats ffff4571&lt;/p&gt;
&lt;p&gt;Evaluate expression:&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Hex: &amp;nbsp; &amp;nbsp; ffff4571&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Decimal: -47759&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Octal: &amp;nbsp; 37777642561&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Binary: &amp;nbsp;11111111 11111111 01000101 01110001&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Chars: &amp;nbsp; ..Eq&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Time: &amp;nbsp; &amp;nbsp;***** Invalid&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Float: &amp;nbsp; low -1.#QNAN high 0&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Double: &amp;nbsp;2.12197e-314&lt;/p&gt;
&lt;p&gt;0:000&amp;gt; .formats ffff4570&lt;/p&gt;
&lt;p&gt;Evaluate expression:&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Hex: &amp;nbsp; &amp;nbsp; ffff4570&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Decimal: -47760&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Octal: &amp;nbsp; 37777642560&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Binary: &amp;nbsp;11111111 11111111 01000101 01110000&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Chars: &amp;nbsp; ..Ep&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Time: &amp;nbsp; &amp;nbsp;***** Invalid&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Float: &amp;nbsp; low -1.#QNAN high 0&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Double: &amp;nbsp;2.12197e-314&lt;/p&gt;
&lt;p&gt;original instruction:&lt;/p&gt;
&lt;p&gt;ba50df1d 0f857145ffff &amp;nbsp; &amp;nbsp;jne &amp;nbsp; &amp;nbsp; tcpip!DeliverToUser+0x103 (ba502494)&lt;/p&gt;
&lt;p&gt;faulty instruction:&lt;/p&gt;
&lt;p&gt;ba50df1d 0f857045ffff &amp;nbsp; &amp;nbsp;jne &amp;nbsp; &amp;nbsp; tcpip!GetAddrType+0x19f (ba502493)&lt;/p&gt;</description></item><item><title>re: NTDebugging Puzzler 0x00000004: This didn’t puzzle the Debug Ninja, how about you?</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8452542</link><pubDate>Sat, 03 May 2008 02:23:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8452542</guid><dc:creator>Infro</dc:creator><description>&lt;p&gt;Well it took me some time to figure it out because my time was being spent in other places.&lt;/p&gt;
&lt;p&gt;My process for doing it was simple, the trapped instruction didn't make any sense, it was a 32bit processor with an ebx+offset &amp;gt; 4GB, doesn't seem like an array over run but a bad value loaded into ebx, so I decided to find where ebx was loaded, so I searched for the binary 8b15f841 and found it an enterly intresting place, a byte off from where it should of been (or so I thought), but then I had to do other things, when I came back I started using livekd and unassembling GetAddrType, got distracted again, when I came back I started over and searched for the instruction again, found it and seen that the way it got there was from a jump, so I looked at the jne, thought well its a relative jump, maybe an interrupt happened and modified eip, after a while of other crazy thoughts (processor error with carry flag? a page monitoring program that screwed up after hooking the paging mechanism?). Then I took a look at the comments and seen &amp;quot;bit flipping&amp;quot; comment and it dawned on my, hardware error, something I don't consider very often, to be honest and as it was very close it had to be the answer, flipped bit, eip/jne offset, well as the comment said&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;.formats ba502493&lt;/p&gt;
&lt;p&gt;.formats ba502494&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Can't be that, 3 to 4 is a multibit flip 100, 011, and one less than FFFF4571 is a single bit flip.&lt;/p&gt;</description></item><item><title>Transcript of Windows NT Debugging Blog Live Chat</title><link>http://blogs.msdn.com/ntdebugging/archive/2008/04/28/ntdebugging-puzzler-0x00000004-this-didn-t-puzzle-the-debug-ninja-how-about-you.aspx#8867300</link><pubDate>Thu, 14 Aug 2008 19:55:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8867300</guid><dc:creator>Microsoft Advanced Windows Debugging and Troubleshooting</dc:creator><description>&lt;p&gt;For those of you that could not make the live chat on 8/13, here is the transcript of the chat session....&lt;/p&gt;
</description></item></channel></rss>