[NTOS:WMI] WMIP_GUID_OBJECT must start with an event object, as it is waitable.

The initializer for WmipGuidObjectType does not set UseDefaultObject,
and it's possible for user mode to obtain a handle to a GUID object
with SYNCHRONIZE access. Therefore that handle can be passed to
NtWaitForSingleObject, which means it must start with a DISPATCHER_HEADER.
This commit is contained in:
Thomas Faber 2020-01-28 19:52:55 +01:00
parent 7075bdacb2
commit 5e891f727f
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
2 changed files with 2 additions and 0 deletions

View file

@ -204,6 +204,7 @@ WmipCreateGuidObject(
}
RtlZeroMemory(GuidObject, sizeof(*GuidObject));
KeInitializeEvent(&GuidObject->Event, NotificationEvent, FALSE);
GuidObject->Guid = *Guid;
*OutGuidObject = GuidObject;

View file

@ -12,6 +12,7 @@ typedef struct _WMIP_IRP_CONTEXT
typedef struct _WMIP_GUID_OBJECT
{
KEVENT Event;
GUID Guid;
PIRP Irp;
LIST_ENTRY IrpLink;