Determining if Static Driver Verifier supports your driver or library

Static Driver Verifier (SDV) fully supports WDM, KMDF, NDIS, and Storport drivers and libraries, and has limited support for other drivers. To determine if your driver or library is supported and configured correctly, read over requirements described in this section.

Driver or library requirements

You can run the full set of rules in the SDV analysis tool if your driver or library meets one of following conditions and does not link to any of the class framework libraries listed below.

  • You have a WDM driver or library.
  • You have a driver or library that links to WdfLdr.lib or WdfDriverEntry.lib.
  • You have a driver or library that links to NDIS.lib.
  • You have a driver or library that links to Storport.lib.

If you have a driver that falls outside of the above conditions, SDV will consider the driver "generic" and run a limited set of checks.

In addition, please note that libraries verified by SDV must be kernel-mode driver libraries, not general C or C++ libraries.

Static Driver Verifier supports a driver or library that passes those conditions even if the driver or library links to multiple utility libraries.

In addition, to perform the analysis, SDV requires that:

  • The driver has declared at least one entry point Using Function Role Type Declarations.
  • The driver builds and links correctly (in Visual Studio using MSBuild).
  • If the driver or library uses KMDF, the driver or library uses KDMF version 1.7 or later.
  • If the driver or library uses NDIS, it uses NDIS version 6.0, 6.1, 6.20, 6.30, or 6.40. Note that this list is subject to change.
  • The driver does not combine driver models (for example, KMDF with WDM, or KMDF and NDIS).

There are other factors that affect the quality and accuracy of the static analysis results. These factors include:

  • Use of utility libraries that have not been processed by SDV.
  • Size of the driver, particularly if it has more than 100K lines of code.
  • Use of language-specific features, such as virtual functions and pointer arithmetic.

Visual Studio project requirements

To use Static Driver Verifier, the Visual Studio project must have the following settings:

  • UseDebugLibraries = false
  • Platform = Win32 (x86) or x64

Class framework libraries

If you have a WDM driver or library and want to run SDV, the driver or library must not link to one of the following class framework libraries.

1394bus.lib fltMgr.lib rdbss.lib usbrpm.lib
acpi.lib FsDepends.lib RNDISMP.lib videoprt.lib
armppm.lib fwpkclnt.lib RNDISMP6.lib vwififlt.lib
ataport.lib hidclass.lib RNDISMPX.lib watchdog.lib
ath_hwpci.lib hidparse.lib rpcxdr.lib win32k.lib
athhal.lib hwpolicy.lib Saha.lib winhv.lib
battc.lib ipmidrv_hrmcust.lib scsiport.lib WMBBCLASS.lib
BdaSup.lib irt30.lib smclib.lib
bdl.lib irt30.lib Soft1667FaultInjectionLimpetPool.lib
btampm.lib ks.lib SoftFCKernel.lib
bthport.lib ksecdd.lib SoftFCLimpetPool.lib
BTHPRINT.lib ksmartcpu.lib SoftSATAKernel.lib
classpnp.lib mcd.lib SoftStorageLimpetPool.lib
clfs.lib mpio.lib srvnet.lib
cng.lib mrxsmb.lib storvsp.lib
crashdmp.lib msnfsflt.lib stream.lib
csr_vfp_avdtp.lib msrpc.lib tape.lib
diskdump.lib mup.lib tbs.lib
drmk.lib ndistapi.lib tcpip.lib
dumpata.lib netio.lib tdi.lib
dumpfve.lib ntasn1k.lib termdd.lib
dxapi.lib parallel.lib USBCAMD.lib
dxg.lib pciidex.lib USBCAMD2.lib
dxgkrnl.lib portcls.lib usbd.lib
dxgmms1.lib protogon.lib usbport.lib

Utility libraries

Static Driver Verifier supports a driver or library that has links to multiple utility libraries if the driver or library conforms to the Driver or Library requirements.

File Name
BufferOverflowK.lib
hal.lib
ntoskrnl.lib
ntstrsafe.lib
rtlver.lib
sehupd.lib
wdm.lib
wmilib.lib
wdmsec.lib

Static Driver Verifier and Microsoft Class Framework libraries

If you are working with WDM drivers that must link to a class framework library in the Class framework libraries list the driver will fail the Static Driver Verifier condition. However, there are some generic rules that can still be used such as the NullCheck rule to perform some level of static verification.