From 1d52f7c7b2eaae26bdd934648e5ac86f7eb8f0a3 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 17 Jul 2013 10:34:06 +0200 Subject: [PATCH] chroot-glibc, glibc: added patch from http://hmarco.org/bugs/CVE-2013-4788.html --- srcpkgs/chroot-glibc/template | 2 +- .../patches/ptr_mangle-eglibc-2.17.patch | 32 +++++++++++++++++++ srcpkgs/glibc/template | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/glibc/patches/ptr_mangle-eglibc-2.17.patch diff --git a/srcpkgs/chroot-glibc/template b/srcpkgs/chroot-glibc/template index d174e7128a4..702e4fc4f58 100644 --- a/srcpkgs/chroot-glibc/template +++ b/srcpkgs/chroot-glibc/template @@ -3,7 +3,7 @@ pkgname=chroot-glibc _majorver=2.17 version=${_majorver} wrksrc="glibc-${version}" -revision=8 +revision=9 short_desc="The GNU C library -- for xbps-src use" maintainer="Juan RP " homepage="http://www.gnu.org/software/libc" diff --git a/srcpkgs/glibc/patches/ptr_mangle-eglibc-2.17.patch b/srcpkgs/glibc/patches/ptr_mangle-eglibc-2.17.patch new file mode 100644 index 00000000000..5b79a3a56d3 --- /dev/null +++ b/srcpkgs/glibc/patches/ptr_mangle-eglibc-2.17.patch @@ -0,0 +1,32 @@ +See http://hmarco.org/bugs/CVE-2013-4788.html + +--- csu/libc-start.c 2012-12-25 04:02:13.000000000 +0100 ++++ csu/libc-start.c 2013-07-10 00:13:48.000000000 +0200 +@@ -38,6 +38,12 @@ extern void __pthread_initialize_minimal + in thread local area. */ + uintptr_t __stack_chk_guard attribute_relro; + # endif ++ ++# ifndef THREAD_SET_POINTER_GUARD ++uintptr_t __pointer_chk_guard_local ++ attribute_relro attribute_hidden __attribute__ ((nocommon)); ++# endif ++ + #endif + + #ifdef HAVE_PTR_NTHREADS +@@ -184,6 +190,14 @@ LIBC_START_MAIN (int (*main) (int, char + # else + __stack_chk_guard = stack_chk_guard; + # endif ++ uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random, ++ stack_chk_guard); ++# ifdef THREAD_SET_POINTER_GUARD ++ THREAD_SET_POINTER_GUARD (pointer_chk_guard); ++# else ++ __pointer_chk_guard_local = pointer_chk_guard; ++# endif ++ + #endif + + /* Register the destructor of the dynamic linker if there is any. */ diff --git a/srcpkgs/glibc/template b/srcpkgs/glibc/template index 7882def0890..d9a483314fe 100644 --- a/srcpkgs/glibc/template +++ b/srcpkgs/glibc/template @@ -1,7 +1,7 @@ # Template file for 'glibc' pkgname=glibc version=2.17 -revision=7 +revision=8 short_desc="The GNU C library" maintainer="Juan RP " homepage="http://www.gnu.org/software/libc"