summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.31.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2019-12972.patch39
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.31.inc b/meta/recipes-devtools/binutils/binutils-2.31.inc
index 247f779a79..e1a6673b7f 100644
--- a/meta/recipes-devtools/binutils/binutils-2.31.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.31.inc
@@ -47,6 +47,7 @@ SRC_URI = "\
47 file://CVE-2018-18606.patch \ 47 file://CVE-2018-18606.patch \
48 file://CVE-2018-18607.patch \ 48 file://CVE-2018-18607.patch \
49 file://CVE-2019-14444.patch \ 49 file://CVE-2019-14444.patch \
50 file://CVE-2019-12972.patch \
50" 51"
51S = "${WORKDIR}/git" 52S = "${WORKDIR}/git"
52 53
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2019-12972.patch b/meta/recipes-devtools/binutils/binutils/CVE-2019-12972.patch
new file mode 100644
index 0000000000..3e95b9221a
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2019-12972.patch
@@ -0,0 +1,39 @@
1From 890f750a3b053532a4b839a2dd6243076de12031 Mon Sep 17 00:00:00 2001
2From: Alan Modra <amodra@gmail.com>
3Date: Fri, 21 Jun 2019 11:51:38 +0930
4Subject: [PATCH] PR24689, string table corruption
5
6The testcase in the PR had a e_shstrndx section of type SHT_GROUP.
7hdr->contents were initialized by setup_group rather than being read
8from the file, thus last byte was not zero and string dereference ran
9off the end of the buffer.
10
11 PR 24689
12 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
13
14Upstream-Status: Backport
15https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=890f750a3b053532a4b839a2dd6243076de12031
16
17CVE: CVE-2019-12972
18Affects: <= 2.23.0
19Dropped Changelog
20Signed-off-by Armin Kuster <akuster@mvista.com>
21---
22 bfd/ChangeLog | 5 +++++
23 bfd/elfcode.h | 3 ++-
24 2 files changed, 7 insertions(+), 1 deletion(-)
25
26Index: git/bfd/elfcode.h
27===================================================================
28--- git.orig/bfd/elfcode.h
29+++ git/bfd/elfcode.h
30@@ -747,7 +747,8 @@ elf_object_p (bfd *abfd)
31 /* A further sanity check. */
32 if (i_ehdrp->e_shnum != 0)
33 {
34- if (i_ehdrp->e_shstrndx >= elf_numsections (abfd))
35+ if (i_ehdrp->e_shstrndx >= elf_numsections (abfd)
36+ || i_shdrp[i_ehdrp->e_shstrndx].sh_type != SHT_STRTAB)
37 {
38 /* PR 2257:
39 We used to just goto got_wrong_format_error here