From bb90ff781b744ecdb0404dd65040e258e4ece978 Mon Sep 17 00:00:00 2001 From: Yuanjie Huang Date: Wed, 15 Feb 2017 01:38:00 -0800 Subject: gcc: Fix CVE-2016-6131 in libiberty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [NVD] -- https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-6131 The demangler in GNU Libiberty allows remote attackers to cause a denial of service (infinite loop, stack overflow, and crash) via a cycle in the references of remembered mangled types. [BZ #71696] -- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71696 2016-08-04 Marcel Böhme PR c++/71696 * cplus-dem.c: Prevent infinite recursion when there is a cycle in the referencing of remembered mangled types. (work_stuff): New stack to keep track of the remembered mangled types that are currently being processed. (push_processed_type): New method to push currently processed remembered type onto the stack. (pop_processed_type): New method to pop currently processed remembered type from the stack. (work_stuff_copy_to_from): Copy values of new variables. (delete_non_B_K_work_stuff): Free stack memory. (demangle_args): Push/Pop currently processed remembered type. (do_type): Do not demangle a cyclic reference and push/pop referenced remembered type. cherry-picked from commit of git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239143 138bc75d-0d04-0410-961f-82ee72b054a4 (From OE-Core rev: 3c288b181a4cfecc80b48994f4dd2df285e4d1d0) (From OE-Core rev: 96a16c4181d18b8580dad243350d589586cb2b07) Signed-off-by: Yuanjie Huang Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-6.3.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'meta/recipes-devtools/gcc/gcc-6.3.inc') diff --git a/meta/recipes-devtools/gcc/gcc-6.3.inc b/meta/recipes-devtools/gcc/gcc-6.3.inc index ce414720ce..da7a083c08 100644 --- a/meta/recipes-devtools/gcc/gcc-6.3.inc +++ b/meta/recipes-devtools/gcc/gcc-6.3.inc @@ -82,7 +82,9 @@ SRC_URI = "\ file://0054_all_nopie-all-flags.patch \ ${BACKPORTS} \ " -BACKPORTS = "" +BACKPORTS = "\ + file://CVE-2016-6131.patch \ +" SRC_URI[md5sum] = "677a7623c7ef6ab99881bc4e048debb6" SRC_URI[sha256sum] = "f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f" -- cgit v1.2.3-54-g00ecf