Discussion:
Bug#757052: dietlibc-dev: programs made with diet have executable stacks
Thorsten Glaser
2014-08-05 07:50:56 UTC
Permalink
tags 757052 + upstream
thanks
all programs made with diet gcc ...
have executable stacks. They should not.
Some tiny programs I tried worked after=20
execstack -c prog
to clear the executable stack flag.
Hello Felix,

can you say anything about this?

Thanks,
//mirabilos
--=20
=E2=80=9Cah that reminds me, thanks for the stellar entertainment that you =
and certain
other people provide on the Debian mailing lists =E2=94=82 sole reason I su=
bscribed to
them (I'm not using Debian anywhere) is the entertainment factor =E2=94=82 =
Debian does
not strike me as a place for good humour, much less German admin-style humo=
ur=E2=80=9D
Thorsten Glaser
2014-08-05 13:25:14 UTC
Permalink
all programs made with diet gcc ...
have executable stacks. They should not.
Some tiny programs I tried worked after=20
execstack -c prog
to clear the executable stack flag.
Hello Felix,

can you say anything about this?

Thanks,
//mirabilos
--=20
=E2=80=9Cah that reminds me, thanks for the stellar entertainment that you =
and certain
other people provide on the Debian mailing lists =E2=94=82 sole reason I su=
bscribed to
them (I'm not using Debian anywhere) is the entertainment factor =E2=94=82 =
Debian does
not strike me as a place for good humour, much less German admin-style humo=
ur=E2=80=9D
Frank Bergmann
2014-08-05 14:35:30 UTC
Permalink
Hi,

IMHO it's the responsibility of the distributor to take care of this.

And many fail. Also big Larry:
http://www.tuxad.de/blog/archives/2012/07/17/oracle_instant_client_rpm_failure/index.html
;-)

Frank
Post by Thorsten Glaser
all programs made with diet gcc ...
have executable stacks. They should not.
Some tiny programs I tried worked after
execstack -c prog
to clear the executable stack flag.
Hello Felix,
can you say anything about this?
Thanks,
//mirabilos
Thorsten Glaser
2014-08-05 14:39:15 UTC
Permalink
Post by Frank Bergmann
IMHO it's the responsibility of the distributor to take care of this.
No, this is clearly something that the toolchain is to deal with.

bye,
//mirabilos
--=20
=C2=ABMyISAM tables -will- get corrupted eventually. This is a fact of life=
=2E =C2=BB
=E2=80=9Cmysql is about as much database as ms access=E2=80=9D =E2=80=93 =
=E2=80=9CMSSQL at least descends
from a database=E2=80=9D =E2=80=9Cit's a rebranded SyBase=E2=80=9D =E2=80=
=9CMySQL however was born from a
flatfile and went downhill from there=E2=80=9D =E2=80=93 =E2=80=9Cat least =
jetDB doesn=E2=80=99t claim to
be a database=E2=80=9D=09=E2=80=A3=E2=80=A3=E2=80=A3 Please, http://deb.li/=
mysql and MariaDB, finally die!
Frank Bergmann
2014-08-05 14:53:06 UTC
Permalink
Post by Thorsten Glaser
Post by Frank Bergmann
IMHO it's the responsibility of the distributor to take care of this.
No, this is clearly something that the toolchain is to deal with.
Of course. But what happens if you rely on it?
=> Be safe. Distributor/Packager should check.

The days of tgz are gone. And packagers must tune tarballs for distributing as packages.
It's best to fix it in the tarball AND the package.
Felix von Leitner
2014-08-05 21:58:34 UTC
Permalink
Post by Thorsten Glaser
all programs made with diet gcc ...
have executable stacks. They should not.
Some tiny programs I tried worked after
execstack -c prog
to clear the executable stack flag.
can you say anything about this?
This should not longer be the case.
I noticed a few months (?) ago and fixed it in the CVS at least.

It turns out that this is caused by assembler files (*.s, not *.c with
inline assembler) that do not declare that the stack is non-executable.

No piece of code in dietlibc actually needs the stack to be executable.

We now pass -Wa,--noexecstack to as in the Makefile.

Felix
Thorsten Glaser
2014-08-06 07:40:40 UTC
Permalink
Post by Felix von Leitner
This should not longer be the case.
I noticed a few months (?) ago and fixed it in the CVS at least.
OK, thanks!

bye,
//mirabilos
--
[16:04:33] bkix: "veni vidi violini"
[16:04:45] bkix: "ich kam, sah und vergeigte"...
Loading...