diff options
author | Fan Xin <fan.xin@jp.fujitsu.com> | 2017-05-24 14:43:11 +0900 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-05 23:30:21 +0100 |
commit | 13f7fc465588a3e5f0c616cc881cabcfd3ca808d (patch) | |
tree | 72ae027963685155bc73dee49203b5c299d0185a /meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch | |
parent | d2586b6fde626faeb65667a64b4d993a017a1d25 (diff) | |
download | poky-13f7fc465588a3e5f0c616cc881cabcfd3ca808d.tar.gz |
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 <fan.xin@jp.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch | 33 |
1 files changed, 33 insertions, 0 deletions
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 @@ | |||
1 | From 97e83a100aa8250be783304bfe0429761c6e6b6b Mon Sep 17 00:00:00 2001 | ||
2 | From: Alan Modra <amodra@gmail.com> | ||
3 | Date: Sun, 23 Apr 2017 13:55:49 +0930 | ||
4 | Subject: [PATCH] PR 21409, segfault in _bfd_dwarf2_find_nearest_line | ||
5 | |||
6 | PR 21409 | ||
7 | * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when | ||
8 | no symbols. | ||
9 | |||
10 | CVE: CVE-2017-8392 | ||
11 | Upstream-Status: Accepted | ||
12 | |||
13 | Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> | ||
14 | --- | ||
15 | bfd/dwarf2.c | 2 +- | ||
16 | 1 files changed, 1 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c | ||
19 | index 132a674..0ef3e1f 100644 | ||
20 | --- a/bfd/dwarf2.c | ||
21 | +++ b/bfd/dwarf2.c | ||
22 | @@ -4205,7 +4205,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, | ||
23 | looking up the function by section + offset uses the | ||
24 | DW_AT_decl_line from the function DW_TAG_subprogram for the line, | ||
25 | which will be the line of the function name. */ | ||
26 | - if ((section->flags & SEC_CODE) == 0) | ||
27 | + if (symbols != NULL && (section->flags & SEC_CODE) == 0) | ||
28 | { | ||
29 | asymbol **tmp; | ||
30 | |||
31 | -- | ||
32 | 1.9.1 | ||
33 | |||