https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b3a8f8611de4c8c6e3c71d...
commit b3a8f8611de4c8c6e3c71d3c54f0b5bc8ebe2a27 Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Sat Jul 23 12:42:20 2022 +0200 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Thu Aug 4 16:15:24 2022 +0200
[NTOS] Treat page faults with interrupts disabled as access violation --- ntoskrnl/ke/amd64/trap.S | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/ntoskrnl/ke/amd64/trap.S b/ntoskrnl/ke/amd64/trap.S index 0b4f0375af2..73470363a23 100644 --- a/ntoskrnl/ke/amd64/trap.S +++ b/ntoskrnl/ke/amd64/trap.S @@ -428,6 +428,10 @@ FUNC KiPageFault /* Save page fault address */ mov rdx, cr2 mov [rbp + KTRAP_FRAME_FaultAddress], rdx + + /* If interrupts are off, treat this as an access violation */ + test dword ptr [rbp + KTRAP_FRAME_EFlags], EFLAGS_IF_MASK + jz AccessViolation
/* Enable interrupts for the page fault handler */ sti