[WIN32K] Deny deviceless calls to EngDeviceIoControl

This fixes BSOD happening in ntoskrnl coming from win32k under certain
conditions with 3rd party display drivers (such as VBox or VMware)
This commit is contained in:
Pierre Schweitzer 2018-12-31 20:33:59 +01:00
parent 5da008c338
commit 01b580d876
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -485,6 +485,11 @@ EngDeviceIoControl(
TRACE("EngDeviceIoControl() called\n");
if (!hDevice)
{
return ERROR_INVALID_HANDLE;
}
KeInitializeEvent(&Event, SynchronizationEvent, FALSE);
DeviceObject = (PDEVICE_OBJECT) hDevice;