diff --git a/ntoskrnl/ob/obhandle.c b/ntoskrnl/ob/obhandle.c index 057cdecd7ff..38171d2f16b 100644 --- a/ntoskrnl/ob/obhandle.c +++ b/ntoskrnl/ob/obhandle.c @@ -2443,6 +2443,12 @@ ObDuplicateObject(IN PEPROCESS SourceProcess, return Status; } + if (NewHandleEntry.ObAttributes & OBJ_PROTECT_CLOSE) + { + NewHandleEntry.ObAttributes &= ~OBJ_PROTECT_CLOSE; + NewHandleEntry.GrantedAccess |= ObpAccessProtectCloseBit; + } + /* Now create the handle */ NewHandle = ExCreateHandle(HandleTable, &NewHandleEntry); if (!NewHandle)