From c154de49bc4de428b3c62cb62e94dfc64b004b72 Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Sun, 18 Jan 2004 09:59:52 +0000 Subject: Do not add sections to a PT_GNU_STACK segment, which might be a possible security issue, bug #37033. http://sources.redhat.com/ml/binutils/2003-12/msg00205.html Also bump x86 to stable, and do not drop already stable archs from -r3 to testing, as it is a crusial patch. --- ...nutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch | 22 ++++++++++++++++++++++ .../binutils/files/digest-binutils-2.14.90.0.7-r4 | 1 + 2 files changed, 23 insertions(+) create mode 100644 sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch create mode 100644 sys-devel/binutils/files/digest-binutils-2.14.90.0.7-r4 (limited to 'sys-devel/binutils/files') diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch new file mode 100644 index 000000000000..7b98ac88757d --- /dev/null +++ b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch @@ -0,0 +1,22 @@ +--- bfd/elf.c.orig 2004-01-14 05:11:43.000000000 -0500 ++++ bfd/elf.c 2004-01-14 05:18:51.000000000 -0500 +@@ -4648,8 +4648,9 @@ + 2. It is an allocated segment, + 3. There is an output section associated with it, + 4. The section has not already been allocated to a previous segment. +- 5. PT_TLS segment includes only SHF_TLS sections. +- 6. SHF_TLS sections are only in PT_TLS or PT_LOAD segments. */ ++ 5. PT_GNU_STACK segments do not include any sections. ++ 6. PT_TLS segment includes only SHF_TLS sections. ++ 7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments. */ + #define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed) \ + ((((segment->p_paddr \ + ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \ +@@ -4657,6 +4659,7 @@ + && (section->flags & SEC_ALLOC) != 0) \ + || IS_COREFILE_NOTE (segment, section)) \ + && section->output_section != NULL \ ++ && segment->p_type != PT_GNU_STACK \ + && (segment->p_type != PT_TLS \ + || (section->flags & SEC_THREAD_LOCAL)) \ + && (segment->p_type == PT_LOAD \ diff --git a/sys-devel/binutils/files/digest-binutils-2.14.90.0.7-r4 b/sys-devel/binutils/files/digest-binutils-2.14.90.0.7-r4 new file mode 100644 index 000000000000..07f652ab2119 --- /dev/null +++ b/sys-devel/binutils/files/digest-binutils-2.14.90.0.7-r4 @@ -0,0 +1 @@ +MD5 b5b1608f7308c487c0f3af8e4592a71a binutils-2.14.90.0.7.tar.bz2 10575077 -- cgit v1.2.3-65-gdbad