aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch37
1 files changed, 7 insertions, 30 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch b/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch
index 813509160f..d5a1ea1dc4 100644
--- a/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch
@@ -21,25 +21,6 @@ Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
bfd/syms.c | 22 ++++++++++++++++------
3 files changed, 33 insertions(+), 7 deletions(-)
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 04c0c2a..fef5479 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1,3 +1,12 @@
-+2018-09-20 Alan Modra <amodra@gmail.com>
-+
-+ PR 23686
-+ * dwarf2.c (read_section): Error when attempting to malloc
-+ "(bfd_size_type) -1".
-+ * syms.c (_bfd_stab_section_find_nearest_line): Bounds check
-+ function_name. Bounds check reloc address. Formatting. Ensure
-+ .stabstr zero terminated.
-+
- 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/23428
-diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
-index 3b28855..77a7368 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -527,6 +527,7 @@ read_section (bfd * abfd,
@@ -65,11 +46,9 @@ index 3b28855..77a7368 100644
if (contents == NULL)
return FALSE;
if (syms
-diff --git a/bfd/syms.c b/bfd/syms.c
-index 187071f..e09640a 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
-@@ -1035,6 +1035,10 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1035,6 +1035,10 @@ _bfd_stab_section_find_nearest_line (bfd
0, strsize))
return FALSE;
@@ -80,7 +59,7 @@ index 187071f..e09640a 100644
/* If this is a relocatable object file, we have to relocate
the entries in .stab. This should always be simple 32 bit
relocations against symbols defined in this object file, so
-@@ -1073,7 +1077,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1073,7 +1077,8 @@ _bfd_stab_section_find_nearest_line (bfd
|| r->howto->bitsize != 32
|| r->howto->pc_relative
|| r->howto->bitpos != 0
@@ -90,7 +69,7 @@ index 187071f..e09640a 100644
{
_bfd_error_handler
(_("unsupported .stab relocation"));
-@@ -1195,7 +1200,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1195,7 +1200,8 @@ _bfd_stab_section_find_nearest_line (bfd
{
nul_fun = stab;
nul_str = str;
@@ -100,7 +79,7 @@ index 187071f..e09640a 100644
file_name = NULL;
if (stab + STABSIZE + TYPEOFF < info->stabs + stabsize
&& *(stab + STABSIZE + TYPEOFF) == (bfd_byte) N_SO)
-@@ -1206,7 +1212,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1206,7 +1212,8 @@ _bfd_stab_section_find_nearest_line (bfd
directory_name = file_name;
file_name = ((char *) str
+ bfd_get_32 (abfd, stab + STRDXOFF));
@@ -110,7 +89,7 @@ index 187071f..e09640a 100644
file_name = NULL;
}
}
-@@ -1217,7 +1224,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1217,7 +1224,8 @@ _bfd_stab_section_find_nearest_line (bfd
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
/* PR 17512: file: 0c680a1f. */
/* PR 17512: file: 5da8aec4. */
@@ -120,7 +99,7 @@ index 187071f..e09640a 100644
file_name = NULL;
break;
-@@ -1226,7 +1234,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1226,7 +1234,8 @@ _bfd_stab_section_find_nearest_line (bfd
function_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
if (function_name == (char *) str)
continue;
@@ -130,7 +109,7 @@ index 187071f..e09640a 100644
function_name = NULL;
nul_fun = NULL;
-@@ -1335,7 +1344,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1335,7 +1344,8 @@ _bfd_stab_section_find_nearest_line (bfd
if (val <= offset)
{
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
@@ -140,5 +119,3 @@ index 187071f..e09640a 100644
file_name = NULL;
*pline = 0;
}
---
-2.9.3