summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Heiko Becker <heirecka@exherbo.org> 2017-09-26 17:53:53 +0200
committerAvatar Heiko Becker <heirecka@exherbo.org> 2017-09-27 21:38:35 +0200
commite307934d72a792c0b837247ae4bf26130653ae55 (patch)
tree45118d962268357bd3406610ff284a74cffd7d0f
parentf8ff072036517f87109039811ed6077b620fdc18 (diff)
downloadarbor-e307934d72a792c0b837247ae4bf26130653ae55.tar.gz
arbor-e307934d72a792c0b837247ae4bf26130653ae55.tar.xz
binutils: Version bump to 2.29.1
-rw-r--r--metadata/repository_mask.conf7
-rw-r--r--packages/sys-devel/binutils/binutils-2.29.1.exheres-0 (renamed from packages/sys-devel/binutils/binutils-2.29.exheres-0)1
-rw-r--r--packages/sys-devel/binutils/files/binutils-x86-Guard-against-corrupted-PLT.patch56
3 files changed, 57 insertions, 7 deletions
diff --git a/metadata/repository_mask.conf b/metadata/repository_mask.conf
index 69bd8ae..8979240 100644
--- a/metadata/repository_mask.conf
+++ b/metadata/repository_mask.conf
@@ -854,13 +854,6 @@ sys-apps/less[>487] [[
description = [ Unfetchable, probably only a testing release ]
]]
-sys-devel/binutils[~2.29] [[
- author = [ Heiko Becker <heirecka@exherbo.org> ]
- date = [ 25 Jul 2017 ]
- token = toolchain-dev
- description = [ Latest binutils version ]
-]]
-
sys-libs/glibc[>=2.26] [[
author = [ Timo Gurr <tgurr@exherbo.org> ]
date = [ 07 Aug 2017 ]
diff --git a/packages/sys-devel/binutils/binutils-2.29.exheres-0 b/packages/sys-devel/binutils/binutils-2.29.1.exheres-0
index f83d1b8..b3d38bf 100644
--- a/packages/sys-devel/binutils/binutils-2.29.exheres-0
+++ b/packages/sys-devel/binutils/binutils-2.29.1.exheres-0
@@ -7,5 +7,6 @@ PLATFORMS="~amd64 ~arm ~armv7 ~x86"
DEFAULT_SRC_PREPARE_PATCHES+=(
"${FILES}/${PN}-2.29-support-canonical-windows-targets.patch"
+ "${FILES}"/${PN}-x86-Guard-against-corrupted-PLT.patch
)
diff --git a/packages/sys-devel/binutils/files/binutils-x86-Guard-against-corrupted-PLT.patch b/packages/sys-devel/binutils/files/binutils-x86-Guard-against-corrupted-PLT.patch
new file mode 100644
index 0000000..6cb350c
--- /dev/null
+++ b/packages/sys-devel/binutils/files/binutils-x86-Guard-against-corrupted-PLT.patch
@@ -0,0 +1,56 @@
+Upstream: yes
+Reason: CVE-2017-14729
+
+From 56933f9e3e90eebf1018ed7417d6c1184b91db6b Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Fri, 22 Sep 2017 14:15:40 -0700
+Subject: [PATCH] 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
+ * elf32-i386.c (elf_i386_get_synthetic_symtab): Guard against
+ corrupted PLT.
+ * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
+
+(cherry picked from commit 61e3bf5f83f7e505b6bc51ef65426e5b31e6e360)
+---
+ bfd/elf32-i386.c | 4 ++++
+ bfd/elf64-x86-64.c | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
+index 9dc2d25863..ba50c93f33 100644
+--- a/bfd/elf32-i386.c
++++ b/bfd/elf32-i386.c
+@@ -6616,6 +6616,10 @@ bad_return:
+ size += sizeof ("+0x") - 1 + 8;
+ n++;
+ s++;
++ /* 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;
+ }
+ offset += plt_entry_size;
+ }
+diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
+index 558db98c4a..d9225adddd 100644
+--- a/bfd/elf64-x86-64.c
++++ b/bfd/elf64-x86-64.c
+@@ -6970,6 +6970,10 @@ bad_return:
+ size += sizeof ("+0x") - 1 + 8 + 8 * ABI_64_P (abfd);
+ n++;
+ s++;
++ /* 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;
+ }
+ offset += plt_entry_size;
+ }
+--
+2.14.2
+