aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-14729.patch
blob: 09d51438299d78672e2a8028ab674b83e371bd4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
commit 61e3bf5f83f7e505b6bc51ef65426e5b31e6e360
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Sep 22 14:15:40 2017 -0700

x86: Guard against corrupted PLT

There should be only one entry in PLT for a given symbol.  Set howto to
NULL after processing a PLT entry to guard against corrupted PLT so that
the duplicated PLT entries are skipped.

PR binutils/22170

Upstream-Status: Backport

CVE: CVE-2017-14729
Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
Index: git/bfd/elf-ifunc.c
===================================================================
--- git.orig/bfd/elf-ifunc.c	2017-11-08 12:34:22.063320490 +0530
+++ git/bfd/elf-ifunc.c	2017-11-08 12:34:29.995404891 +0530
@@ -473,6 +473,10 @@
       memcpy (names, "@plt", sizeof ("@plt"));
       names += sizeof ("@plt");
       ++s, ++n;
+      /* There should be only one entry in PLT for a given 
+         symbol.  Set howto to NULL after processing a PLT 
+         entry to guard against corrupted PLT.  */
+      p->howto = NULL;	
     }
 
   free (plt_sym_val);
Index: git/bfd/ChangeLog
===================================================================
--- git.orig/bfd/ChangeLog	2017-11-08 12:34:29.939404297 +0530
+++ git/bfd/ChangeLog	2017-11-08 12:35:55.660271599 +0530
@@ -1,3 +1,9 @@
+2017-09-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/22170
+       * elf-ifunc.c (elf_get_synthetic_symtab): Guard against
+       corrupted PLT.
+
 2017-07-27  Nick Clifton  <nickc@redhat.com>
 
        PR 21840