summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-7299_1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2017-7299_1.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2017-7299_1.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-7299_1.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-7299_1.patch
new file mode 100644
index 0000000000..50a48bc549
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-7299_1.patch
@@ -0,0 +1,47 @@
1commit d7f399a8de4c55eb841db6493597a587fac002de
2Author: Nick Clifton <nickc@redhat.com>
3Date: Fri Dec 2 17:46:26 2016 +0000
4
5 Fix seg-fault in linker when passed a corrupt binary input file.
6
7 PR lf/20908
8 * elflink.c (bfd_elf_final_link): Check for ELF flavour binaries
9 when following indirect links.
10
11Upstream-Status: Backport
12
13CVE: CVE-2017-7299
14Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
15
16Index: git/bfd/elflink.c
17===================================================================
18--- git.orig/bfd/elflink.c 2017-09-20 14:15:26.337333504 +0530
19+++ git/bfd/elflink.c 2017-09-20 14:20:19.000000000 +0530
20@@ -11201,6 +11201,12 @@
21 asection *sec;
22
23 sec = p->u.indirect.section;
24+ /* See PR 20908 for a reproducer. */
25+ if (bfd_get_flavour (sec->owner) != bfd_target_elf_flavour)
26+ {
27+ _bfd_error_handler (_("%B: not in ELF format"), sec->owner);
28+ goto error_return;
29+ }
30 esdi = elf_section_data (sec);
31
32 /* Mark all sections which are to be included in the
33Index: git/bfd/ChangeLog
34===================================================================
35--- git.orig/bfd/ChangeLog 2017-09-20 14:20:19.000000000 +0530
36+++ git/bfd/ChangeLog 2017-09-20 14:23:48.743556932 +0530
37@@ -192,6 +192,10 @@
38
39 2016-12-02 Nick Clifton <nickc@redhat.com>
40
41+ PR lf/20908
42+ * elflink.c (bfd_elf_final_link): Check for ELF flavour binaries
43+ when following indirect links.
44+
45 PR ld/20909
46 * aoutx.h (aout_link_add_symbols): Fix off-by-one error in check
47 for an illegal string offset.