47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
2017-02-08 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
PR sanitizer/79341
|
|
* sanitizer_common/sanitizer_linux_s390.cc (FixedCVE_2016_2143):
|
|
Whiltelist fixed RHEL6 and RHEL7 kernels.
|
|
|
|
--- libsanitizer/sanitizer_common/sanitizer_linux_s390.cc 2016-11-09 15:22:41.917353799 +0100
|
|
+++ libsanitizer/sanitizer_common/sanitizer_linux_s390.cc 2017-02-08 15:36:44.335857387 +0100
|
|
@@ -134,6 +134,18 @@ static bool FixedCVE_2016_2143() {
|
|
if (ptr[0] == '.')
|
|
patch = internal_simple_strtoll(ptr+1, &ptr, 10);
|
|
if (major < 3) {
|
|
+ if (major == 2 && minor == 6 && patch == 32 && ptr[0] == '-'
|
|
+ && internal_strstr(ptr, ".el6")) {
|
|
+ // Check RHEL6
|
|
+ int r1 = internal_simple_strtoll(ptr+1, &ptr, 10);
|
|
+ if (r1 >= 657) // 2.6.32-657.el6 or later
|
|
+ return true;
|
|
+ if (r1 == 642 && ptr[0] == '.') {
|
|
+ int r2 = internal_simple_strtoll(ptr+1, &ptr, 10);
|
|
+ if (r2 >= 9) // 2.6.32-642.9.1.el6 or later
|
|
+ return true;
|
|
+ }
|
|
+ }
|
|
// <3.0 is bad.
|
|
return false;
|
|
} else if (major == 3) {
|
|
@@ -143,6 +155,18 @@ static bool FixedCVE_2016_2143() {
|
|
// 3.12.58+ is OK.
|
|
if (minor == 12 && patch >= 58)
|
|
return true;
|
|
+ if (minor == 10 && patch == 0 && ptr[0] == '-'
|
|
+ && internal_strstr(ptr, ".el7")) {
|
|
+ // Check RHEL7
|
|
+ int r1 = internal_simple_strtoll(ptr+1, &ptr, 10);
|
|
+ if (r1 >= 426) // 3.10.0-426.el7 or later
|
|
+ return true;
|
|
+ if (r1 == 327 && ptr[0] == '.') {
|
|
+ int r2 = internal_simple_strtoll(ptr+1, &ptr, 10);
|
|
+ if (r2 >= 27) // 3.10.0-327.27.1.el7 or later
|
|
+ return true;
|
|
+ }
|
|
+ }
|
|
// Otherwise, bad.
|
|
return false;
|
|
} else if (major == 4) {
|