nefarius / HidHide

Gaming Input Peripherals Device Firewall for Windows.
https://docs.nefarius.at/projects/HidHide/
MIT License
939 stars 80 forks source link

Can't open HidHide Configuration at all. Crash on line 91 of the file "FilterDriverProxy.cpp". #83

Closed FireLion137 closed 1 year ago

FireLion137 commented 2 years ago

Bug description

Simply i can't open HidHide, i tried different versions but i always get the same error: "Something unforseen has happened which cannot be recovered from. Program execution has to be terminated. Sorry for the inconvenience." I understand that's a problem that only I have, but i dont know ho to resolve it.

Steps to reproduce

Actual result: "Something unforseen has happened which cannot be recovered from. Program execution has to be terminated. Sorry for the inconvenience." Expected result: It should open normally.

Machine info

CPU-Architecture: x64 AMD Ryzen 5 2600x Windows version: Windows 10 21H2 Software/driver version(s): 1.1.50 - 1.2.98

Any other helpful information

I don't know much about programming and this sort of stuff, only basics, but i tried debugging with Visual Studio 2019 and i can tell that the Debug of HidHideClient crash after a breakpoint on line 91 of the file "FilterDriverProxy.cpp". Line 91: if (FALSE == ::DeviceIoControl(device, IOCTL_GET_WHITELIST, nullptr, 0, buffer.data(), static_cast(buffer.size() * sizeof(WCHAR)), &needed, nullptr)) THROW_WIN32_LAST_ERROR;

nefarius commented 2 years ago

We figured it out on Discord; this can happen if the whitelist (and probably also the blacklist) has grown so much that a buffer overflow happens. In this case it happened because a 3rd party application did an insert every time it was launched instead of checking if it was already on the list. To circumvent those, the driver should ideally check the list entries for duplicates before storing them. Leaving this open as a reminder for when there's time to implement this some time in 2023 😅

nefarius commented 1 year ago

Not really fixable.