hacksysteam / HackSysExtremeVulnerableDriver

HackSys Extreme Vulnerable Driver (HEVD) - Windows & Linux
https://hacksys.io
GNU General Public License v3.0
2.42k stars 525 forks source link

Add NULL check to error handling #15

Closed Fullmetal5 closed 7 years ago

Fullmetal5 commented 7 years ago

It is possible for IoCreateDevice to fail and leave DriverObject->DeviceObject as NULL which will cause a bug check when passed to IoDeleteDevice.

hacksysteam commented 7 years ago

if IoCreateDevice fails, it should not send STATUS_SUCCESS. And I have a check for it. Does it still crashes?

Fullmetal5 commented 7 years ago

Yea it still crashed, I was messing around and tried to set the DeviceName to an already existing name and got this crash.

Your check makes sense it's just that any ANY error in IoCreateDevice should leave DriverObject->DeviceObject as NULL and thus cause the crash.