summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2018-08-08 11:10:29 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-15 10:22:45 +0100
commit2d7d54a5c52e528bb3e1da8e3d64bcb427abc472 (patch)
treecb10f32e8cc39db2a3dd3e4c1d8eb643922a6dbc /meta/recipes-devtools/binutils
parente82b9a5096a9fc19ac979024c3e24868706ea4e3 (diff)
downloadpoky-2d7d54a5c52e528bb3e1da8e3d64bcb427abc472.tar.gz
Binutils: Security fix for CVE-2018-10372
Affects: <= 2.30 (From OE-Core rev: 8d254fe04992aed29a2c8ecbf99e91d0167449ce) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.29.1.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2018-10372.patch58
2 files changed, 59 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 8fe897e050..7830b87d46 100644
--- a/meta/recipes-devtools/binutils/binutils-2.29.1.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.29.1.inc
@@ -65,6 +65,7 @@ SRC_URI = "\
65 file://CVE-2017-17122.patch \ 65 file://CVE-2017-17122.patch \
66 file://CVE-2017-17125.patch \ 66 file://CVE-2017-17125.patch \
67 file://CVE-2017-17123.patch \ 67 file://CVE-2017-17123.patch \
68 file://CVE-2018-10372.patch \
68" 69"
69S = "${WORKDIR}/git" 70S = "${WORKDIR}/git"
70 71
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2018-10372.patch b/meta/recipes-devtools/binutils/binutils/CVE-2018-10372.patch
new file mode 100644
index 0000000000..caaaf2317e
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2018-10372.patch
@@ -0,0 +1,58 @@
1From 6aea08d9f3e3d6475a65454da488a0c51f5dc97d Mon Sep 17 00:00:00 2001
2From: Nick Clifton <nickc@redhat.com>
3Date: Tue, 17 Apr 2018 12:35:55 +0100
4Subject: [PATCH] Fix illegal memory access when parsing corrupt DWARF
5 information.
6
7 PR 23064
8 * dwarf.c (process_cu_tu_index): Test for a potential buffer
9 overrun before copying signature pointer.
10
11Upstream-Status: Backport
12Affects: <= 2.30
13CVE: CVE-2018-10372
14Signed-off-by: Armin Kuster <akuster@mvista.com>
15
16---
17 binutils/ChangeLog | 6 ++++++
18 binutils/dwarf.c | 13 ++++++++++++-
19 2 files changed, 18 insertions(+), 1 deletion(-)
20
21Index: git/binutils/dwarf.c
22===================================================================
23--- git.orig/binutils/dwarf.c
24+++ git/binutils/dwarf.c
25@@ -8526,7 +8526,18 @@ process_cu_tu_index (struct dwarf_sectio
26 }
27
28 if (!do_display)
29- memcpy (&this_set[row - 1].signature, ph, sizeof (uint64_t));
30+ {
31+ size_t num_copy = sizeof (uint64_t);
32+
33+ /* PR 23064: Beware of buffer overflow. */
34+ if (ph + num_copy < limit)
35+ memcpy (&this_set[row - 1].signature, ph, num_copy);
36+ else
37+ {
38+ warn (_("Signature (%p) extends beyond end of space in section\n"), ph);
39+ return 0;
40+ }
41+ }
42
43 prow = poffsets + (row - 1) * ncols * 4;
44 /* PR 17531: file: b8ce60a8. */
45Index: git/binutils/ChangeLog
46===================================================================
47--- git.orig/binutils/ChangeLog
48+++ git/binutils/ChangeLog
49@@ -1,3 +1,9 @@
50+2018-04-17 Nick Clifton <nickc@redhat.com>
51+
52+ PR 23064
53+ * dwarf.c (process_cu_tu_index): Test for a potential buffer
54+ overrun before copying signature pointer.
55+
56 2017-11-18 Alan Modra <amodra@gmail.com>
57
58 PR 22443