From 986bf4c407954cb95fa4260347e347cf9c4ad19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 25 Jun 2018 15:32:06 +0200 Subject: [PATCH] [NTOS:SE] In SepCreateClientSecurity(), fix the impersonation level value passed to the SeCopyClientToken() call. Caught while debugging, in the case the ImpersonationLevel value was uninitialized, due to the fact it was left untouched on purpose by PsReferenceEffectiveToken(). --- ntoskrnl/se/access.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/se/access.c b/ntoskrnl/se/access.c index 4d248395922..a4f5cb0ee67 100644 --- a/ntoskrnl/se/access.c +++ b/ntoskrnl/se/access.c @@ -225,8 +225,8 @@ SepCreateClientSecurity(IN PACCESS_TOKEN Token, /* Do not use direct access and make a copy */ ClientContext->DirectlyAccessClientToken = FALSE; Status = SeCopyClientToken(Token, - ImpersonationLevel, - 0, + ClientSecurityQos->ImpersonationLevel, + KernelMode, &NewToken); if (!NT_SUCCESS(Status)) return Status;