From 13f7fc465588a3e5f0c616cc881cabcfd3ca808d Mon Sep 17 00:00:00 2001 From: Fan Xin Date: Wed, 24 May 2017 14:43:11 +0900 Subject: binutils: Fix CVE-2017-8392 Backport upsream commit to fix CVE-2017-8392 CVE: CVE-2017-8392 [BZ 21409] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21409 PR 21409, segfault in _bfd_dwarf2_find_nearest_line PR 21409 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when no symbols. (From OE-Core rev: dff01b827c87ae135a1d5511b1efbdad01c0eaee) (From OE-Core rev: c5a5017ce710108c61dba0e0af72bb72a9419701) Signed-off-by: Fan Xin Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- ...segfault-in-_bfd_dwarf2_find_nearest_line.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch (limited to 'meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch') diff --git a/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch b/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch new file mode 100644 index 0000000000..acb37df168 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch @@ -0,0 +1,33 @@ +From 97e83a100aa8250be783304bfe0429761c6e6b6b Mon Sep 17 00:00:00 2001 +From: Alan Modra +Date: Sun, 23 Apr 2017 13:55:49 +0930 +Subject: [PATCH] PR 21409, segfault in _bfd_dwarf2_find_nearest_line + + PR 21409 + * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when + no symbols. + +CVE: CVE-2017-8392 +Upstream-Status: Accepted + +Signed-off-by: Fan Xin +--- + bfd/dwarf2.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c +index 132a674..0ef3e1f 100644 +--- a/bfd/dwarf2.c ++++ b/bfd/dwarf2.c +@@ -4205,7 +4205,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, + looking up the function by section + offset uses the + DW_AT_decl_line from the function DW_TAG_subprogram for the line, + which will be the line of the function name. */ +- if ((section->flags & SEC_CODE) == 0) ++ if (symbols != NULL && (section->flags & SEC_CODE) == 0) + { + asymbol **tmp; + +-- +1.9.1 + -- cgit v1.2.3-54-g00ecf