llvm-project/compiler-rt/lib/msan
Marcin Koscielnicki c8dda336bb [sanitizer] [SystemZ] Abort if the kernel might be vulnerable to CVE-2016-2143.
In short, CVE-2016-2143 will crash the machine if a process uses both >4TB
virtual addresses and fork().  ASan, TSan, and MSan will, by necessity, map
a sizable chunk of virtual address space, which is much larger than 4TB.
Even worse, sanitizers will always use fork() for llvm-symbolizer when a bug
is detected.  Disable all three by aborting on process initialization if
the running kernel version is not known to contain a fix.

Unfortunately, there's no reliable way to detect the fix without crashing
the kernel.  So, we rely on whitelisting - I've included a list of upstream
kernel versions that will work.  In case someone uses a distribution kernel
or applied the fix themselves, an override switch is also included.

Differential Revision: http://reviews.llvm.org/D18915

llvm-svn: 266297
2016-04-14 12:56:24 +00:00
..
tests [Compiler-rt][MSan]Fix shmat testcase: Pass SHMLBA-alligned address to shmat 2016-02-25 08:07:44 +00:00
.clang-format Tell clang-format that (most) sanitizers are written using Google style guide. 2015-11-19 22:11:10 +00:00
CMakeLists.txt [cmake] Address Samsonov's post-commit review of r262723 2016-03-05 10:01:04 +00:00
msan.cc [sanitizer] [SystemZ] Abort if the kernel might be vulnerable to CVE-2016-2143. 2016-04-14 12:56:24 +00:00
msan.h [MSan] Clear parameters shadow before invoking malloc/free hooks. 2016-01-20 19:56:04 +00:00
msan.syms.extra Export __ubsan_* symbols from MSan and TSan runtimes. 2015-04-28 01:20:34 +00:00
msan_allocator.cc New MSan mapping layout (compiler-rt part). 2015-10-08 21:35:34 +00:00
msan_allocator.h Revert "Apply modernize-use-default to compiler-rt." 2015-10-30 18:52:31 +00:00
msan_blacklist.txt [MSan] Add empty default blacklist for MSan 2013-05-21 13:55:56 +00:00
msan_chained_origin_depot.cc [compiler-rt] Apply modernize-use-nullptr fixes in sanitizers 2015-10-01 00:22:21 +00:00
msan_chained_origin_depot.h [msan] Make origin tracking fork-safe. 2014-09-04 10:36:14 +00:00
msan_flags.h [sanitizer] Flag parser rewrite. 2015-01-15 15:13:43 +00:00
msan_flags.inc [Sanitizers] Unify the semantics and usage of "exitcode" runtime flag across all sanitizers. 2015-08-21 20:49:37 +00:00
msan_interceptors.cc [sanitizer] Add memset, memmove, and memcpy to the common interceptors 2016-03-25 19:33:45 +00:00
msan_interface_internal.h [msan] Add __msan_copy_shadow interface function. 2015-10-12 23:20:24 +00:00
msan_linux.cc [compiler-rt] [msan] Unify aarch64 mapping 2015-10-29 13:04:19 +00:00
msan_new_delete.cc -Wdeprecated: Use noexcept rather than throw() where supported 2015-08-10 15:24:22 +00:00
msan_origin.h [msan] Fix MsanTest to pass in track_origins=2 mode. 2015-02-26 15:19:33 +00:00
msan_poisoning.cc [msan] Fix SetShadow for mappings at the end of the application address space 2015-06-25 20:47:59 +00:00
msan_poisoning.h [msan] Refactor shadow operations. 2015-01-21 16:42:30 +00:00
msan_report.cc [MSan] Endianness should not matter while printing a byte 2016-02-26 06:44:10 +00:00
msan_thread.cc [asan] Fix SanitizerCommon.PthreadDestructorIterations test on Android L. 2015-06-29 20:28:55 +00:00
msan_thread.h [compiler-rt] Apply modernize-use-nullptr fixes in sanitizers 2015-10-01 00:22:21 +00:00