llvm-project/compiler-rt/lib/hwasan
Mitch Phillips fd51ab6341 [hwasan] Don't report short-granule shadow as overwritten.
The shadow for a short granule is stored in the last byte of the
granule. Currently, if there's a tail-overwrite report (a
buffer-overflow-write in uninstrumented code), we report the shadow byte
as a mismatch against the magic.

Fix this bug by slapping the shadow into the expected value. This also
makes sure that if the uninstrumented WRITE does clobber the shadow
byte, it reports the shadow was actually clobbered as well.

Reviewed By: eugenis, fmayer

Differential Revision: https://reviews.llvm.org/D107938
2021-08-18 11:25:57 -07:00
..
scripts hwasan_symbolize: allow 0x in the address field 2020-02-03 18:23:48 -08:00
.clang-format Revert "sanitizers: increase .clang-format columns to 100" 2021-07-28 09:40:21 +02:00
CMakeLists.txt sanitizer_common: enable format string checking 2021-08-13 13:44:52 +02:00
hwasan.cpp [hwasan] Support malloc in atfork. 2021-08-17 15:29:49 -07:00
hwasan.h [hwasan] Support malloc in atfork. 2021-08-17 15:29:49 -07:00
hwasan.syms.extra
hwasan_allocation_functions.cpp [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface 2021-07-30 11:37:19 -07:00
hwasan_allocator.cpp [hwasan] Don't report short-granule shadow as overwritten. 2021-08-18 11:25:57 -07:00
hwasan_allocator.h [compiler-rt][hwasan] Add GetShadowOffset function 2021-06-15 10:46:11 -07:00
hwasan_checks.h [HWASan] Refactor in preparation for x86 aliasing mode. NFC 2021-03-23 13:25:10 -07:00
hwasan_dynamic_shadow.cpp [compiler-rt][hwasan][Fuchsia] Do not emit FindDynamicShadowStart for Fuchsia 2021-07-27 15:47:11 -07:00
hwasan_dynamic_shadow.h
hwasan_exceptions.cpp hwasan: Add missing SANITIZER_INTERFACE_ATTRIBUTE on __hwasan_personality_wrapper. 2019-10-18 22:51:38 +00:00
hwasan_flags.h [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan_flags.inc [NFC] Remove tab from the source 2021-02-26 19:40:24 -08:00
hwasan_fuchsia.cpp [hwasan] Support malloc in atfork. 2021-08-17 15:29:49 -07:00
hwasan_globals.cpp [HWASan] Add sizeof(global) in report even if symbols missing. 2020-06-09 13:02:13 -07:00
hwasan_globals.h [HWASan] Add sizeof(global) in report even if symbols missing. 2020-06-09 13:02:13 -07:00
hwasan_ignorelist.txt [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
hwasan_interceptors.cpp [hwasan] Support malloc in atfork. 2021-08-17 15:29:49 -07:00
hwasan_interceptors_vfork.S [compiler-rt][aarch64] Add PAC-RET/BTI property to hwasan_interceptors_vfork.S 2021-04-12 17:17:33 -07:00
hwasan_interface_internal.h [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface 2021-07-30 11:37:19 -07:00
hwasan_linux.cpp [hwasan] Support malloc in atfork. 2021-08-17 15:29:49 -07:00
hwasan_malloc_bisect.h [compiler-rt] [hwasan] Replace INLINE with inline 2020-09-17 16:46:32 +02:00
hwasan_mapping.h [compiler-rt][hwasan] Refactor kAliasRegionStart usage 2021-07-12 16:33:05 -07:00
hwasan_memintrinsics.cpp [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan_new_delete.cpp [compiler-rt][hwasan]: undefine new/delete operators with alignment on Android. 2021-06-17 09:28:12 -07:00
hwasan_poisoning.cpp [NFC][compiler-rt][hwasan] Move TagMemoryAligned into hwasan_linux.cpp 2021-07-09 11:02:44 -07:00
hwasan_poisoning.h
hwasan_report.cpp [hwasan] Don't report short-granule shadow as overwritten. 2021-08-18 11:25:57 -07:00
hwasan_report.h hwasan: Improve precision of checks using short granule tags. 2019-07-09 20:22:36 +00:00
hwasan_setjmp.S [compiler-rt][aarch64] Add PAC-RET/BTI support to HWASAN. 2021-04-12 17:02:45 +02:00
hwasan_tag_mismatch_aarch64.S [compiler-rt][aarch64] Add PAC-RET/BTI support to HWASAN. 2021-04-12 17:02:45 +02:00
hwasan_thread.cpp hwasan: Move stack ring buffer initialization before InitStackAndTls. 2021-08-17 10:18:07 -07:00
hwasan_thread.h [compiler-rt][hwasan] Add InitState options to thread initialization 2021-06-23 11:42:14 -07:00
hwasan_thread_list.cpp [NFC] test commit, fix namespace ending comment. 2021-06-17 11:18:36 +01:00
hwasan_thread_list.h [NFC][compiler-rt][hwasan] Re-use ring buffer size calculation 2021-06-29 11:57:33 -07:00
hwasan_type_test.cpp [compiler-rt] libhwasan interceptor ABI intercept longjmp/setjmp 2019-10-30 14:04:40 +00:00