This commit is contained in:
lhodges1 2023-10-05 19:21:36 +11:00
parent 9da18de49f
commit 199f5fe742
2 changed files with 6 additions and 5 deletions

View file

@ -48,6 +48,7 @@
#define KTHREAD_APC_STATE_OFFSET 0x258
#define KTHREAD_START_ADDRESS_OFFSET 0x450
#define KTHREAD_MISC_FLAGS_OFFSET 0x074
#define KTHREAD_WAIT_IRQL_OFFSET 0x186
#define KTHREAD_MISC_FLAGS_APC_QUEUEABLE 14

View file

@ -1133,11 +1133,6 @@ ValidateThreadViaKernelApcCallback(
if (current_thread == KeGetCurrentThread() || !current_thread)
goto increment;
apc = (PKAPC)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(KAPC), POOL_TAG_APC);
if (!apc)
goto increment;
/*
* Its possible to set the KThread->ApcQueueable flag to false ensuring that no APCs can be
* queued to the thread, as KeInsertQueueApc will check this flag before queueing an APC so
@ -1157,6 +1152,11 @@ ValidateThreadViaKernelApcCallback(
goto increment;
}
apc = (PKAPC)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(KAPC), POOL_TAG_APC);
if (!apc)
goto increment;
KeInitializeApc(
apc,
current_thread,