1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-02 09:22:36 +02:00
libunwind-eh_elf/src/dwarf
Peter Wu 68a2910bae Check that the CIE is within the segment
Due to a bug in the gold linker[1], the .eh_frame and .eh_frame_hdr
sections contains garbage. When dwarf_extract_proc_info_from_fde tried
to look up the begin of the CIE subsection, it would underflow the
.eh_frame segment, resulting in a crash[2].

This patch avoids that crash by checking whether the CIE pointer is
located after the begin of the .eh_frame section. The variable "base"
was misused in various places as a boolean (decode as .debug_frame or
decode as .eh_frame). These instances have been renamed to
is_debug_frame where applicable.

Tested on Linux x86_64.

 [1]: https://sourceware.org/bugzilla/show_bug.cgi?id=17639
 [2]: http://lists.nongnu.org/archive/html/libunwind-devel/2014-11/msg00009.html

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-05 23:39:48 -08:00
..
Gexpr.c One time whitespace fixup. 2014-09-27 09:47:23 -07:00
Gfde.c Check that the CIE is within the segment 2014-12-05 23:39:48 -08:00
Gfind_proc_info-lsb.c Check that the CIE is within the segment 2014-12-05 23:39:48 -08:00
Gfind_unwind_table.c One time whitespace fixup. 2014-09-27 09:47:23 -07:00
global.c One time whitespace fixup. 2014-09-27 09:47:23 -07:00
Gparser.c One time whitespace fixup. 2014-09-27 09:47:23 -07:00
Gpe.c One time whitespace fixup. 2014-09-27 09:47:23 -07:00
Gstep.c One time whitespace fixup. 2014-09-27 09:47:23 -07:00
Lexpr.c Regenerate. 2004-08-17 15:34:28 +00:00
Lfde.c Regenerate. 2004-08-17 15:34:28 +00:00
Lfind_proc_info-lsb.c (Logical change 1.145) 2003-12-20 11:43:08 +00:00
Lfind_unwind_table.c Move some dwarf functionality from ptrace to dwarf 2012-03-12 20:06:37 -07:00
Lparser.c Regenerate. 2004-08-17 15:34:28 +00:00
Lpe.c Regenerate. 2004-08-17 15:34:28 +00:00
Lstep.c Regenerate. 2004-08-17 15:34:28 +00:00