summaryrefslogtreecommitdiff
path: root/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch')
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch27
1 files changed, 14 insertions, 13 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch
index 5e364ef69..dd58df5fb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch
@@ -1,7 +1,7 @@
-From 310e2cdc0a46ef62602097f5c21c393571e76df4 Mon Sep 17 00:00:00 2001
+From 383ec757d27652448d1511169e1133f486abf54f Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Mon, 13 Feb 2017 14:03:22 +0000
-Subject: [PATCH 2/2] Fix read-after-free error in readelf when processing
+Subject: [PATCH] Fix read-after-free error in readelf when processing
multiple, relocated sections in an MSP430 binary.
PR binutils/21139
@@ -23,7 +23,7 @@ Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
2 files changed, 94 insertions(+), 25 deletions(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index 154b797a29..aef0a51f19 100644
+index e789a3b99b..bd63c8a0d8 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,15 @@
@@ -43,10 +43,10 @@ index 154b797a29..aef0a51f19 100644
* readelf.c (target_specific_reloc_handling): Add end parameter.
Check for buffer overflow before writing relocated values.
diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 220671f76f..2b6cef1638 100644
+index 8cdaae3b8c..7c158c6342 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
-@@ -11340,15 +11340,27 @@ process_syminfo (FILE * file ATTRIBUTE_UNUSED)
+@@ -11580,15 +11580,27 @@ process_syminfo (FILE * file ATTRIBUTE_UNUSED)
/* Check to see if the given reloc needs to be handled in a target specific
manner. If so then process the reloc and return TRUE otherwise return
@@ -77,7 +77,7 @@ index 220671f76f..2b6cef1638 100644
switch (elf_header.e_machine)
{
-@@ -11357,13 +11369,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
+@@ -11597,6 +11609,12 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
{
static Elf_Internal_Sym * saved_sym = NULL;
@@ -90,8 +90,9 @@ index 220671f76f..2b6cef1638 100644
switch (reloc_type)
{
case 10: /* R_MSP430_SYM_DIFF */
- if (uses_msp430x_relocs ())
+@@ -11604,7 +11622,12 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
break;
+ /* Fall through. */
case 21: /* R_MSP430X_SYM_DIFF */
- saved_sym = symtab + get_reloc_symindex (reloc->r_info);
+ /* PR 21139. */
@@ -103,7 +104,7 @@ index 220671f76f..2b6cef1638 100644
return TRUE;
case 1: /* R_MSP430_32 or R_MSP430_ABS32 */
-@@ -11388,16 +11411,21 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
+@@ -11629,16 +11652,21 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
int reloc_size = reloc_type == 1 ? 4 : 2;
bfd_vma value;
@@ -134,7 +135,7 @@ index 220671f76f..2b6cef1638 100644
saved_sym = NULL;
return TRUE;
-@@ -11417,13 +11445,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
+@@ -11658,13 +11686,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
{
static Elf_Internal_Sym * saved_sym = NULL;
@@ -160,7 +161,7 @@ index 220671f76f..2b6cef1638 100644
case 1: /* R_MN10300_32 */
case 2: /* R_MN10300_16 */
if (saved_sym != NULL)
-@@ -11431,15 +11470,20 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
+@@ -11672,15 +11711,20 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
int reloc_size = reloc_type == 1 ? 4 : 2;
bfd_vma value;
@@ -189,7 +190,7 @@ index 220671f76f..2b6cef1638 100644
saved_sym = NULL;
return TRUE;
-@@ -11459,12 +11503,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
+@@ -11700,12 +11744,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
static bfd_vma saved_sym2 = 0;
static bfd_vma value;
@@ -216,7 +217,7 @@ index 220671f76f..2b6cef1638 100644
return TRUE;
case 0x83: /* R_RL78_OPsub. */
-@@ -12094,7 +12150,7 @@ apply_relocations (void * file,
+@@ -12345,7 +12401,7 @@ apply_relocations (void * file,
reloc_type = get_reloc_type (rp->r_info);
@@ -225,7 +226,7 @@ index 220671f76f..2b6cef1638 100644
continue;
else if (is_none_reloc (reloc_type))
continue;
-@@ -12190,6 +12246,9 @@ apply_relocations (void * file,
+@@ -12441,6 +12497,9 @@ apply_relocations (void * file,
}
free (symtab);