diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2017-05-24 15:06:33 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2017-05-24 15:06:33 +0000 |
commit | b3d9ce6c036f6d2006efbd3282fd5806dc5dd15d (patch) | |
tree | 635136fc97aa850714e58f70a61c6d97fb1ad0f7 /lib/sanitizer_common/sanitizer_linux_s390.cc | |
parent | 397099e7e747869a3c85c6d5cc1c1d7947666fc6 (diff) | |
download | compiler-rt-b3d9ce6c036f6d2006efbd3282fd5806dc5dd15d.tar.gz |
[sanitizer] [SystemZ] Update CVE-2016-2143 check for Ubuntu 16.04
The Ubuntu 16.04 kernel contains a backport of the CVE check
starting with version 4.4.0-13. Update FixedCVE_2016_2143.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303757 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_linux_s390.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_linux_s390.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_linux_s390.cc b/lib/sanitizer_common/sanitizer_linux_s390.cc index c2b03b27e..a6da82ecb 100644 --- a/lib/sanitizer_common/sanitizer_linux_s390.cc +++ b/lib/sanitizer_common/sanitizer_linux_s390.cc @@ -178,6 +178,13 @@ static bool FixedCVE_2016_2143() { // 4.4.6+ is OK. if (minor == 4 && patch >= 6) return true; + if (minor == 4 && patch == 0 && ptr[0] == '-' && + internal_strstr(buf.version, "Ubuntu")) { + // Check Ubuntu 16.04 + int r1 = internal_simple_strtoll(ptr+1, &ptr, 10); + if (r1 >= 13) // 4.4.0-13 or later + return true; + } // Otherwise, OK if 4.5+. return minor >= 5; } else { |