[NTOSKRNL]

- Implement a special case copy-in for IRP_MN_FILTER_RESOURCE_REQUIREMENTS to prevent NULL pointer access in function drivers

svn path=/trunk/; revision=53304
This commit is contained in:
Cameron Gutman 2011-08-18 18:35:03 +00:00
parent 5a658d1d36
commit 5f13171411

View file

@ -885,6 +885,14 @@ IopSynchronousCall(IN PDEVICE_OBJECT DeviceObject,
Irp->IoStatus.Status = IoStatusBlock.Status = STATUS_NOT_SUPPORTED;
Irp->IoStatus.Information = IoStatusBlock.Information = 0;
/* Special case for IRP_MN_FILTER_RESOURCE_REQUIREMENTS */
if (IoStackLocation->MinorFunction == IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
{
/* Copy the resource requirements list into the IOSB */
Irp->IoStatus.Information =
IoStatusBlock.Information = (ULONG_PTR)IoStackLocation->Parameters.FilterResourceRequirements.IoResourceRequirementList;
}
/* Initialize the event */
KeInitializeEvent(&Event, SynchronizationEvent, FALSE);