Fix a weird exploit when attaching to a process that overwrites its own OptionalHeader.SizeOfStackReserve

This commit is contained in:
Duncan Ogilvie 2020-04-10 03:56:08 +02:00
parent 451c85e465
commit 51ba022c29
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 2 additions and 2 deletions

View File

@ -172,7 +172,7 @@ static NTSTATUS CreateThreadSkipAttach(IN HANDLE ProcessHandle, IN PUSER_THREAD_
THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH, THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH,
0, 0,
0x4000 /* PAGE_SIZE * 4 */, 0x4000 /* PAGE_SIZE * 4 */,
0, 0x4000,
nullptr); nullptr);
} }
else else
@ -182,7 +182,7 @@ static NTSTATUS CreateThreadSkipAttach(IN HANDLE ProcessHandle, IN PUSER_THREAD_
NULL, NULL,
FALSE, FALSE,
0, 0,
0, 0x4000,
0x4000 /* PAGE_SIZE * 4 */, 0x4000 /* PAGE_SIZE * 4 */,
StartRoutine, StartRoutine,
Argument, Argument,