summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch
new file mode 100644
index 0000000000..97d529a789
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch
@@ -0,0 +1,51 @@
1From ab27f80c5dceaa23c4ba7f62c0d5d22a5d5dd7a1 Mon Sep 17 00:00:00 2001
2From: Pedro Alves <palves@redhat.com>
3Date: Tue, 27 Jun 2017 00:21:25 +0100
4Subject: [PATCH] Fix GDB regressions caused by previous
5 bfd_get_section_contents changes
6
7Ref: https://sourceware.org/ml/binutils/2017-06/msg00343.html
8
9bfd/ChangeLog:
102017-06-26 Pedro Alves <palves@redhat.com>
11
12 PR binutils/21665
13 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
14 "sz".
15
16Upstream-Status: Backport
17CVE: CVE-2017-9955 #4
18Signed-off-by: Armin Kuster <akuster@mvista.com>
19
20---
21 bfd/ChangeLog | 6 ++++++
22 bfd/libbfd.c | 2 +-
23 2 files changed, 7 insertions(+), 1 deletion(-)
24
25Index: git/bfd/ChangeLog
26===================================================================
27--- git.orig/bfd/ChangeLog
28+++ git/bfd/ChangeLog
29@@ -1,3 +1,9 @@
30+2017-06-26 Pedro Alves <palves@redhat.com>
31+
32+ PR binutils/21665
33+ * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
34+ "sz".
35+
36 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
37
38 PR binutils/21665
39Index: git/bfd/libbfd.c
40===================================================================
41--- git.orig/bfd/libbfd.c
42+++ git/bfd/libbfd.c
43@@ -811,7 +811,7 @@ _bfd_generic_get_section_contents (bfd *
44 }
45 if (offset + count < count
46 || offset + count > sz
47- || (section->filepos + offset + sz) > (bfd_size_type) filesz)
48+ || (section->filepos + offset + count) > (bfd_size_type) filesz)
49 {
50 bfd_set_error (bfd_error_invalid_operation);
51 return FALSE;