[NTOSKRNL] On open, verify and validate the hint device object if any

This commit is contained in:
Pierre Schweitzer 2018-10-05 10:49:11 +02:00
parent 779d87b483
commit 0b713d4fa0
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -673,10 +673,16 @@ IopParseDevice(IN PVOID ParseObject,
}
}
/* If we have a top level device hint, verify it */
if (OpenPacket->InternalFlags & IOP_USE_TOP_LEVEL_DEVICE_HINT)
{
// FIXME: Verify our device object is good to use
ASSERT(DirectOpen == FALSE);
Status = IopCheckTopDeviceHint(&DeviceObject, OpenPacket, DirectOpen);
if (!NT_SUCCESS(Status))
{
IopDereferenceDeviceObject(OriginalDeviceObject, FALSE);
if (Vpb) IopDereferenceVpbAndFree(Vpb);
return Status;
}
}
/* If we traversed a mount point, reset the information */