summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2018-7208.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2018-7208.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2018-7208.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2018-7208.patch b/meta/recipes-devtools/binutils/binutils/CVE-2018-7208.patch
new file mode 100644
index 0000000000..7d78db7eb3
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2018-7208.patch
@@ -0,0 +1,47 @@
1From eb77f6a4621795367a39cdd30957903af9dbb815 Mon Sep 17 00:00:00 2001
2From: Alan Modra <amodra@gmail.com>
3Date: Sat, 27 Jan 2018 08:19:33 +1030
4Subject: [PATCH] PR22741, objcopy segfault on fuzzed COFF object
5
6 PR 22741
7 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
8 range before converting to a symbol table pointer.
9
10Upstream-Status: Backport
11Affects: <= 2.30
12CVE: CVE-2018-7208
13Signed-off-by: Armin Kuster <akuster@mvista.com>
14
15---
16 bfd/ChangeLog | 6 ++++++
17 bfd/coffgen.c | 3 ++-
18 2 files changed, 8 insertions(+), 1 deletion(-)
19
20Index: git/bfd/coffgen.c
21===================================================================
22--- git.orig/bfd/coffgen.c
23+++ git/bfd/coffgen.c
24@@ -1555,7 +1555,8 @@ coff_pointerize_aux (bfd *abfd,
25 }
26 /* A negative tagndx is meaningless, but the SCO 3.2v4 cc can
27 generate one, so we must be careful to ignore it. */
28- if (auxent->u.auxent.x_sym.x_tagndx.l > 0)
29+ if ((unsigned long) auxent->u.auxent.x_sym.x_tagndx.l
30+ < obj_raw_syment_count (abfd))
31 {
32 auxent->u.auxent.x_sym.x_tagndx.p =
33 table_base + auxent->u.auxent.x_sym.x_tagndx.l;
34Index: git/bfd/ChangeLog
35===================================================================
36--- git.orig/bfd/ChangeLog
37+++ git/bfd/ChangeLog
38@@ -1,3 +1,9 @@
39+2018-01-29 Alan Modra <amodra@gmail.com>
40+
41+ PR 22741
42+ * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
43+ range before converting to a symbol table pointer.
44+
45 2018-02-06 Nick Clifton <nickc@redhat.com>
46
47 PR 22794