Date: Fri, 7 Sep 2012 18:03:29 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r240208 - in stable: 7/contrib/binutils/binutils 8/contrib/binutils/binutils 9/contrib/binutils/binutils Message-ID: <201209071803.q87I3Tvu040772@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Fri Sep 7 18:03:29 2012 New Revision: 240208 URL: http://svn.freebsd.org/changeset/base/240208 Log: MFC r239962: Fix a twelve year old bug in readelf: when process_dynamic_segment() encounters a DT_RUNPATH entry, the global dynamic_info[] array is overrun, causing some other global variable to be overwritten. In my testcase, this was the section_headers variable, leading to segfaults or jemalloc assertions when it was freed later on. Thanks to Koop Mast for providing samples of a few "bad" .so files. Modified: stable/8/contrib/binutils/binutils/readelf.c Directory Properties: stable/8/contrib/binutils/ (props changed) Changes in other areas also in this revision: Modified: stable/7/contrib/binutils/binutils/readelf.c stable/9/contrib/binutils/binutils/readelf.c Directory Properties: stable/7/contrib/binutils/ (props changed) stable/9/contrib/binutils/ (props changed) Modified: stable/8/contrib/binutils/binutils/readelf.c ============================================================================== --- stable/8/contrib/binutils/binutils/readelf.c Fri Sep 7 17:58:36 2012 (r240207) +++ stable/8/contrib/binutils/binutils/readelf.c Fri Sep 7 18:03:29 2012 (r240208) @@ -128,7 +128,7 @@ Elf_Internal_Syminfo *dynamic_syminfo; unsigned long dynamic_syminfo_offset; unsigned int dynamic_syminfo_nent; char program_interpreter[64]; -bfd_vma dynamic_info[DT_JMPREL + 1]; +bfd_vma dynamic_info[DT_ENCODING]; bfd_vma version_info[16]; Elf_Internal_Ehdr elf_header; Elf_Internal_Shdr *section_headers;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209071803.q87I3Tvu040772>