<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 12, 2015 at 12:50 AM, George Rimar <span dir="ltr"><<a href="mailto:grimar@accesssoftek.com" target="_blank">grimar@accesssoftek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">grimar added a comment.<br>
<br>
I would also suggest to think about changing the default logic from "stack is always executable by default" to opposite one. At least for some targets.<br>
I dont think there are many apps that uses executable stacks. But having it executable is huge security hole.<br>
We can implement -z execstack/-z noexecstack to control that for those who heeds executable one.<br></blockquote><div><br></div><div>I think that's a good suggestion, but that made me think of this: we may want to force users to specify -z execstack if they really want to make the stack executable. To me, controlling the stack executable-ness using .note.GNU-stack section is too subtle and fragile. If you have thousands of object files, and only one file lacks .note.GNU-stack, the entire program's stack will be executable. It's unlikely to be an intended behavior, and if it is actually intended, I believe it is reasonable to tell so to the linker using the -z flag.</div><div><br></div><div>So I guess my point is</div><div><br></div><div> - ignore .note.GNU-stack sections at all,</div><div> - make stack non-executable by default,</div><div> - and implement -z execstack</div><div><br></div><div>What do you think?</div></div></div></div>