public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* RFC: Should we have all targets default to only creating an executable stack when explicitly requested ?
@ 2022-04-21 11:28 Nick Clifton
  2022-04-21 11:44 ` Jan Beulich
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Nick Clifton @ 2022-04-21 11:28 UTC (permalink / raw)
  To: Binutils

Hi Guys,

    PR 29072 has brought up the issue of executable stacks.

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

   Currently the bfd linker will create an executable stack if explicitly
   requested to do so, either via the '-z execstack' option, or via the
   presence of a .note-GNU-stack section which has the SHF_EXECINSTR flag
   set.

   In addition, for targets like the x86_64 and s390x the linker will also
   create an executable stack if any linked object file does not have a
   .note.GNU-stack section.  (Such an occurrence is especially common for
   hand crafted assembler source files).  This can result in programs
   gaining an executable stack even when the user is not expecting it.

   Other targets such as AArch64 and PowerPC do not this.  Instead they
   just ignore object files with missing .note.GNU-stack sections.

   A proposal has been made that all targets should ignore missing
   .note.GNU-stack sections, and the linker should only ever create an
   executable stack if explicitly requested by one of the two methods
   described in the second paragraph.  I am inclined to agree with this
   proposal, but I would like to see if anyone has any objections or
   comments first.

   It is possible that such a change will break applications that rely
   upon the current behaviour.  But, in my opinion, this would actually
   be a good thing.  Applications with an executable stack are a security
   risk, and they ought to be reviewed.  If an exectuable stack really
   is needed then it can be explicitly requested via the '-z execstack'
   command line option.

   Thoughts ?

Cheers
   Nick


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-04-25 13:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 11:28 RFC: Should we have all targets default to only creating an executable stack when explicitly requested ? Nick Clifton
2022-04-21 11:44 ` Jan Beulich
2022-04-21 14:44   ` Nick Clifton
2022-04-21 15:31     ` Jan Beulich
2022-04-21 11:52 ` Andreas Schwab
2022-04-21 15:00 ` Michael Matz
2022-04-21 16:00   ` Andreas Schwab
2022-04-22 11:11   ` Nick Clifton
2022-04-25 13:25     ` Michael Matz
2022-04-22 11:41 ` Martin Liška
2022-04-25 13:46 ` Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).