[all-commits] [llvm/llvm-project] bd1170: ASan: fix potential use-after-free in backtrace in...
Thurston Dang via All-commits
all-commits at lists.llvm.org
Sat May 13 16:22:05 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bd1170d2c371283447555bda6057f10e4cb0d25a
https://github.com/llvm/llvm-project/commit/bd1170d2c371283447555bda6057f10e4cb0d25a
Author: Thurston Dang <thurston at google.com>
Date: 2023-05-13 (Sat, 13 May 2023)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
M compiler-rt/test/asan/TestCases/backtrace_interceptor.cpp
Log Message:
-----------
ASan: fix potential use-after-free in backtrace interceptor
Various ASan interceptors may corrupt memory if passed a
pointer to freed memory (https://github.com/google/sanitizers/issues/321).
This patch fixes the issue for the backtrace interceptor,
by calling REAL(backtrace) with a known-good scratch buffer,
and performing an addressability check on the user-provided
buffer prior to writing to it.
Differential Revision: https://reviews.llvm.org/D150496
More information about the All-commits
mailing list