[PATCH] D18915: [sanitizer] [SystemZ] Abort if the kernel might be vulnerable to CVE-2016-2143.

Marcin Koƛcielnicki via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 17:00:37 PDT 2016


koriakin created this revision.
koriakin added reviewers: uweigand, eugenis, rsmith, samsonov.
koriakin added a subscriber: llvm-commits.
koriakin set the repository for this revision to rL LLVM.
koriakin added a project: Sanitizers.

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.


Repository:
  rL LLVM

http://reviews.llvm.org/D18915

Files:
  lib/asan/asan_rtl.cc
  lib/msan/msan.cc
  lib/sanitizer_common/sanitizer_linux.cc
  lib/sanitizer_common/sanitizer_linux.h
  lib/tsan/rtl/tsan_platform_linux.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18915.53104.patch
Type: text/x-patch
Size: 5377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160409/ecf709e6/attachment.bin>


More information about the llvm-commits mailing list