diff options
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-5.3.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-5.3/CVE-2016-4488.patch | 73 |
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 | ||
95 | BACKPORTS = "" | 96 | BACKPORTS = "" |
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 @@ | |||
1 | From be3004dc350a820a5b0320b34bd05673ba534058 Mon Sep 17 00:00:00 2001 | ||
2 | From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Thu, 31 Mar 2016 17:20:53 +0000 | ||
4 | Subject: [PATCH] * cplus-dem.c (squangle_mop_up): Zero bsize/ksize | ||
5 | after freeing btypevec/ktypevec. * testsuite/demangle-expected: Add | ||
6 | coverage tests. | ||
7 | |||
8 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234645 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | CVE: CVE-2016-4488 | ||
12 | |||
13 | patched ChangeLog and demangle-expected as patch is from tip. | ||
14 | Signed-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 | |||
23 | Index: 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 | |||
41 | Index: 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) | ||
59 | Index: 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. | ||