https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9d2ecd3a13143609a30ac…
commit 9d2ecd3a13143609a30aca7480b195fa5f56df18
Author: Nguyen Trung Khanh <nguyentrungkhanh97(a)gmail.com>
AuthorDate: Mon Jul 27 07:39:48 2020 +0700
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Jul 27 03:39:48 2020 +0300
[NTOS:KE] Fix stack memory disclosure in KiInitializeUserApc (#2988)
---
ntoskrnl/ke/amd64/stubs.c | 2 +-
ntoskrnl/ke/arm/usercall.c | 2 +-
ntoskrnl/ke/i386/usercall.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ntoskrnl/ke/amd64/stubs.c b/ntoskrnl/ke/amd64/stubs.c
index 9f8ed16e0de..43117fe6868 100644
--- a/ntoskrnl/ke/amd64/stubs.c
+++ b/ntoskrnl/ke/amd64/stubs.c
@@ -207,7 +207,7 @@ KiInitializeUserApc(IN PKEXCEPTION_FRAME ExceptionFrame,
IN PVOID SystemArgument1,
IN PVOID SystemArgument2)
{
- CONTEXT Context;
+ CONTEXT Context = { 0 };
ULONG64 AlignedRsp, Stack;
EXCEPTION_RECORD SehExceptRecord;
diff --git a/ntoskrnl/ke/arm/usercall.c b/ntoskrnl/ke/arm/usercall.c
index 1895c2ce45f..c98ff55e0ad 100644
--- a/ntoskrnl/ke/arm/usercall.c
+++ b/ntoskrnl/ke/arm/usercall.c
@@ -270,7 +270,7 @@ KiInitializeUserApc(IN PKEXCEPTION_FRAME ExceptionFrame,
IN PVOID SystemArgument1,
IN PVOID SystemArgument2)
{
- CONTEXT Context;
+ CONTEXT Context = { 0 };
ULONG_PTR Stack;
ULONG ContextLength;
DPRINT1("User APC: %p %p %p\n", NormalContext, SystemArgument1,
SystemArgument2);
diff --git a/ntoskrnl/ke/i386/usercall.c b/ntoskrnl/ke/i386/usercall.c
index 8f59f7dc103..da99b0e1ce8 100644
--- a/ntoskrnl/ke/i386/usercall.c
+++ b/ntoskrnl/ke/i386/usercall.c
@@ -51,7 +51,7 @@ KiInitializeUserApc(IN PKEXCEPTION_FRAME ExceptionFrame,
IN PVOID SystemArgument1,
IN PVOID SystemArgument2)
{
- CONTEXT Context;
+ CONTEXT Context = { 0 };
ULONG_PTR Stack, AlignedEsp;
ULONG ContextLength;
EXCEPTION_RECORD SehExceptRecord;