-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: add KMDF Sample Driver with pool leak to demonstrate Driver Verifier #27
Conversation
… docs, updated buffer length to use const
@wmmc88 Can you take a look at the dependency review pipeline here? |
Of the top of my head, the github dependency review action has several issues with AND and OR licenses, and evaluating them correctly. In the past, I've had to work around those issues. See comments in https://github.com/microsoft/windows-drivers-rs/blob/9d4ab1a1a8c14587e8354aaadfb83ea49beebc05/.github/workflows/github-dependency-review.yaml#L19 and https://github.com/microsoft/Windows-rust-driver-samples/blob/64c426eb7f21b9f46946084039e2b68be30f59bc/.github/workflows/github-dependency-review.yaml. I do believe there was some recent upstream change in the action. I'll see if i have some time to look into this later this week. |
@svasista-ms try cherry picking this commit onto your branch: wmmc88@871632d It looks like the accepted format for "allow-licenses" was changed to be a single string that's comma delimited. the yaml |
…ved wdf_object_context.rs, updated project name and README
…iver-samples into memory-leak-sample
…indows-rust-driver-samples into memory-leak-sample
The
pool_leak
sample KMDF driver contains an intentional error that demonstrates the capabilities and features of Driver Verifier and the Device Fundamental tests.The driver uses WDM ExAllocatePool2 API to allocate memory to its Device Context buffer and intentionally does not free this memory anywhere in the driver. Such driver behavior can lead to vulnerabilities in the system if not caught. By enabling the Driver Verifier on this driver, the pool leak violation can be caught and with an active KDNET session, the bug can be examined and analyzed further.
This PR adds the sample driver to the workspace with instructions in the project's README to build, deploy and test the driver. The sample also demonstrates the use of WDTF, TAEF and the Device Fundamental Tests to test a driver.