[NTOS:SE] Fix SeSetSecurityDescriptorInfoEx to prevent pool corruption on x64

This commit is contained in:
Timo Kreuzer 2018-02-04 20:07:17 +01:00
parent d559ca9c98
commit 6c154c0625

View file

@ -916,13 +916,9 @@ SeSetSecurityDescriptorInfoEx(
return STATUS_INSUFFICIENT_RESOURCES; return STATUS_INSUFFICIENT_RESOURCES;
} }
RtlCreateSecurityDescriptor(NewSd, RtlCreateSecurityDescriptorRelative(NewSd, SECURITY_DESCRIPTOR_REVISION1);
SECURITY_DESCRIPTOR_REVISION1);
/* We always build a self-relative descriptor */ Current = sizeof(SECURITY_DESCRIPTOR_RELATIVE);
NewSd->Control = Control | SE_SELF_RELATIVE;
Current = sizeof(SECURITY_DESCRIPTOR);
if (OwnerLength != 0) if (OwnerLength != 0)
{ {