Perform deepcopy in WdfDeviceInitAssignName
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 105
- Forks
- 34
- Avg merge
- 3d 39m
- Merged PRs (30d)
- 5
Description
Right now _WdfDeviceInitAssignName is holding on to the driver supplied name and saves it as device_name. However, the device_name buffer supplied to this routine may be freed after the call to _WdfDeviceInitAssignName (or subsequent call to _WdfDeviceCreate) since it's owned by the caller. A deep copy of the supplied device_name would mitigate this use-after-free issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at _WdfDeviceInitAssignName and inspect how the caller-supplied device_name is stored. Confirm that the stored device name remains valid after the caller frees its buffer, including after _WdfDeviceCreate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100