[all-commits] [llvm/llvm-project] 32bada: [lsan] Fix stack buffer overwrite in SuspendedThre...
Kuba (Brecka) Mracek via All-commits
all-commits at lists.llvm.org
Sat Nov 12 10:18:27 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 32bada2edaf8a6ecb515925dda5e736783f5d8eb
https://github.com/llvm/llvm-project/commit/32bada2edaf8a6ecb515925dda5e736783f5d8eb
Author: Kuba Mracek <mracek at apple.com>
Date: 2022-11-12 (Sat, 12 Nov 2022)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cpp
Log Message:
-----------
[lsan] Fix stack buffer overwrite in SuspendedThreadsListMac::GetRegistersAndSP
The call to the thread_get_state syscall (that fetches the register values for a thread) on arm64 is mistakenly claiming that the buffer to receive the register state is larger that its actual size on the stack -- the struct on the stack is arm_thread_state64_t, but the MACHINE_THREAD_STATE + MACHINE_THREAD_STATE_COUNT refer to the "unified arm state" struct (which is larger).
Fixes https://github.com/llvm/llvm-project/issues/58503.
Differential Revision: https://reviews.llvm.org/D137292
More information about the All-commits
mailing list