[klibc] Latest kernel reports "process '/bin/sh' started with executable stack"

Ben Hutchings ben at decadent.org.uk
Fri Feb 28 16:43:51 PST 2020


On Thu, 2020-02-06 at 16:38 +0100, Christophe Leroy wrote:
> With latest kernel (Linus tree as of 5.6 merge window), I get the 
> following warning in the kernel 'dmesg':
> 
> [    5.746588] process '/bin/sh' started with executable stack
[...]
> Indeed, the stack is rwx, which is unexpected. And it is the case for 
> all klibc tools.
> 
> How can we fix that ?

Thanks for your report.  It turns out that the GNU assembler still
doesn't disable executable stacks by default, and we need to explicitly
tell it to do so.  I've just pushed a commit that appears to fix this;
can you test whether it fixes the warning for you?

Ben.

-- 
Ben Hutchings
It is easier to change the specification to fit the program
than vice versa.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zytor.com/archives/klibc/attachments/20200229/55062a23/attachment.sig>


More information about the klibc mailing list