summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Mangeac <Adrian.Mangeac@enea.com>2018-09-26 13:50:42 +0200
committerAdrian Mangeac <Adrian.Mangeac@enea.com>2018-09-27 12:59:41 +0200
commit27753e6e297fc6f17490cf700f4da10d0df1855e (patch)
tree8c5f0e6329cb362c5edfae7dfa217beb35f9e04a
parent3efb0bdd5c79f5dcb21495e9b444721603ae93f0 (diff)
downloadmeta-el-common-sumo.tar.gz
glibc_2.27: Fix for CVE-2018-11237sumo
Reference: https://nvd.nist.gov/vuln/detail/CVE-2018-11237 Change-Id: I703ff10f4c95d85eb183ee791d7be2a450353616 Signed-off-by: Adrian Mangeac <Adrian.Mangeac@enea.com>
-rw-r--r--recipes-core/glibc/glibc/CVE-2018-11237.patch74
-rw-r--r--recipes-core/glibc/glibc_2.27.bbappend6
2 files changed, 80 insertions, 0 deletions
diff --git a/recipes-core/glibc/glibc/CVE-2018-11237.patch b/recipes-core/glibc/glibc/CVE-2018-11237.patch
new file mode 100644
index 0000000..41bd002
--- /dev/null
+++ b/recipes-core/glibc/glibc/CVE-2018-11237.patch
@@ -0,0 +1,74 @@
1From 9aaaab7c6e4176e61c59b0a63c6ba906d875dc0e Mon Sep 17 00:00:00 2001
2From: Andreas Schwab <schwab@suse.de>
3Date: Tue, 22 May 2018 10:37:59 +0200
4Subject: [PATCH] Don't write beyond destination in
5 __mempcpy_avx512_no_vzeroupper (bug 23196)
6
7When compiled as mempcpy, the return value is the end of the destination
8buffer, thus it cannot be used to refer to the start of it.
9
10CVE: CVE-2018-11237
11Upstream-Status: Backport
12
13Signed-off-by: Adrian Mangeac <Adrian.Mangeac@enea.com>
14---
15 ChangeLog | 9 +++++++++
16 string/test-mempcpy.c | 1 +
17 sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S | 5 +++--
18 3 files changed, 13 insertions(+), 2 deletions(-)
19
20diff --git a/ChangeLog b/ChangeLog
21index 252b099..8032adf 100644
22--- a/ChangeLog
23+++ b/ChangeLog
24@@ -1,3 +1,12 @@
25+2018-05-23 Andreas Schwab <schwab@suse.de>
26+
27+ [BZ #23196]
28+ CVE-2018-11237
29+ * sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
30+ (L(preloop_large)): Save initial destination pointer in %r11 and
31+ use it instead of %rax after the loop.
32+ * string/test-mempcpy.c (MIN_PAGE_SIZE): Define.
33+
34 2018-05-09 Paul Pluzhnikov <ppluzhnikov@google.com>
35
36 [BZ #22786]
37diff --git a/string/test-mempcpy.c b/string/test-mempcpy.c
38index c08fba8..d98ecdd 100644
39--- a/string/test-mempcpy.c
40+++ b/string/test-mempcpy.c
41@@ -18,6 +18,7 @@
42 <http://www.gnu.org/licenses/>. */
43
44 #define MEMCPY_RESULT(dst, len) (dst) + (len)
45+#define MIN_PAGE_SIZE 131072
46 #define TEST_MAIN
47 #define TEST_NAME "mempcpy"
48 #include "test-string.h"
49diff --git a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
50index 23c0f7a..effc3ac 100644
51--- a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
52+++ b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S
53@@ -336,6 +336,7 @@ L(preloop_large):
54 vmovups (%rsi), %zmm4
55 vmovups 0x40(%rsi), %zmm5
56
57+ mov %rdi, %r11
58 /* Align destination for access with non-temporal stores in the loop. */
59 mov %rdi, %r8
60 and $-0x80, %rdi
61@@ -366,8 +367,8 @@ L(gobble_256bytes_nt_loop):
62 cmp $256, %rdx
63 ja L(gobble_256bytes_nt_loop)
64 sfence
65- vmovups %zmm4, (%rax)
66- vmovups %zmm5, 0x40(%rax)
67+ vmovups %zmm4, (%r11)
68+ vmovups %zmm5, 0x40(%r11)
69 jmp L(check)
70
71 L(preloop_large_bkw):
72--
732.9.3
74
diff --git a/recipes-core/glibc/glibc_2.27.bbappend b/recipes-core/glibc/glibc_2.27.bbappend
new file mode 100644
index 0000000..1ab2d4a
--- /dev/null
+++ b/recipes-core/glibc/glibc_2.27.bbappend
@@ -0,0 +1,6 @@
1# look for files in the layer first
2FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
3
4SRC_URI += " \
5 file://CVE-2018-11237.patch \
6 "