I was hoping to find more than, “it’s hosed” for you, but my limited NDIS
experience is playing against me here. Maybe one of the NDIS experts will
have an idea.
(I’ll also note that I am officially in love with the NDIS KD
extensions…Why couldn’t all extensions be this pleasant?? Kudos to the
NDIS team.)
Again, the faulting instruction:
1: kd> r
Last set context:
eax=95baba28 ebx=8498808c ecx=b1934fb7 edx=00000000 esi=92740fa0
edi=49c9ed26
eip=84686acc esp=a010ac34 ebp=a010aca8 iopl=0 nv up ei pl nz na po
nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
efl=00010202
ndis!NdisAllocateCloneNetBufferList+0xda:
84686acc 8b5714 mov edx,dword ptr [edi+14h]
ds:0023:49c9ed3a=???
As raj pointed out, this value is ultimately coming from
NetBufferList->FirstNetBuffer->MdlChain, where the NetBufferList is the
first parameter passed to the function and located at EBP+8:
1: kd> !ndiskd.nbl poi(@ebp+8) -data
NET_BUFFER 8498808c
Skipping MDL 49c9ed26
[Next link in list is not readable; aborting the list traversal]
NET_BUFFER 886ed58c
NET_BUFFER 88d31ad4
Invalid NET_BUFFER_LIST at 00000002
[Next link in list is not readable; aborting the list traversal]
So, the passed in NetBufferList is toast. More specifically, the NetBuffers
in the NetBufferList are toast. As we see we get that bogus MDL address from
the first in the list:
1: kd> !ndiskd.nb 8498808c
NB 8498808c Next NB 886ed58c
Length 95baba28 Source Pool 00010000
First MDL 49c9ed26 DataOffset b1934fb7
Current MDL 85d6965c Current MDL Offset 0
However, the allocation containing the NetBufferList is a current WFP
allocation:
1: kd> !pool poi(@ebp+8) 2
Pool page 85d69658 region is Nonpaged pool
*85d69650 size: 38 previous size: f8 (Allocated) *Fwpp
Pooltag Fwpp : Windows Filtering Platform export driver., Binary :
fwpkclnt.sys
Thus, the containing allocation is OK but the contents are bad.
Unfortunately there’s not anything else to go on really from here. I scanned
the dump for a potential race condition, but didn’t find anything
interesting. Going back to what’s left of the NetBufferList in the hopes of
finding a clue, the !nbl command interpreted the Flags value without
complaint so it’s *possible* that the flags are real:
1: kd> !ndiskd.nbl poi(@ebp+8)
NBL 85d69658 Next NBL 00000002
First NB 8498808c Source 88d0e640
Flags 0000048f
↑ INDICATED, RETURNED, XLATED_TO_PACKET, UNXLATED,
IS_LOOPBACK_BUFFER,
NBL_CONTEXT_ALLOCATED
NblFlags 890bc138 [Unrecognized flags 890b0038]
↑ HD_SPLIT, SPLIT_AT_PAYLOAD, IS_LOOPBACK
Parent NBL 0000003b ChildRefCount 0n1104
→ Walk the NBL chain
→ Show out-of-band information
→ Dump the full data payload
Note that the NblFlags are bogus, so it’s possible that Flags are bogus too,
but since the extension didn’t complain I’m going to run with it. Knowing
nothing about any of this, the RETURNED flag seemed interesting because it
sounds sort of like it might be freed:
1: kd> !ndiskd.help RETURNED
FLAG
RETURNED
DESCRIPTION
This NBL is being returned to the miniport, or it has already been
returned
to the miniport.
Which might be suspicious. If I were to go further with this, I’d want to
look at some valid NBL structures at various states to see if this is what a
freed NBL actually looks like.
Have you checked the queue from which you removed this packet in your
driver? Are there other messed up NBLs on there or is this the only one?
-scott
–
Scott Noone
Consulting Associate and Chief System Problem Analyst
OSR Open Systems Resources, Inc.
http://www.osronline.com