summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-14933_p1.patch
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2018-08-06 14:02:09 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-15 10:22:44 +0100
commit9be7b4f3db6243fc2a557ad63543173f2b1f5d86 (patch)
tree11260569fb2cda75a28ce876170d97f6672a0d81 /meta/recipes-devtools/binutils/binutils/CVE-2017-14933_p1.patch
parent4ad8bd4a60da3a09f7bd68855b2fa56ed07713be (diff)
downloadpoky-9be7b4f3db6243fc2a557ad63543173f2b1f5d86.tar.gz
binutls: Security fix CVE-2017-14933
Affects: <= 2.29.1 (From OE-Core rev: 16cdbc7504cc14547bb99ed742484ae9e658ec6e) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2017-14933_p1.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2017-14933_p1.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-14933_p1.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-14933_p1.patch
new file mode 100644
index 0000000000..9df8138401
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-14933_p1.patch
@@ -0,0 +1,58 @@
1From 30d0157a2ad64e64e5ff9fcc0dbe78a3e682f573 Mon Sep 17 00:00:00 2001
2From: Nick Clifton <nickc@redhat.com>
3Date: Tue, 26 Sep 2017 14:37:47 +0100
4Subject: [PATCH] Avoid needless resource usage when processing a corrupt DWARF
5 directory or file name table.
6
7 PR 22210
8 * dwarf2.c (read_formatted_entries): Fail early if we know that
9 the loop parsing data entries will overflow the end of the
10 section.
11
12Upstream-Status: Backport
13Affects: <= 2.29.1
14CVE: CVE-2017-14933 #1
15Signed-off-by: Armin Kuster <akuster@mvista.com>
16
17---
18 bfd/ChangeLog | 7 +++++++
19 bfd/dwarf2.c | 10 ++++++++++
20 2 files changed, 17 insertions(+)
21
22Index: git/bfd/ChangeLog
23===================================================================
24--- git.orig/bfd/ChangeLog
25+++ git/bfd/ChangeLog
26@@ -1,3 +1,10 @@
27+2017-09-26 Nick Clifton <nickc@redhat.com>
28+
29+ PR 22210
30+ * dwarf2.c (read_formatted_entries): Fail early if we know that
31+ the loop parsing data entries will overflow the end of the
32+ section.
33+
34 2017-09-26 Alan Modra <amodra@gmail.com>
35
36 PR 22204
37Index: git/bfd/dwarf2.c
38===================================================================
39--- git.orig/bfd/dwarf2.c
40+++ git/bfd/dwarf2.c
41@@ -1933,6 +1933,17 @@ read_formatted_entries (struct comp_unit
42
43 data_count = _bfd_safe_read_leb128 (abfd, buf, &bytes_read, FALSE, buf_end);
44 buf += bytes_read;
45+
46+ /* PR 22210. Paranoia check. Don't bother running the loop
47+ if we know that we are going to run out of buffer. */
48+ if (data_count > (bfd_vma) (buf_end - buf))
49+ {
50+ _bfd_error_handler (_("Dwarf Error: data count (%Lx) larger than buffer size."),
51+ data_count);
52+ bfd_set_error (bfd_error_bad_value);
53+ return FALSE;
54+ }
55+
56 for (datai = 0; datai < data_count; datai++)
57 {
58 bfd_byte *format = format_header_data;