https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aa46e0f0a7471dc86ec91…
commit aa46e0f0a7471dc86ec9118fa0f83736dd9de420
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Fri Jan 31 11:30:50 2025 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Tue Feb 4 09:00:35 2025 +0200
[RTL/x64] Fix a bug in RtlpUnwindInternal
Check if the stack pointer is out of bounds, before trying to unwind a frame. This will not fix any crashes, but it prevents simple crashes from going into a recursive exception.
---
sdk/lib/rtl/amd64/unwind.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/sdk/lib/rtl/amd64/unwind.c b/sdk/lib/rtl/amd64/unwind.c
index 72393b9404b..3a438390cb6 100644
--- a/sdk/lib/rtl/amd64/unwind.c
+++ b/sdk/lib/rtl/amd64/unwind.c
@@ -649,6 +649,18 @@ Exit:
return NULL;
}
+static __inline
+BOOL
+RtlpIsStackPointerValid(
+ _In_ ULONG64 StackPointer,
+ _In_ ULONG64 LowLimit,
+ _In_ ULONG64 HighLimit)
+{
+ return (StackPointer >= LowLimit) &&
+ (StackPointer < HighLimit) &&
+ ((StackPointer & 7) == 0);
+}
+
/*!
\remark The implementation is based on the description in this blog: http://www.nynaeve.net/?p=106
@@ -699,6 +711,11 @@ RtlpUnwindInternal(
/* Start looping */
while (TRUE)
{
+ if (!RtlpIsStackPointerValid(UnwindContext.Rsp, StackLow, StackHigh))
+ {
+ return FALSE;
+ }
+
/* Lookup the FunctionEntry for the current RIP */
FunctionEntry = RtlLookupFunctionEntry(UnwindContext.Rip, &ImageBase, NULL);
if (FunctionEntry == NULL)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=97ea95c80cee668dd3a11…
commit 97ea95c80cee668dd3a1141146b90eae182483e4
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Mon Feb 3 17:04:02 2025 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Mon Feb 3 17:04:10 2025 +0100
[SDK:BUGCODES] Remove inaccurate description of CREATE_DELETE_LOCK_NOT_LOCKED
The description had nothing to do with CREATE_DELETE_LOCK_NOT_LOCKED,
but instead was for EMPTY_THREAD_REAPER_LIST. And even so, descriptions
for both of these BSOD codes have been removed in official MS Windows
2000 and beyond.
Regarding the Thread Ripper:
https://devblogs.microsoft.com/oldnewthing/20231031-00/?p=108944
---
sdk/include/reactos/mc/bugcodes.mc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/include/reactos/mc/bugcodes.mc b/sdk/include/reactos/mc/bugcodes.mc
index ec64c19b96a..ab7045d12f8 100644
--- a/sdk/include/reactos/mc/bugcodes.mc
+++ b/sdk/include/reactos/mc/bugcodes.mc
@@ -292,7 +292,7 @@ Severity=Success
Facility=System
SymbolicName=CREATE_DELETE_LOCK_NOT_LOCKED
Language=English
-The thread reaper was handed a thread to reap, but the thread's process'
+CREATE_DELETE_LOCK_NOT_LOCKED
.
MessageId=0x15