V2 [PATCH] Check multiple NT_GNU_PROPERTY_TYPE_0 notes [BZ #23509]
H.J. Lu
hjl.tools@gmail.com
Sun Aug 26 14:52:00 GMT 2018
On Tue, Aug 14, 2018 at 10:32 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> The older linker treats .note.gnu.property section as a generic note
> section and just concatenates all .note.gnu.property sections from the
> inputs to the output. When the older linker is used to created the
> program on CET-enabled OS, the generated output has .note.gnu.property
> section with multiple NT_GNU_PROPERTY_TYPE_0 notes whose IBT and SHSTK
> enable bits are set even if the program isn't CET enabled. Such program
> 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.
>
> OK for master?
>
> H.J.
> ---
> [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.
Here is the updated patch which passed CET smoke test:
https://github.com/hjl-tools/cet-smoke-test
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Check-multiple-NT_GNU_PROPERTY_TYPE_0-notes-BZ-23509.patch
Type: text/x-patch
Size: 5197 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20180826/78fa73a6/attachment.bin>
More information about the Libc-alpha
mailing list