[compiler-rt] r303757 - [sanitizer] [SystemZ] Update CVE-2016-2143 check for Ubuntu 16.04

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 08:06:33 PDT 2017


Author: uweigand
Date: Wed May 24 10:06:33 2017
New Revision: 303757

URL: http://llvm.org/viewvc/llvm-project?rev=303757&view=rev
Log:
[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.


Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_s390.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_s390.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_s390.cc?rev=303757&r1=303756&r2=303757&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_s390.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_s390.cc Wed May 24 10:06:33 2017
@@ -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 {




More information about the llvm-commits mailing list