[NTOS/SE]
authorJérôme Gardou <jerome.gardou@reactos.org>
Fri, 31 Oct 2014 11:03:56 +0000 (11:03 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Fri, 31 Oct 2014 11:03:56 +0000 (11:03 +0000)
 - Allocate the new ACL for the token with the right pool.
Fixes google chrome BAD_POOL_CALLER bugcheck.

svn path=/trunk/; revision=65139

reactos/ntoskrnl/se/token.c

index 1e56e9e..0473645 100644 (file)
@@ -1909,8 +1909,20 @@ NtSetInformationToken(IN HANDLE TokenHandle,
                                 ExFreePoolWithTag(Token->DefaultDacl, TAG_TOKEN_ACL);
                             }
 
-                            /* Set the new dacl */
-                            Token->DefaultDacl = CapturedAcl;
+                            Token->DefaultDacl = ExAllocatePoolWithTag(PagedPool,
+                                                                       CapturedAcl->AclSize,
+                                                                       TAG_TOKEN_ACL);
+                            if (!Token->DefaultDacl)
+                            {
+                                ExFreePoolWithTag(CapturedAcl, TAG_ACL);
+                                Status = STATUS_NO_MEMORY;
+                            }
+                            else
+                            {
+                                /* Set the new dacl */
+                                RtlCopyMemory(Token->DefaultDacl, CapturedAcl, CapturedAcl->AclSize);
+                                ExFreePoolWithTag(CapturedAcl, TAG_ACL);
+                            }
                         }
                     }
                     else