daynix / UsbDk

Usb Drivers Development Kit for Windows
Apache License 2.0
522 stars 142 forks source link

On device restart from UsbDeviceTreeView Hidden USB mass storage device are fully accessible #114

Open Sauron-S opened 1 year ago

Sauron-S commented 1 year ago

Steps to Repro: 1) Add rule to hide device 2) Plugin device matching to the rule. 3) Using usb device tree viewer from link https://www.uwe-sieber.de/usbtreeview_e.html 4) Hidden device will show up with name "RedHat Usbdk device". 'Restart device' through right click menu option. Hidden device will be fully accessible

Sauron-S commented 1 year ago

Issue can be reproduced using devcon tool with following steps: 1) First you can use: devcon Find USB* mostly the hidden device ID will be suffixed with USbdk 2) use enable/disable option or restart option of devcon . Hidden device will become fully accessible

For me Setting rawDeviceOk = 0 in device capabilities resolved the issue https://github.com/daynix/UsbDk/blob/af46b7ee3302413d2533c492fac2aa154cfd3d70/UsbDk/HiderStrategy.cpp#L231