Working with send and receive buffers in ndis filter driver

Hello Everyone.

In the FilterSendNetBufferList and FilterReceiveNetBufferList functions I clone the NBLs without the USE_ORIGINAL_MDL flag and completes that buffers normally. After, in xxxDeviceIoControl function I try to change the content of that buffers and send that NBLs to the Network Card(send buffers) or to the top level(receive buffers) with NDIS_RECEIVE_FLAG_RECEURCES flag.

With the receive path everything is working good, I can change the receive buffers, that pointed by newly created MDLs (NdisAllocateCloneNetBufferList);

But when I try to change send buffers (inside xxxDeviceIoControl function), windows crushes.

I can not debug crush file, becouse crash is happend when it was arbitrary thread and my driver is not in stack, when crash is happened. And the code of BSOD also different every time, so there is no point in sending these codes.

I tried a lot of things (for example probe and Lock that mdls, pointed by cloned net buffers and other thinks) but nothing helps. Why the buffers (pointed by cloned from send path of Ndis filter driver NBL) are unwritable, while the same buffers from receive path accept my changes and successfully achieve the protocol level.

Thank you very

And second question. What to use

NdisMoveMemory ( MmGetVirtualAddress ( pClonedNBReceive→MdlChain, …………..

or

NdisMoveMemory ( MmGetSystemAddressForMdlSafe ( pClonedNBReceive→MdlChain, …………..\

I know, that the second is system mapped virtual address and the first is Mdl,s virtual address but not system mapped.