Checking if user dlopens shared library with RTLD_DEEPBIND flag is implemented in sanitizer_common_interceptors.inc, and HWASAN doesn't include sanitizer_common_interceptors.inc.
This patch adds dlopen interceptor and checks if dlopen is called with RTLD_DEEPBIND flag for HWASAN.
Details
- Reviewers
vitalybuka eugenis
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
How important this is now?
We are likely will need sanitizer_common_interceptors.inc. So I'd rather wait for that.
compiler-rt/lib/hwasan/hwasan_interceptors.cpp | ||
---|---|---|
227 | why do we need to exclude android? |
I'm fine with waiting for HWASAN includes sanitizer_common_interceptors.inc :)
compiler-rt/lib/hwasan/hwasan_interceptors.cpp | ||
---|---|---|
227 | In https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h#L438, I see SANITIZER_INTERCEPT_DLOPEN_DLCLOSE is ON for SI_LINUX_NOT_ANDROID. Am I miss something ? |
We are going to use D150708 to incrementally add interceptors
Thanks for pointing this, I'll abandon this patch.
why do we need to exclude android?
SANITIZER_INTERCEPT_DLOPEN_DLCLOSE is ON there for other sanitizers