Hello everyone,
Just want to share some feedback I have regarding third party drivers I met
sometimes during my tests. Interesting to know, is it only happening to me ?
Or you also saw something simular when dealing with them?
Before releasing my code I always do heavy stress testing with
antiviruses/fws and I set verifier to verify mine and av/fw driver with
maximum checks. Mine driver is a typical TDI filter with some additional
functionality (I set PsLoadImageNotify callbacks to track process creation
events). (please, no need to point that TDI is depricated, I know that, I am
already taking care of it. This is not the purpose of this post)
So, testing with firewalls I always get BSODs with McAfee, Trend Micro (with
Trend Micro I have less problems, though) in their TDI filters. Even if I do
tests on clean machine (i.e., clean install of XP or Vista and there is NO
my driver) McAfee BSOD’s with pool corruption assert within 10 minutes of
stress testing.
(I was also troubleshooting issues with Juniper VPN client which is btw a
TDI filter. You enable verifier, run it, and you got immidiate BSOD. IIRC it
was related to not marking IRP pending, or something simular.)
Mine stress test tools are simple: create a lot of processes and make a lot
of connections, and it just dies :). I’ve sent request to McAfee about this
problem, but they never actually resolved it. But this is not the point, I
am interested to know your opinion about quality of those guys.
Today I was experimenting with my VmWare Workstation at home in Windows 7
x64 and I got a BSOD when doing verification of vmx86.sys driver. The test
case is very simple:
-
Fire verifier and set maximum checks for vmx86.sys
-
Reboot
-
Start any x86 virtual machine, and voila, you have the following:
DRIVER_VERIFIER_DETECTED_VIOLATION (c4)
A device driver attempting to corrupt the system has been caught. This is
because the driver was specified in the registry as being suspect (by the
administrator) and the kernel has enabled substantial checking of this
driver.
If the driver attempts to corrupt the system, bugchecks 0xC4, 0xC1 and 0xA
will
be among the most commonly seen crashes.
Arguments:
Arg1: 00000000000000f6, Referencing user handle as KernelMode.
Arg2: 00000000000002e0, Handle value being referenced.
Arg3: fffffa8005b9fb30, Address of the current process.
Arg4: fffff880062da398, Address inside the driver that is performing the
incorrect reference.
Debugging Details:
BUGCHECK_STR: 0xc4_f6
CUSTOMER_CRASH_COUNT: 1
DEFAULT_BUCKET_ID: VERIFIER_ENABLED_VISTA_MINIDUMP
PROCESS_NAME: vmware-vmx.exe
CURRENT_IRQL: 0
LAST_CONTROL_TRANSFER: from fffff800035493dc to fffff800030bf740
STACK_TEXT:
fffff88007953f48 fffff800035493dc : 00000000000000c4 00000000000000f6
00000000000002e0 fffffa8005b9fb30 : nt!KeBugCheckEx
fffff88007953f50 fffff8000355eae4 : 00000000000002e0 fffffa8005b9fb30
0000000000000007 fffff78000001000 : nt!VerifierBugCheckIfAppropriate+0x3c
fffff88007953f90 fffff8000331ab40 : fffff6fc00019ae8 fffff880079541f0
fffffa8004619500 fffffa800c0a2cc8 : nt!VfCheckUserHandle+0x1b4
fffff88007954070 fffff800033b8ab5 : 0000000000000000 0000000000000000
0000000000000000 0000007fffffff00 : nt! ?? ::NNGAKEGL::string'+0x20e2e fffff88007954140 fffff800033bde4d : fffffa800c0a2b10 fffff880079542a0 fffff6fb00000040 fffffa8004619510 : nt!ObpLookupObjectName+0x1b5 fffff88007954240 fffff8000335d654 : fffff880079544c8 0000000000000000 fffff88007954300 fffff800030bd93d : nt!ObOpenObjectByName+0x1cd fffff880079542f0 fffff8000335d72e : fffff88007954760 fffff880000f003f fffff88007954780 fffff8000335d700 : nt!CmCreateKey+0x2e1 fffff88007954460 fffff800030be993 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : nt!NtCreateKey+0x2e fffff880079544b0 fffff800030baf30 : fffff8000354fb49 fffff88007954780 fffff880079548a0 0000000000261b00 : nt!KiSystemServiceCopyEnd+0x13 fffff880079546b8 fffff8000354fb49 : fffff88007954780 fffff880079548a0 0000000000261b00 fffff880062e5590 : nt!KiServiceLinkage fffff880079546c0 fffff880062da398 : 0000000000000000 fffff880062e5590 0000000000261b00 fffff880079548a0 : nt!VfZwCreateKey+0x99 fffff88007954720 0000000000000000 : fffff880062e5590 0000000000261b00 fffff880079548a0 00000000`00000000 : vmx86+0x3398
STACK_COMMAND: kb
FOLLOWUP_IP:
vmx86+3398
fffff880`062da398 413bc4 cmp eax,r12d
SYMBOL_STACK_INDEX: b
SYMBOL_NAME: vmx86+3398
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: vmx86
IMAGE_NAME: vmx86.sys
DEBUG_FLR_IMAGE_TIMESTAMP: 4a85fa8c
FAILURE_BUCKET_ID: X64_0xc4_f6_VRF_vmx86+3398
BUCKET_ID: X64_0xc4_f6_VRF_vmx86+3398
Followup: MachineOwner
This is not the first bug check I have, I also had something related to
memory corruption.
Is it a fault of verifier? I doubt. On the other hand, these companies
(McAfee, VmWare, Juniper) earn millions and spend millions on R&D teams, how
is it possible that they just never do Driver Verifier tests? (At least) …
Hope to hear some feedback on this : )
–
Volodymyr