summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.3.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.3/CVE-2016-4488.patch73
2 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-5.3.inc b/meta/recipes-devtools/gcc/gcc-5.3.inc
index 897c1f9a75..c75d07ebce 100644
--- a/meta/recipes-devtools/gcc/gcc-5.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-5.3.inc
@@ -90,6 +90,7 @@ SRC_URI = "\
90 file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \ 90 file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \
91 file://0059-libgcc-use-ldflags.patch \ 91 file://0059-libgcc-use-ldflags.patch \
92 file://0060-remove-prototypes-cfns.patch \ 92 file://0060-remove-prototypes-cfns.patch \
93 file://CVE-2016-4488.patch \
93" 94"
94 95
95BACKPORTS = "" 96BACKPORTS = ""
diff --git a/meta/recipes-devtools/gcc/gcc-5.3/CVE-2016-4488.patch b/meta/recipes-devtools/gcc/gcc-5.3/CVE-2016-4488.patch
new file mode 100644
index 0000000000..30e0ffeace
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-5.3/CVE-2016-4488.patch
@@ -0,0 +1,73 @@
1From be3004dc350a820a5b0320b34bd05673ba534058 Mon Sep 17 00:00:00 2001
2From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Thu, 31 Mar 2016 17:20:53 +0000
4Subject: [PATCH] * cplus-dem.c (squangle_mop_up): Zero bsize/ksize
5 after freeing btypevec/ktypevec. * testsuite/demangle-expected: Add
6 coverage tests.
7
8git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234645 138bc75d-0d04-0410-961f-82ee72b054a4
9
10Upstream-Status: Backport
11CVE: CVE-2016-4488
12
13patched ChangeLog and demangle-expected as patch is from tip.
14Signed-off-by: Armin Kuster <akuster@mvista.com>
15
16
17---
18 libiberty/ChangeLog | 7 +++++++
19 libiberty/cplus-dem.c | 2 ++
20 libiberty/testsuite/demangle-expected | 10 ++++++++++
21 3 files changed, 19 insertions(+)
22
23Index: gcc-5.3.0/libiberty/cplus-dem.c
24===================================================================
25--- gcc-5.3.0.orig/libiberty/cplus-dem.c
26+++ gcc-5.3.0/libiberty/cplus-dem.c
27@@ -1237,11 +1237,13 @@ squangle_mop_up (struct work_stuff *work
28 {
29 free ((char *) work -> btypevec);
30 work->btypevec = NULL;
31+ work->bsize = 0;
32 }
33 if (work -> ktypevec != NULL)
34 {
35 free ((char *) work -> ktypevec);
36 work->ktypevec = NULL;
37+ work->ksize = 0;
38 }
39 }
40
41Index: gcc-5.3.0/libiberty/testsuite/demangle-expected
42===================================================================
43--- gcc-5.3.0.orig/libiberty/testsuite/demangle-expected
44+++ gcc-5.3.0/libiberty/testsuite/demangle-expected
45@@ -4356,3 +4356,13 @@ _QueueNotification_QueueController__$4PP
46 --format=gnu-v3
47 _Z1fSsB3fooS_
48 f(std::string[abi:foo], std::string[abi:foo])
49+#
50+# Tests a use-after-free problem
51+
52+_Q.__0
53+::Q.(void)
54+#
55+# Tests a use-after-free problem
56+
57+_Q10-__9cafebabe.
58+cafebabe.::-(void)
59Index: gcc-5.3.0/libiberty/ChangeLog
60===================================================================
61--- gcc-5.3.0.orig/libiberty/ChangeLog
62+++ gcc-5.3.0/libiberty/ChangeLog
63@@ -1,3 +1,10 @@
64+2016-03-31 Mikhail Maltsev <maltsevm@gmail.com>
65+ Marcel Bohme boehme.marcel@gmail.com
66+
67+ * cplus-dem.c (squangle_mop_up): Zero bsize/ksize after freeing
68+ btypevec/ktypevec.
69+ * testsuite/demangle-expected: Add coverage tests.
70+
71 2015-12-04 Release Manager
72
73 * GCC 5.3.0 released.