This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/23509] CET enabled glibc is incompatible with the older linker


https://sourceware.org/bugzilla/show_bug.cgi?id=23509

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.28/master has been updated
       via  3e8d8dd5afba18a847ff7a80f473336f777cc329 (commit)
      from  fc0e3393ff775aa795b523083bb0db7f18d3b91e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3e8d8dd5afba18a847ff7a80f473336f777cc329

commit 3e8d8dd5afba18a847ff7a80f473336f777cc329
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Nov 8 10:06:58 2018 -0800

    Check multiple NT_GNU_PROPERTY_TYPE_0 notes [BZ #23509]

    Linkers group input note sections with the same name into one output
    note section with the same name.  One output note section is placed in
    one PT_NOTE segment.  Since new linkers merge input .note.gnu.property
    sections into one output .note.gnu.property section, there is only
    one NT_GNU_PROPERTY_TYPE_0 note in one PT_NOTE segment with new linkers.
    Since older linkers treat input .note.gnu.property section as a generic
    note section and just concatenate all input .note.gnu.property sections
    into one output .note.gnu.property section without merging them, we may
    see multiple NT_GNU_PROPERTY_TYPE_0 notes in one PT_NOTE segment with
    older linkers.

    When an older linker is used to created the program on CET-enabled OS,
    the linker output has a single .note.gnu.property section with multiple
    NT_GNU_PROPERTY_TYPE_0 notes, some of which have IBT and SHSTK enable
    bits set even if the program isn't CET enabled.  Such programs will
    crash on CET-enabled machines.  This patch updates the note parser:

    1. Skip note parsing if a NT_GNU_PROPERTY_TYPE_0 note has been processed.
    2. Check multiple NT_GNU_PROPERTY_TYPE_0 notes.

        [BZ #23509]
        * sysdeps/x86/dl-prop.h (_dl_process_cet_property_note): Skip
        note parsing if a NT_GNU_PROPERTY_TYPE_0 note has been processed.
        Update the l_cet field when processing NT_GNU_PROPERTY_TYPE_0 note.
        Check multiple NT_GNU_PROPERTY_TYPE_0 notes.
        * sysdeps/x86/link_map.h (l_cet): Expand to 3 bits,  Add
        lc_unknown.

    (cherry picked from commit d524fa6c35e675eedbd8fe6cdf4db0b49c658026)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |   10 +++++++++
 NEWS                   |    1 +
 sysdeps/x86/dl-prop.h  |   51 ++++++++++++++++++++++++++++++++++++++---------
 sysdeps/x86/link_map.h |    9 ++++---
 4 files changed, 57 insertions(+), 14 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]