From ff0a32511667a0e704a8d58121a9a2baa128ddda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Bi=C8=99oc?= Date: Sat, 3 Jul 2021 18:20:43 +0200 Subject: [PATCH] [NTOS:SE] Allocate pool memory for security descriptor based on the caller pool type request We're indiscriminately allocate the pool as non paged all the time, thus further ignoring the pool type parameter of the function. --- ntoskrnl/se/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntoskrnl/se/sd.c b/ntoskrnl/se/sd.c index 8ede6fbf4ea..7ab6ee9d2bd 100644 --- a/ntoskrnl/se/sd.c +++ b/ntoskrnl/se/sd.c @@ -920,7 +920,7 @@ SeSetSecurityDescriptorInfoEx( } SaclLength = Sacl ? ROUND_UP((ULONG)Sacl->AclSize, 4) : 0; - NewSd = ExAllocatePoolWithTag(NonPagedPool, + NewSd = ExAllocatePoolWithTag(PoolType, sizeof(SECURITY_DESCRIPTOR_RELATIVE) + OwnerLength + GroupLength + DaclLength + SaclLength,