[compiler-rt] Intercept the uname() function
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 23 Mar 2020 19:46:20 +0000 (12:46 -0700)
committerVitaly Buka <vitalybuka@google.com>
Mon, 23 Mar 2020 19:59:38 +0000 (12:59 -0700)
commit5f5fb56c68e4830597a5b52d7a8edafea21566ac
tree9bbcdfa267bc748cc7b4a2c27eceb638b4fbee3b
parentcfaa84e1a679b2e2eb409eb57292f7caecb642d4
[compiler-rt] Intercept the uname() function

Summary:
Move interceptor from msan to sanitizer_common_interceptors.inc, so that
other sanitizers could benefit.

Adjust FixedCVE_2016_2143() to deal with the intercepted uname().

Patch by Ilya Leoshkevich.

Reviewers: eugenis, vitalybuka, uweigand, jonpa

Reviewed By: eugenis, vitalybuka

Subscribers: dberris, krytarowski, #sanitizers, stefansf, Andreas-Krebbel

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D76578
compiler-rt/lib/msan/msan_interceptors.cpp
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/lib/sanitizer_common/sanitizer_linux_s390.cpp
compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
compiler-rt/test/sanitizer_common/TestCases/Posix/uname.c [new file with mode: 0644]