summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0027-arm-mark-__startcontext-as-.cantunwind-bug-20435.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0027-arm-mark-__startcontext-as-.cantunwind-bug-20435.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/0027-arm-mark-__startcontext-as-.cantunwind-bug-20435.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0027-arm-mark-__startcontext-as-.cantunwind-bug-20435.patch b/meta/recipes-core/glibc/glibc/0027-arm-mark-__startcontext-as-.cantunwind-bug-20435.patch
new file mode 100644
index 0000000000..95067d37a5
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0027-arm-mark-__startcontext-as-.cantunwind-bug-20435.patch
@@ -0,0 +1,46 @@
1Backport patch to fix CVE-2016-6323 for glibc. And remove the section of
2ChangeLog which can't be applied.
3
4Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9e2ff6c]
5CVE: CVE-2016-6323
6Signed-off-by: Kai Kang <kai.kang@windriver.com>
7---
8From 9e2ff6c9cc54c0b4402b8d49e4abe7000fde7617 Mon Sep 17 00:00:00 2001
9From: Andreas Schwab <schwab@suse.de>
10Date: Mon, 8 Aug 2016 09:29:18 +0200
11Subject: [PATCH] arm: mark __startcontext as .cantunwind (bug 20435)
12
13__startcontext marks the bottom of the call stack of the contexts created
14by makecontext.
15---
16 ChangeLog | 6 ++++++
17 sysdeps/unix/sysv/linux/arm/setcontext.S | 7 +++++++
18 2 files changed, 13 insertions(+)
19
20diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S
21index 603e508..d1f168f 100644
22--- a/sysdeps/unix/sysv/linux/arm/setcontext.S
23+++ b/sysdeps/unix/sysv/linux/arm/setcontext.S
24@@ -86,12 +86,19 @@ weak_alias(__setcontext, setcontext)
25
26 /* Called when a makecontext() context returns. Start the
27 context in R4 or fall through to exit(). */
28+ /* Unwind descriptors are looked up based on PC - 2, so we have to
29+ make sure to mark the instruction preceding the __startcontext
30+ label as .cantunwind. */
31+ .fnstart
32+ .cantunwind
33+ nop
34 ENTRY(__startcontext)
35 movs r0, r4
36 bne PLTJMP(__setcontext)
37
38 @ New context was 0 - exit
39 b PLTJMP(HIDDEN_JUMPTARGET(exit))
40+ .fnend
41 END(__startcontext)
42
43 #ifdef PIC
44--
452.10.1
46