summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2017-11-26 16:21:33 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-11 22:02:58 +0000
commitb519ef3fc3cbf7de06addad80de4720c632f4d60 (patch)
tree8be2de94e454d840fcb58440694fe487600af4a9 /meta
parent10b391060b5246f50ea235a5178d76223bc6d3c6 (diff)
downloadpoky-b519ef3fc3cbf7de06addad80de4720c632f4d60.tar.gz
binutls: Security for fix CVE-2017-9746
Affects: <= 2.28 (From OE-Core rev: 75731517f8df241ae40378bca1b5b8ec5b45dab0) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.28.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch91
2 files changed, 92 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.28.inc b/meta/recipes-devtools/binutils/binutils-2.28.inc
index d555d5f421..235306ba5e 100644
--- a/meta/recipes-devtools/binutils/binutils-2.28.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.28.inc
@@ -57,6 +57,7 @@ SRC_URI = "\
57 file://CVE-2017-9742.patch \ 57 file://CVE-2017-9742.patch \
58 file://CVE-2017-9744.patch \ 58 file://CVE-2017-9744.patch \
59 file://CVE-2017-9745.patch \ 59 file://CVE-2017-9745.patch \
60 file://CVE-2017-9746.patch \
60" 61"
61S = "${WORKDIR}/git" 62S = "${WORKDIR}/git"
62 63
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch
new file mode 100644
index 0000000000..bd4a40c35e
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch
@@ -0,0 +1,91 @@
1From ae87f7e73eba29bd38b3a9684a10b948ed715612 Mon Sep 17 00:00:00 2001
2From: Nick Clifton <nickc@redhat.com>
3Date: Wed, 14 Jun 2017 16:50:03 +0100
4Subject: [PATCH] Fix address violation when disassembling a corrupt binary.
5
6 PR binutils/21580
7binutils * objdump.c (disassemble_bytes): Check for buffer overrun when
8 printing out rae insns.
9
10ld * testsuite/ld-nds32/diff.d: Adjust expected output.
11
12Upstream-Status: Backport
13CVE: CVE-2017-9746
14Signed-off-by: Armin Kuster <akuster@mvista.com>
15
16---
17 binutils/objdump.c | 27 +++++++++++++++------------
18 ld/ChangeLog | 5 +++++
19 ld/testsuite/ld-nds32/diff.d | 6 +++---
20 3 files changed, 23 insertions(+), 15 deletions(-)
21
22Index: git/binutils/objdump.c
23===================================================================
24--- git.orig/binutils/objdump.c
25+++ git/binutils/objdump.c
26@@ -1855,20 +1855,23 @@ disassemble_bytes (struct disassemble_in
27
28 for (j = addr_offset * opb; j < addr_offset * opb + pb; j += bpc)
29 {
30- int k;
31-
32- if (bpc > 1 && inf->display_endian == BFD_ENDIAN_LITTLE)
33- {
34- for (k = bpc - 1; k >= 0; k--)
35- printf ("%02x", (unsigned) data[j + k]);
36- putchar (' ');
37- }
38- else
39+ /* PR 21580: Check for a buffer ending early. */
40+ if (j + bpc <= stop_offset * opb)
41 {
42- for (k = 0; k < bpc; k++)
43- printf ("%02x", (unsigned) data[j + k]);
44- putchar (' ');
45+ int k;
46+
47+ if (inf->display_endian == BFD_ENDIAN_LITTLE)
48+ {
49+ for (k = bpc - 1; k >= 0; k--)
50+ printf ("%02x", (unsigned) data[j + k]);
51+ }
52+ else
53+ {
54+ for (k = 0; k < bpc; k++)
55+ printf ("%02x", (unsigned) data[j + k]);
56+ }
57 }
58+ putchar (' ');
59 }
60
61 for (; pb < octets_per_line; pb += bpc)
62Index: git/ld/testsuite/ld-nds32/diff.d
63===================================================================
64--- git.orig/ld/testsuite/ld-nds32/diff.d
65+++ git/ld/testsuite/ld-nds32/diff.d
66@@ -7,9 +7,9 @@
67
68 Disassembly of section .data:
69 00008000 <WORD> (7e 00 00 00|00 00 00 7e).*
70-00008004 <HALF> (7e 00 7e fe|00 7e 7e fe).*
71-00008006 <BYTE> 7e fe 00 fe.*
72-00008007 <ULEB128> fe 00.*
73+00008004 <HALF> (7e 00|00 7e).*
74+00008006 <BYTE> 7e.*
75+00008007 <ULEB128> fe.*
76 ...
77 00008009 <ULEB128_2> fe 00.*
78 .*
79Index: git/ld/ChangeLog
80===================================================================
81--- git.orig/ld/ChangeLog
82+++ git/ld/ChangeLog
83@@ -1,3 +1,8 @@
84+2017-06-14 Nick Clifton <nickc@redhat.com>
85+
86+ PR binutils/21580
87+ * testsuite/ld-nds32/diff.d: Adjust expected output.
88+
89 2017-03-07 Alan Modra <amodra@gmail.com>
90
91 * ldlang.c (open_input_bfds): Check that lang_assignment_statement