SHA256
1
0
forked from pool/glibc

- startcontext-cantunwind.patch: mark __startcontext as .cantunwind

(bsc#974800, BZ #20435)

OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=445
This commit is contained in:
Andreas Schwab 2016-08-09 11:48:33 +00:00 committed by Git OBS Bridge
parent e7e38a09c4
commit d4fa8c9010
9 changed files with 55 additions and 45 deletions

View File

@ -1,6 +1,6 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="versionformat">2.23.90.%cd.g%h</param>
<param name="versionformat">2.24.90.%cd.g%h</param>
<param name="url">git://sourceware.org/git/glibc</param>
<param name="scm">git</param>
</service>

View File

@ -28,7 +28,8 @@ Tue Aug 2 13:55:44 UTC 2016 - schwab@suse.de
* The IPv6 name server management code in libresolv could result in a
memory leak for each thread which is created, performs a failing
naming lookup, and exits (CVE-2016-5417)
- setcontext-unwind-info.patch: Add EABI unwind info for setcontext on arm
- startcontext-cantunwind.patch: mark __startcontext as .cantunwind
(bsc#974800, BZ #20435)
- Removed patches:
* 0001-Updated-translations-for-2.23.patch
* 0002-Regenerate-libc.pot-for-2.23.patch

View File

@ -267,8 +267,8 @@ Patch2005: nss-files-long-lines-2.patch
Patch2006: iconv-reset-input-buffer.patch
# PATCH-FIX-UPSTREAM Reinitialize dl_load_write_lock on fork (BZ #19282)
Patch2008: reinitialize-dl_load_write_lock.patch
# PATCH-FIX-UPSTREAM Add EABI unwind info to setcontext for arm
Patch2009: setcontext-unwind-info.patch
# PATCH-FIX-UPSTREAM ARM: mark __startcontext as .cantunwind (BZ #20435)
Patch2009: startcontext-cantunwind.patch
# Non-glibc patches
# PATCH-FIX-OPENSUSE Remove debianisms from manpages

View File

@ -28,7 +28,8 @@ Tue Aug 2 13:55:44 UTC 2016 - schwab@suse.de
* The IPv6 name server management code in libresolv could result in a
memory leak for each thread which is created, performs a failing
naming lookup, and exits (CVE-2016-5417)
- setcontext-unwind-info.patch: Add EABI unwind info for setcontext on arm
- startcontext-cantunwind.patch: mark __startcontext as .cantunwind
(bsc#974800, BZ #20435)
- Removed patches:
* 0001-Updated-translations-for-2.23.patch
* 0002-Regenerate-libc.pot-for-2.23.patch

View File

@ -266,8 +266,8 @@ Patch2005: nss-files-long-lines-2.patch
Patch2006: iconv-reset-input-buffer.patch
# PATCH-FIX-UPSTREAM Reinitialize dl_load_write_lock on fork (BZ #19282)
Patch2008: reinitialize-dl_load_write_lock.patch
# PATCH-FIX-UPSTREAM Add EABI unwind info to setcontext for arm
Patch2009: setcontext-unwind-info.patch
# PATCH-FIX-UPSTREAM ARM: mark __startcontext as .cantunwind (BZ #20435)
Patch2009: startcontext-cantunwind.patch
# Non-glibc patches
# PATCH-FIX-OPENSUSE Remove debianisms from manpages

View File

@ -28,7 +28,8 @@ Tue Aug 2 13:55:44 UTC 2016 - schwab@suse.de
* The IPv6 name server management code in libresolv could result in a
memory leak for each thread which is created, performs a failing
naming lookup, and exits (CVE-2016-5417)
- setcontext-unwind-info.patch: Add EABI unwind info for setcontext on arm
- startcontext-cantunwind.patch: mark __startcontext as .cantunwind
(bsc#974800, BZ #20435)
- Removed patches:
* 0001-Updated-translations-for-2.23.patch
* 0002-Regenerate-libc.pot-for-2.23.patch

View File

@ -267,8 +267,8 @@ Patch2005: nss-files-long-lines-2.patch
Patch2006: iconv-reset-input-buffer.patch
# PATCH-FIX-UPSTREAM Reinitialize dl_load_write_lock on fork (BZ #19282)
Patch2008: reinitialize-dl_load_write_lock.patch
# PATCH-FIX-UPSTREAM Add EABI unwind info to setcontext for arm
Patch2009: setcontext-unwind-info.patch
# PATCH-FIX-UPSTREAM ARM: mark __startcontext as .cantunwind (BZ #20435)
Patch2009: startcontext-cantunwind.patch
# Non-glibc patches
# PATCH-FIX-OPENSUSE Remove debianisms from manpages

View File

@ -1,35 +0,0 @@
From f4704b4ed4485f092fef19694a15fa5fa891b8ed Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Mon, 8 Aug 2016 09:29:18 +0200
Subject: [PATCH] Add EABI unwind info to setcontext for arm
[BZ #20435]
* sysdeps/unix/sysv/linux/arm/setcontext.S (__setcontext): Mark as
.cantunwind.
---
sysdeps/unix/sysv/linux/arm/setcontext.S | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S
index 603e508..233d0ef 100644
--- a/sysdeps/unix/sysv/linux/arm/setcontext.S
+++ b/sysdeps/unix/sysv/linux/arm/setcontext.S
@@ -74,12 +74,15 @@ ENTRY(__setcontext)
mov r2, #0
bl PLTJMP(__sigprocmask)
+ .fnstart
/* Loading r0-r3 makes makecontext easier. */
add r14, r4, #MCONTEXT_ARM_R0
ldmia r14, {r0-r12}
ldr r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)]
add r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0)
ldmia r14, {r14, pc}
+ .cantunwind
+ .fnend
END(setcontext)
weak_alias(__setcontext, setcontext)
--
2.9.2

View File

@ -0,0 +1,42 @@
From 1061d6fe364ddac7458a872839ea9efe8f7600f0 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Mon, 8 Aug 2016 09:29:18 +0200
Subject: [PATCH] arm: mark __startcontext as .cantunwind
__startcontext marks the bottom of the call stack of the contexts created
by makecontext.
[BZ #20435]
* sysdeps/unix/sysv/linux/arm/setcontext.S (__startcontext): Mark
as .cantunwind.
---
sysdeps/unix/sysv/linux/arm/setcontext.S | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S
index 603e508..d1f168f 100644
--- a/sysdeps/unix/sysv/linux/arm/setcontext.S
+++ b/sysdeps/unix/sysv/linux/arm/setcontext.S
@@ -86,12 +86,19 @@ weak_alias(__setcontext, setcontext)
/* Called when a makecontext() context returns. Start the
context in R4 or fall through to exit(). */
+ /* Unwind descriptors are looked up based on PC - 2, so we have to
+ make sure to mark the instruction preceding the __startcontext
+ label as .cantunwind. */
+ .fnstart
+ .cantunwind
+ nop
ENTRY(__startcontext)
movs r0, r4
bne PLTJMP(__setcontext)
@ New context was 0 - exit
b PLTJMP(HIDDEN_JUMPTARGET(exit))
+ .fnend
END(__startcontext)
#ifdef PIC
--
2.9.2