From: Armin Kuster <akuster808@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Armin Kuster <Akuster@mvista.com>
Subject: [PATCH] gcc-9.2: Security fix for CVE-2019-14250
Date: Sat, 31 Aug 2019 14:15:49 -0700 [thread overview]
Message-ID: <20190831211549.23729-1-akuster808@gmail.com> (raw)
Affects: <= 9.2
Signed-off-by: Armin Kuster <Akuster@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
meta/recipes-devtools/gcc/gcc-9.2.inc | 1 +
.../gcc/gcc-9.2/CVE-2019-14250.patch | 44 +++++++++++++++++++
2 files changed, 45 insertions(+)
create mode 100644 meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-14250.patch
diff --git a/meta/recipes-devtools/gcc/gcc-9.2.inc b/meta/recipes-devtools/gcc/gcc-9.2.inc
index 1c3e200dab..01d3bf0f32 100644
--- a/meta/recipes-devtools/gcc/gcc-9.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-9.2.inc
@@ -64,6 +64,7 @@ SRC_URI = "\
file://0034-fix-segmentation-fault-in-precompiled-header-generat.patch \
file://0035-Fix-for-testsuite-failure.patch \
file://0036-Re-introduce-spe-commandline-options.patch \
+ file://CVE-2019-14250.patch \
"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
SRC_URI[md5sum] = "3818ad8600447f05349098232c2ddc78"
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-14250.patch b/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-14250.patch
new file mode 100644
index 0000000000..65ea34558a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/CVE-2019-14250.patch
@@ -0,0 +1,44 @@
+From 517b211a3d78366ca8d5929f580e8ca72fd2c004 Mon Sep 17 00:00:00 2001
+From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 25 Jul 2019 10:46:54 +0000
+Subject: [PATCH] 2019-07-25 Richard Biener <rguenther@suse.de>
+
+ PR lto/90924
+ Backport from mainline
+ 2019-07-12 Ren Kimura <rkx1209dev@gmail.com>
+
+ * simple-object-elf.c (simple_object_elf_match): Check zero value
+ shstrndx.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@273793 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+Affectes: < 9.2
+CVE: CVE-2019-14250
+Dropped changelog
+Signed-off-by: Armin Kuster <Akustre@mvista.com>
+
+---
+ libiberty/simple-object-elf.c | 8 ++++++++
+ 2 files changed, 17 insertions(+)
+
+Index: gcc-9.2.0/libiberty/simple-object-elf.c
+===================================================================
+--- gcc-9.2.0.orig/libiberty/simple-object-elf.c
++++ gcc-9.2.0/libiberty/simple-object-elf.c
+@@ -557,6 +557,14 @@ simple_object_elf_match (unsigned char h
+ return NULL;
+ }
+
++ if (eor->shstrndx == 0)
++ {
++ *errmsg = "invalid ELF shstrndx == 0";
++ *err = 0;
++ XDELETE (eor);
++ return NULL;
++ }
++
+ return (void *) eor;
+ }
+
--
2.17.1
next reply other threads:[~2019-08-31 21:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-31 21:15 Armin Kuster [this message]
2019-09-01 14:05 ` [PATCH] gcc-9.2: Security fix for CVE-2019-14250 Adrian Bunk
2019-09-01 17:07 ` akuster808
2019-09-02 12:40 ` Adrian Bunk
2019-09-02 16:10 ` akuster808
2019-09-02 21:33 ` akuster808
2019-09-03 3:41 ` Adrian Bunk
2019-09-03 5:50 ` Mikko.Rapeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190831211549.23729-1-akuster808@gmail.com \
--to=akuster808@gmail.com \
--cc=Akuster@mvista.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox