51 ULONG ObjectTypeIndex;
59 DPRINT1(
"The object type list is too big, integer overflow alert!\n");
69 for (ObjectTypeIndex = 0;
70 ObjectTypeIndex < ObjectTypeListLength;
74 Level = ObjectTypeList[ObjectTypeIndex].Level;
77 DPRINT1(
"Invalid object level found (level %u, at index %lu)\n",
Level, ObjectTypeIndex);
82 if (ObjectTypeIndex != 0)
87 DPRINT1(
"This list has two roots (at index %lu)\n", ObjectTypeIndex);
99 if (
Level > PrevLevel + 1)
101 DPRINT1(
"The object levels are not consistent (current level %u, previous level %u, at index %lu)\n",
102 Level, PrevLevel, ObjectTypeIndex);
111 DPRINT1(
"The object is not the root at first index!\n");
117 ObjectTypeGuid = ObjectTypeList[ObjectTypeIndex].ObjectType;
194 return ObjectTypeGuid;
229 ULONG ObjectTypeIndex;
230 GUID ObjectTypeGuidToSearch;
235 for (ObjectTypeIndex = 0;
236 ObjectTypeIndex < ObjectTypeListLength;
240 ObjectTypeGuidToSearch = ObjectTypeList[ObjectTypeIndex].ObjectTypeGuid;
244 *ObjectIndex = ObjectTypeIndex;
289 ULONG ObjectTypeIndex;
291 PGUID ObjectTypeGuid;
303 if (ObjectTypeListLength == 0)
305 *CapturedObjectTypeList =
NULL;
310 if (ObjectTypeList ==
NULL)
312 DPRINT1(
"The caller did not provide a list of object types!\n");
320 DPRINT1(
"SepValidateObjectTypeList failed (Status 0x%08lx)\n",
Status);
327 if (InternalTypeList ==
NULL)
329 DPRINT1(
"Failed to allocate pool memory for the object type list!\n");
336 for (ObjectTypeIndex = 0;
337 ObjectTypeIndex < ObjectTypeListLength;
341 ObjectTypeGuid = ObjectTypeList[ObjectTypeIndex].ObjectType;
342 InternalTypeList[ObjectTypeIndex].
ObjectTypeGuid = *ObjectTypeGuid;
345 InternalTypeList[ObjectTypeIndex].
Level = ObjectTypeList[ObjectTypeIndex].Level;
354 *CapturedObjectTypeList = InternalTypeList;
359 InternalTypeList =
NULL;
#define NT_SUCCESS(StatCode)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define RtlCompareMemory(s1, s2, l)
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
#define EXCEPTION_EXECUTE_HANDLER
#define ExFreePoolWithTag(_P, _T)
struct _ACCESS_ALLOWED_OBJECT_ACE * PACCESS_ALLOWED_OBJECT_ACE
#define _In_reads_opt_(size)
struct _OBJECT_TYPE_LIST_INTERNAL OBJECT_TYPE_LIST_INTERNAL
#define STATUS_NOT_IMPLEMENTED
PGUID SepGetObjectTypeGuidFromAce(_In_ PACE Ace, _In_ BOOLEAN IsAceDenied)
Captures an object type GUID from an object access control entry (ACE).
VOID SeReleaseObjectTypeList(_In_ _Post_invalid_ POBJECT_TYPE_LIST_INTERNAL CapturedObjectTypeList, _In_ KPROCESSOR_MODE PreviousMode)
Releases a buffer list of object types.
static NTSTATUS SepValidateObjectTypeList(_In_reads_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList, _In_ ULONG ObjectTypeListLength)
Validates a list of object types passed from user mode, ensuring the following conditions are met for...
NTSTATUS SeCaptureObjectTypeList(_In_reads_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList, _In_ ULONG ObjectTypeListLength, _In_ KPROCESSOR_MODE PreviousMode, _Out_ POBJECT_TYPE_LIST_INTERNAL *CapturedObjectTypeList)
Captures a list of object types and converts it to an internal form for use by the kernel....
static BOOLEAN SepIsEqualObjectTypeGuid(_In_ CONST GUID *Guid1, _In_ CONST GUID *Guid2)
Compares two object type GUIDs for equality.
BOOLEAN SepObjectTypeGuidInList(_In_reads_(ObjectTypeListLength) POBJECT_TYPE_LIST_INTERNAL ObjectTypeList, _In_ ULONG ObjectTypeListLength, _In_ PGUID ObjectTypeGuid, _Out_ PULONG ObjectIndex)
Searches for an object type GUID if it exists on an object type list.
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_YIELD(__stmt)
ACCESS_MASK RemainingAccessRights
ACCESS_MASK DeniedAccessRights
ACCESS_MASK GrantedAccessRights
ACCESS_CHECK_RIGHTS ObjectAccessRights
#define STATUS_INVALID_PARAMETER
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
_In_ KPROCESSOR_MODE PreviousMode
struct _OBJECT_TYPE_LIST OBJECT_TYPE_LIST
#define ACCESS_OBJECT_GUID