diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch | 37 |
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> | |||
21 | bfd/syms.c | 22 ++++++++++++++++------ | 21 | bfd/syms.c | 22 ++++++++++++++++------ |
22 | 3 files changed, 33 insertions(+), 7 deletions(-) | 22 | 3 files changed, 33 insertions(+), 7 deletions(-) |
23 | 23 | ||
24 | diff --git a/bfd/ChangeLog b/bfd/ChangeLog | ||
25 | index 04c0c2a..fef5479 100644 | ||
26 | --- a/bfd/ChangeLog | ||
27 | +++ b/bfd/ChangeLog | ||
28 | @@ -1,3 +1,12 @@ | ||
29 | +2018-09-20 Alan Modra <amodra@gmail.com> | ||
30 | + | ||
31 | + PR 23686 | ||
32 | + * dwarf2.c (read_section): Error when attempting to malloc | ||
33 | + "(bfd_size_type) -1". | ||
34 | + * syms.c (_bfd_stab_section_find_nearest_line): Bounds check | ||
35 | + function_name. Bounds check reloc address. Formatting. Ensure | ||
36 | + .stabstr zero terminated. | ||
37 | + | ||
38 | 2018-08-12 H.J. Lu <hongjiu.lu@intel.com> | ||
39 | |||
40 | PR ld/23428 | ||
41 | diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c | ||
42 | index 3b28855..77a7368 100644 | ||
43 | --- a/bfd/dwarf2.c | 24 | --- a/bfd/dwarf2.c |
44 | +++ b/bfd/dwarf2.c | 25 | +++ b/bfd/dwarf2.c |
45 | @@ -527,6 +527,7 @@ read_section (bfd * abfd, | 26 | @@ -527,6 +527,7 @@ read_section (bfd * abfd, |
@@ -65,11 +46,9 @@ index 3b28855..77a7368 100644 | |||
65 | if (contents == NULL) | 46 | if (contents == NULL) |
66 | return FALSE; | 47 | return FALSE; |
67 | if (syms | 48 | if (syms |
68 | diff --git a/bfd/syms.c b/bfd/syms.c | ||
69 | index 187071f..e09640a 100644 | ||
70 | --- a/bfd/syms.c | 49 | --- a/bfd/syms.c |
71 | +++ b/bfd/syms.c | 50 | +++ b/bfd/syms.c |
72 | @@ -1035,6 +1035,10 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, | 51 | @@ -1035,6 +1035,10 @@ _bfd_stab_section_find_nearest_line (bfd |
73 | 0, strsize)) | 52 | 0, strsize)) |
74 | return FALSE; | 53 | return FALSE; |
75 | 54 | ||
@@ -80,7 +59,7 @@ index 187071f..e09640a 100644 | |||
80 | /* If this is a relocatable object file, we have to relocate | 59 | /* If this is a relocatable object file, we have to relocate |
81 | the entries in .stab. This should always be simple 32 bit | 60 | the entries in .stab. This should always be simple 32 bit |
82 | relocations against symbols defined in this object file, so | 61 | relocations against symbols defined in this object file, so |
83 | @@ -1073,7 +1077,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, | 62 | @@ -1073,7 +1077,8 @@ _bfd_stab_section_find_nearest_line (bfd |
84 | || r->howto->bitsize != 32 | 63 | || r->howto->bitsize != 32 |
85 | || r->howto->pc_relative | 64 | || r->howto->pc_relative |
86 | || r->howto->bitpos != 0 | 65 | || r->howto->bitpos != 0 |
@@ -90,7 +69,7 @@ index 187071f..e09640a 100644 | |||
90 | { | 69 | { |
91 | _bfd_error_handler | 70 | _bfd_error_handler |
92 | (_("unsupported .stab relocation")); | 71 | (_("unsupported .stab relocation")); |
93 | @@ -1195,7 +1200,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, | 72 | @@ -1195,7 +1200,8 @@ _bfd_stab_section_find_nearest_line (bfd |
94 | { | 73 | { |
95 | nul_fun = stab; | 74 | nul_fun = stab; |
96 | nul_str = str; | 75 | nul_str = str; |
@@ -100,7 +79,7 @@ index 187071f..e09640a 100644 | |||
100 | file_name = NULL; | 79 | file_name = NULL; |
101 | if (stab + STABSIZE + TYPEOFF < info->stabs + stabsize | 80 | if (stab + STABSIZE + TYPEOFF < info->stabs + stabsize |
102 | && *(stab + STABSIZE + TYPEOFF) == (bfd_byte) N_SO) | 81 | && *(stab + STABSIZE + TYPEOFF) == (bfd_byte) N_SO) |
103 | @@ -1206,7 +1212,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, | 82 | @@ -1206,7 +1212,8 @@ _bfd_stab_section_find_nearest_line (bfd |
104 | directory_name = file_name; | 83 | directory_name = file_name; |
105 | file_name = ((char *) str | 84 | file_name = ((char *) str |
106 | + bfd_get_32 (abfd, stab + STRDXOFF)); | 85 | + bfd_get_32 (abfd, stab + STRDXOFF)); |
@@ -110,7 +89,7 @@ index 187071f..e09640a 100644 | |||
110 | file_name = NULL; | 89 | file_name = NULL; |
111 | } | 90 | } |
112 | } | 91 | } |
113 | @@ -1217,7 +1224,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, | 92 | @@ -1217,7 +1224,8 @@ _bfd_stab_section_find_nearest_line (bfd |
114 | file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); | 93 | file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); |
115 | /* PR 17512: file: 0c680a1f. */ | 94 | /* PR 17512: file: 0c680a1f. */ |
116 | /* PR 17512: file: 5da8aec4. */ | 95 | /* PR 17512: file: 5da8aec4. */ |
@@ -120,7 +99,7 @@ index 187071f..e09640a 100644 | |||
120 | file_name = NULL; | 99 | file_name = NULL; |
121 | break; | 100 | break; |
122 | 101 | ||
123 | @@ -1226,7 +1234,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, | 102 | @@ -1226,7 +1234,8 @@ _bfd_stab_section_find_nearest_line (bfd |
124 | function_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); | 103 | function_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); |
125 | if (function_name == (char *) str) | 104 | if (function_name == (char *) str) |
126 | continue; | 105 | continue; |
@@ -130,7 +109,7 @@ index 187071f..e09640a 100644 | |||
130 | function_name = NULL; | 109 | function_name = NULL; |
131 | 110 | ||
132 | nul_fun = NULL; | 111 | nul_fun = NULL; |
133 | @@ -1335,7 +1344,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, | 112 | @@ -1335,7 +1344,8 @@ _bfd_stab_section_find_nearest_line (bfd |
134 | if (val <= offset) | 113 | if (val <= offset) |
135 | { | 114 | { |
136 | file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); | 115 | file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); |
@@ -140,5 +119,3 @@ index 187071f..e09640a 100644 | |||
140 | file_name = NULL; | 119 | file_name = NULL; |
141 | *pline = 0; | 120 | *pline = 0; |
142 | } | 121 | } |
143 | -- | ||
144 | 2.9.3 | ||