diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-11-08 10:06:58 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-11-08 10:07:10 -0800 |
commit | d524fa6c35e675eedbd8fe6cdf4db0b49c658026 (patch) | |
tree | d1bc2b6df231383da1f36427fff3c758ba50b69d /benchtests/pow-inputs | |
parent | ac8060265bcaca61568ef3a20b9a0140a270af54 (diff) | |
download | glibc-d524fa6c35e675eedbd8fe6cdf4db0b49c658026.tar glibc-d524fa6c35e675eedbd8fe6cdf4db0b49c658026.tar.gz glibc-d524fa6c35e675eedbd8fe6cdf4db0b49c658026.tar.bz2 glibc-d524fa6c35e675eedbd8fe6cdf4db0b49c658026.zip |
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.
Diffstat (limited to 'benchtests/pow-inputs')
0 files changed, 0 insertions, 0 deletions