summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2018-20651.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2018-20651.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2018-20651.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2018-20651.patch b/meta/recipes-devtools/binutils/binutils/CVE-2018-20651.patch
new file mode 100644
index 0000000000..24fb031223
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2018-20651.patch
@@ -0,0 +1,35 @@
1From 6a29d95602b09bb83d2c82b45ed935157fb780aa Mon Sep 17 00:00:00 2001
2From: Alan Modra <amodra@gmail.com>
3Date: Mon, 31 Dec 2018 15:40:08 +1030
4Subject: [PATCH] PR24041, Invalid Memory Address Dereference in
5 elf_link_add_object_symbols
6
7 PR 24041
8 * elflink.c (elf_link_add_object_symbols): Don't segfault on
9 crafted ET_DYN with no program headers.
10
11CVE: CVE-2018-20651
12Upstream-Status: Backport
13[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=54025d5812ff100f5f0654eb7e1ffd50f2e37f5f]
14
15Signed-off-by: Dan Tran <dantran@microsoft.com>
16---
17 bfd/elflink.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/bfd/elflink.c b/bfd/elflink.c
21index 46091b6341..557c550082 100644
22--- a/bfd/elflink.c
23+++ b/bfd/elflink.c
24@@ -4178,7 +4178,7 @@ error_free_dyn:
25 all sections contained fully therein. This makes relro
26 shared library sections appear as they will at run-time. */
27 phdr = elf_tdata (abfd)->phdr + elf_elfheader (abfd)->e_phnum;
28- while (--phdr >= elf_tdata (abfd)->phdr)
29+ while (phdr-- > elf_tdata (abfd)->phdr)
30 if (phdr->p_type == PT_GNU_RELRO)
31 {
32 for (s = abfd->sections; s != NULL; s = s->next)
33--
342.22.0.vfs.1.1.57.gbaf16c8
35