1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-22 07:37:38 +01:00
libunwind-eh_elf/include
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
..
tdep Add TileGx platform support to libunwind. 2014-09-08 16:21:53 -04:00
tdep-aarch64 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-arm One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-hppa One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-ia64 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-mips One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-ppc32 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-ppc64 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-sh One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-tilegx Add TileGx platform support to libunwind. 2014-09-08 16:21:53 -04:00
tdep-x86 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-x86_64 Store location type in local unwinding mode for x86_64 2014-10-04 09:04:08 -07:00
x86 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
compiler.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
dwarf-eh.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
dwarf.h Check that the CIE is within the segment 2014-12-05 23:39:48 -08:00
dwarf_i.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-aarch64.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-arm.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-common.h.in Export unw_backtrace() and alias backtrace() to it. 2011-04-01 00:00:33 -07:00
libunwind-coredump.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-dynamic.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-hppa.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-ia64.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-mips.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-ppc32.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-ppc64.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-ptrace.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-sh.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-tilegx.h Add TileGx platform support to libunwind. 2014-09-08 16:21:53 -04:00
libunwind-x86.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-x86_64.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind.h.in Add TileGx platform support to libunwind. 2014-09-08 16:21:53 -04:00
libunwind_i.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
mempool.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
remote.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
unwind.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00