summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch56
1 files changed, 0 insertions, 56 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch
deleted file mode 100644
index f8ad32f4f8..0000000000
--- a/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From 4da598a472e1d298825035e452e3bc68f714311c Mon Sep 17 00:00:00 2001
2From: Nick Clifton <nickc@redhat.com>
3Date: Tue, 14 Feb 2017 14:07:29 +0000
4Subject: Fix handling of corrupt STABS enum type strings.
5
6 PR binutils/21157
7 * stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE
8 pairs.
9 (parse_number): Exit early if passed an empty string.
10
11CVE: CVE-2017-7210
12Upstream-Status: Backport [master]
13
14Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
15---
16 binutils/ChangeLog | 7 +++++++
17 binutils/stabs.c | 14 +++++++++++++-
18 2 files changed, 20 insertions(+), 1 deletion(-)
19
20diff --git a/binutils/stabs.c b/binutils/stabs.c
21index f5c5d2d8e0..5d013cc361 100644
22--- a/binutils/stabs.c
23+++ b/binutils/stabs.c
24@@ -232,6 +232,10 @@ parse_number (const char **pp, bfd_boolean *poverflow)
25
26 orig = *pp;
27
28+ /* Stop early if we are passed an empty string. */
29+ if (*orig == 0)
30+ return (bfd_vma) 0;
31+
32 errno = 0;
33 ul = strtoul (*pp, (char **) pp, 0);
34 if (ul + 1 != 0 || errno == 0)
35@@ -1975,9 +1979,17 @@ parse_stab_enum_type (void *dhandle, const char **pp)
36 bfd_signed_vma val;
37
38 p = *pp;
39- while (*p != ':')
40+ while (*p != ':' && *p != 0)
41 ++p;
42
43+ if (*p == 0)
44+ {
45+ bad_stab (orig);
46+ free (names);
47+ free (values);
48+ return DEBUG_TYPE_NULL;
49+ }
50+
51 name = savestring (*pp, p - *pp);
52
53 *pp = p + 1;
54--
552.11.0
56