-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending packets while Bluetooth tethering results in BSoD INVALID_MDL_RANGE #708
Comments
Remaining questions:
CC @jtippet if you have any insight here |
Thanks for the heads-up. I reviewed the bthpan.sys implementation and found a code bug, which I have reported internally to the Bluetooth team (internal-only reference: task.ms/16593126 ). The issue is that bthpan is incorrectly using the mapped kernel VA in its call to IoBuildPartialMdl, and not the MDL's original VA. If the MDL is created in kernel mode (e.g. MmBuildMdlForNonPagedPool), these VAs are identical, so the mixup does not cause any symptoms. But in the case of npcap, it is mapping the MDL from usermode, so the VAs are different, and IoBuildPartialMdl blows up. If you need to work around this, you can either:
I'll address your specific questions, although they're potentially obsolete now.
|
@jtippet Thanks so much for looking into this! We will try to work around the issue by using separate MDLs for Ethernet header and payload when the adapter has |
As a general rule, network drivers almost never deal in uVAs, so it's much more common to use |
Appears to not be limited to Npcap: found reports online of similar crashes in bthpan.sys due to WinPcap, SIEMENS S7 discovery driver, and others.
Surprisingly, the bugcheck text does not describe the crash conditions:
VirtualAddress + Length
is equal toSourceMDL->MappedSystemVa + SourceMDL->ByteCount
, so the address range is within the range of the source MDL. The bthpan.sys driver appears to be trying to map the frame payload by skipping the 14 bytes of Ethernet frame header.The text was updated successfully, but these errors were encountered: