diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch new file mode 100644 index 0000000000..c34a5a6ec9 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From f461bbd847f15657f3dd2f317c30c75a7520da1f Mon Sep 17 00:00:00 2001 | ||
2 | From: Nick Clifton <nickc@redhat.com> | ||
3 | Date: Wed, 14 Jun 2017 17:01:54 +0100 | ||
4 | Subject: [PATCH] Fix address violation bug when disassembling a corrupt SH | ||
5 | binary. | ||
6 | |||
7 | PR binutils/21578 | ||
8 | * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid | ||
9 | flag value. | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | CVE: CVE-2017-9744 | ||
13 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
14 | |||
15 | --- | ||
16 | bfd/ChangeLog | 6 ++++++ | ||
17 | bfd/elf32-sh.c | 2 +- | ||
18 | 2 files changed, 7 insertions(+), 1 deletion(-) | ||
19 | |||
20 | Index: git/bfd/elf32-sh.c | ||
21 | =================================================================== | ||
22 | --- git.orig/bfd/elf32-sh.c | ||
23 | +++ git/bfd/elf32-sh.c | ||
24 | @@ -6344,7 +6344,7 @@ sh_elf_set_mach_from_flags (bfd *abfd) | ||
25 | { | ||
26 | flagword flags = elf_elfheader (abfd)->e_flags & EF_SH_MACH_MASK; | ||
27 | |||
28 | - if (flags >= sizeof(sh_ef_bfd_table)) | ||
29 | + if (flags >= ARRAY_SIZE (sh_ef_bfd_table)) | ||
30 | return FALSE; | ||
31 | |||
32 | if (sh_ef_bfd_table[flags] == 0) | ||
33 | Index: git/bfd/ChangeLog | ||
34 | =================================================================== | ||
35 | --- git.orig/bfd/ChangeLog | ||
36 | +++ git/bfd/ChangeLog | ||
37 | @@ -1,3 +1,9 @@ | ||
38 | +2017-06-14 Nick Clifton <nickc@redhat.com> | ||
39 | + | ||
40 | + PR binutils/21578 | ||
41 | + * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid | ||
42 | + flag value. | ||
43 | + | ||
44 | 2017-04-29 Alan Modra <amodra@gmail.com> | ||
45 | |||
46 | PR 21432 | ||