Skip to contentSkip to conversation

gcc: CVE fix for gcc <CVE-2019-15847>

PATCH Superseded Muminul Islam 2 participants 2 messages Sep 17, 2019 – Sep 18, 2019

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 gcc: CVE fix for gcc <CVE-2019-15847>

---
 meta/recipes-devtools/gcc/gcc-8.2.inc         |   3 +
 .../gcc/gcc-8.2/CVE-2019-15847_p1.patch       | 222 ++++++++++++++++++
 .../gcc/gcc-8.2/CVE-2019-15847_p2.patch       |  47 ++++
 .../gcc/gcc-8.2/CVE-2019-15847_p3.patch       |  38 +++
 4 files changed, 310 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-8.2/CVE-2019-15847_p1.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-8.2/CVE-2019-15847_p2.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-8.2/CVE-2019-15847_p3.patch
meta/recipes-devtools/gcc/gcc-8.2.inc +3 -0
index 866a77558b..65fd29d943 100644
@@ -70,6 +70,9 @@ SRC_URI = "\
            file://0039-Fix-for-testsuite-failure.patch \
            file://0040-Re-introduce-spe-commandline-options.patch \
            file://0041-ARC-fix-spec-gen.patch \
+           file://CVE-2019-15847_p1.patch \
+           file://CVE-2019-15847_p2.patch \
+           file://CVE-2019-15847_p3.patch \
            ${BACKPORTS} \
 "
 BACKPORTS = "\
meta/recipes-devtools/gcc/gcc-8.2/CVE-2019-15847_p1.patch new file +222 -0

222 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc-8.2/CVE-2019-15847_p2.patch new file +47 -0

47 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc-8.2/CVE-2019-15847_p3.patch new file +38 -0
new file mode 100644
index 0000000000..0ab7544caa
@@ -0,0 +1,38 @@
+From f4721625a060ad708c0b7d02d3d6b3a581e7d885 Mon Sep 17 00:00:00 2001
+From: segher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sat, 31 Aug 2019 18:58:04 +0000
+Subject: [PATCH] rs6000: Fix darn-3.c for GCC 8 and GCC 7
+Reply-To: [email protected]
+
+Apparently I didn't properly test the testcase backport to GCC 8 and
+GCC 7.  This makes it not fail there.
+
+	PR target/91481
+	* gcc.target/powerpc/darn-3.c: Fix testcase.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@275244 138bc75d-0d04-0410-961f-82ee72b054a4
+Signed-off-by: Muminul Islam <[email protected]>
+
+CVE: CVE-2019-15847
+
+Upstream-Status: Backport
+---
+ gcc/testsuite/gcc.target/powerpc/darn-3.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/testsuite/gcc.target/powerpc/darn-3.c b/gcc/testsuite/gcc.target/powerpc/darn-3.c
+index 477901fde70..96ac21fc58c 100644
+--- a/gcc/testsuite/gcc.target/powerpc/darn-3.c
++++ b/gcc/testsuite/gcc.target/powerpc/darn-3.c
+@@ -1,6 +1,7 @@
+ /* { dg-do compile { target { powerpc*-*-* } } } */
+ /* { dg-skip-if "" { powerpc*-*-aix* } } */
+-/* { dg-options "-O2 -mdejagnu-cpu=power9" } */
++/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
++/* { dg-options "-O2 -mcpu=power9" } */
+ 
+ static int darn32(void) { return __builtin_darn_32(); }
+ 
+-- 
+2.23.0
+
Signature · 1 line
2.23.0
Reviewed-by on v4 1/1
#1 lore raw

Looks ok, though I would consider updating to point releases or latest versions of the gcc-8 stable tree, where these patches are already backported by upstream developers. The 8.3 update does not have this CVE patch, but a lot of bug fixes which should be useful for gcc 8 users.

-Mikko