mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-28 19:26:16 +00:00
- Don't leak a handle if user mode tries to debug the system process
svn path=/trunk/; revision=36230
This commit is contained in:
@@ -1643,7 +1643,12 @@ NtDebugActiveProcess(IN HANDLE ProcessHandle,
|
||||
if (!NT_SUCCESS(Status)) return Status;
|
||||
|
||||
/* Don't allow debugging the initial system process */
|
||||
if (Process == PsInitialSystemProcess) return STATUS_ACCESS_DENIED;
|
||||
if (Process == PsInitialSystemProcess)
|
||||
{
|
||||
/* Dereference and fail */
|
||||
ObDereferenceObject(Process);
|
||||
return STATUS_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
/* Reference the debug object */
|
||||
Status = ObReferenceObjectByHandle(DebugHandle,
|
||||
|
||||
Reference in New Issue
Block a user