https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6338d513537a6872ef64c…
commit 6338d513537a6872ef64cbe59b453a5e15d0dcc7
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sat Sep 14 09:15:51 2024 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Tue Jan 28 22:00:39 2025 +0100
[NTOS:EX] In NtSystemDebugControl, check for SeDebugPrivilege
---
ntoskrnl/ex/dbgctrl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ntoskrnl/ex/dbgctrl.c b/ntoskrnl/ex/dbgctrl.c
index dbb47793ee5..c6553324a80 100644
--- a/ntoskrnl/ex/dbgctrl.c
+++ b/ntoskrnl/ex/dbgctrl.c
@@ -218,6 +218,10 @@ NtSystemDebugControl(
ULONG Length = 0;
NTSTATUS Status;
+ /* Debugger controlling requires the debug privilege */
+ if (!SeSinglePrivilegeCheck(SeDebugPrivilege, PreviousMode))
+ return STATUS_ACCESS_DENIED;
+
_SEH2_TRY
{
if (PreviousMode != KernelMode)