summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.29.1.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2017-15022.patch61
2 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.29.1.inc b/meta/recipes-devtools/binutils/binutils-2.29.1.inc
index cdfbd26c46..191d8e1255 100644
--- a/meta/recipes-devtools/binutils/binutils-2.29.1.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.29.1.inc
@@ -45,6 +45,7 @@ SRC_URI = "\
45 file://CVE-2017-14939.patch \ 45 file://CVE-2017-14939.patch \
46 file://CVE-2017-14940.patch \ 46 file://CVE-2017-14940.patch \
47 file://CVE-2017-15021.patch \ 47 file://CVE-2017-15021.patch \
48 file://CVE-2017-15022.patch \
48" 49"
49S = "${WORKDIR}/git" 50S = "${WORKDIR}/git"
50 51
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-15022.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-15022.patch
new file mode 100644
index 0000000000..c9acfa7853
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-15022.patch
@@ -0,0 +1,61 @@
1From 11855d8a1f11b102a702ab76e95b22082cccf2f8 Mon Sep 17 00:00:00 2001
2From: Alan Modra <amodra@gmail.com>
3Date: Mon, 25 Sep 2017 19:46:34 +0930
4Subject: [PATCH] PR22201, DW_AT_name with out of bounds reference
5
6DW_AT_name ought to always have a string value.
7
8 PR 22201
9 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
10 has string form.
11 (parse_comp_unit): Likewise.
12
13Upstream-Status: Backport
14Affects: <= 2.29.1
15CVE: CVE-2017-15022
16Signed-off-by: Armin Kuster <akuster@mvista.com>
17
18---
19 bfd/ChangeLog | 7 +++++++
20 bfd/dwarf2.c | 6 ++++--
21 2 files changed, 11 insertions(+), 2 deletions(-)
22
23Index: git/bfd/dwarf2.c
24===================================================================
25--- git.orig/bfd/dwarf2.c
26+++ git/bfd/dwarf2.c
27@@ -3177,7 +3177,8 @@ scan_unit_for_symbols (struct comp_unit
28 switch (attr.name)
29 {
30 case DW_AT_name:
31- var->name = attr.u.str;
32+ if (is_str_attr (attr.form))
33+ var->name = attr.u.str;
34 break;
35
36 case DW_AT_decl_file:
37@@ -3429,7 +3430,8 @@ parse_comp_unit (struct dwarf2_debug *st
38 break;
39
40 case DW_AT_name:
41- unit->name = attr.u.str;
42+ if (is_str_attr (attr.form))
43+ unit->name = attr.u.str;
44 break;
45
46 case DW_AT_low_pc:
47Index: git/bfd/ChangeLog
48===================================================================
49--- git.orig/bfd/ChangeLog
50+++ git/bfd/ChangeLog
51@@ -1,3 +1,10 @@
52+2017-09-25 Alan Modra <amodra@gmail.com>
53+
54+ PR 22201
55+ * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
56+ has string form.
57+ (parse_comp_unit): Likewise.
58+
59 2017-09-24 Alan Modra <amodra@gmail.com>
60
61 PR 22197