Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115625 - sparc is full of executable stacks
Summary: sparc is full of executable stacks
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc Linux
: High major (vote)
Assignee: Sparc Porters
URL: http://www.gentoo.org/proj/en/hardene...
Whiteboard:
Keywords:
: 119964 120160 120161 120170 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-14 22:42 UTC by Christian Heim (RETIRED)
Modified: 2010-09-29 23:21 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Heim (RETIRED) gentoo-dev 2005-12-14 22:42:58 UTC
QA Notice: the following files contain executable stacks
 Files with executable stacks will not work properly (or at all!)
 on some architectures/operating systems.  A bug should be filed
 at http://bugs.gentoo.org/ to make sure the file is fixed.
--- --- RWX usr/bin/ssh
--- --- RWX usr/bin/scp
--- --- RWX usr/bin/ssh-add
--- --- RWX usr/bin/ssh-agent
--- --- RWX usr/bin/ssh-keygen
--- --- RWX usr/bin/ssh-keyscan
--- --- RWX usr/bin/sftp
--- --- RWX usr/sbin/sshd
--- --- RWX usr/lib/misc/ssh-keysign
--- --- RWX usr/lib/misc/sftp-server
Comment 1 solar (RETIRED) gentoo-dev 2005-12-15 04:46:07 UTC
How did you get these markings? it almost looks as if it was built with a non 
gentoo toolchain. It should look something like this. (what arch?)

# qlist -e openssh | scanelf -F%e\ %F -Be -f -
RW- R-- RW- /usr/bin/scp
RW- R-- RW- /usr/bin/ssh
RW- R-- RW- /usr/bin/sftp
RW- R-- RW- /usr/bin/ssh-agent
RW- R-- RW- /usr/bin/ssh-add
RW- R-- RW- /usr/bin/slogin
RW- R-- RW- /usr/bin/ssh-keyscan
RW- R-- RW- /usr/bin/ssh-keygen
RW- R-- RW- /usr/lib/misc/sftp-server
RW- R-- RW- /usr/sbin/sshd
Comment 2 SpanKY gentoo-dev 2005-12-15 06:29:27 UTC
yeah, we need more info ... you cant just post output and have us
read your mind :P

ive never seen openssh with exec stacks
Comment 3 solar (RETIRED) gentoo-dev 2005-12-15 07:00:27 UTC
Ahh hardware = sparc here. 
Yeah sparc has some headers which mark some sections of the ELF incorrectly.
I think to address this the headers need to be fixed.
Comment 4 SpanKY gentoo-dev 2005-12-15 07:08:17 UTC
not an openssh-specific issue, all of sparc is full of this stuff

not a pressing issue since i dont think sparc has hardware support for this ?
Comment 5 Joshua Kinard gentoo-dev 2005-12-16 17:11:53 UTC
Any one known what headers are specifically affected?
Comment 6 SpanKY gentoo-dev 2005-12-16 17:27:29 UTC
my guess is gcc or glibc (prob gcc) since every glibc/gcc library has exec stacks
Comment 7 solar (RETIRED) gentoo-dev 2005-12-16 18:28:26 UTC
Kumba I think it's the linux-headers problem with elf.h, but I'm going to have 
to ask the PaX author to try to explain it a bit more and he has poked at the 
problem a tad more than any of us and may be able to suggest future development 
paths for us/sparc.
Comment 8 PaX Team 2005-12-17 03:37:18 UTC
1. sparc has non-exec page (and hence, stack) support, sparc64 support has been in mainline linux for over a year now, sparc32 support is only in PaX.

2. GNU_STACK markings come from the linker, and ultimately, non-marked .o files or .o files that explicitly specify an executable GNU-stack section (so it's not a header problem most likely). i don't know which is the case here, but since so many apps are affected, i'd agree with spanky that it's either gcc or glibc, in particular, the .o files that are implicitly linked into every ELF executable and library. you can check them out by grepping for the GNU-stack header in the readelf -e output.

3. as for fixing this, i guess the problem will turn out to be .o files that are assembled from .S files that don't carry any GNU-stack marking, so the fix will be simple (and upstream should do it eventually).

4. in the meantime, you can just run execstack -c on the executables, that will clear the executable stack marking.
Comment 9 SpanKY gentoo-dev 2005-12-17 09:31:26 UTC
> 1. sparc has non-exec page (and hence, stack) support

ok, i'll update severity as such

> you can check them out by grepping for the GNU-stack
> header in the readelf -e output.

latest version of scanelf supports scanning of .o files for missing .note.GNU-stack sections :)
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-01-24 04:26:49 UTC
*** Bug 120160 has been marked as a duplicate of this bug. ***
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-01-24 04:27:07 UTC
*** Bug 120161 has been marked as a duplicate of this bug. ***
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-01-24 04:27:16 UTC
*** Bug 119964 has been marked as a duplicate of this bug. ***
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-01-24 05:13:37 UTC
*** Bug 120170 has been marked as a duplicate of this bug. ***
Comment 14 Magnus Granberg gentoo-dev 2009-07-08 16:34:38 UTC
Is this bug still vaild?
Comment 15 SpanKY gentoo-dev 2010-09-29 23:21:12 UTC
seems to be fixed now.  ive updated the documentation as such.

GNU ld (GNU Binutils) 2.20.1.20100303
GNU C Library stable release version 2.11.2, by Roland McGrath et al.
gcc (Gentoo 4.3.4 p1.1, pie-10.1.5) 4.3.4
linux 2.6.34-gentoo-r1

 TYPE    PAX   PERM ENDIAN STK/REL/PTL TEXTREL RPATH BIND FILE 
ET_EXEC ---xe- 0755 BE RW- R-X RWX    -      -   LAZY /bin/bash