Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 116027
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: SpanKY <vapier@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Patrick Lauer <patrick@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
cm3-5.2.6-RUNPATH.patch cm3-5.2.6-RUNPATH.patch patch Tupone Alfredo 2006-01-13 12:22 0000 233 bytes Details | Diff
cm3-5.2.6.ebuild.patch cm3-5.2.6.ebuild.patch patch Tupone Alfredo 2006-01-13 12:28 0000 643 bytes Details | Diff
cm3-5.2.7_pre050331.ebuild.patch cm3-5.2.7_pre050331.ebuild patch Tupone Alfredo 2006-01-13 13:04 0000 613 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 116027 depends on: Show dependency tree
Bug 116027 blocks: 81745

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-12-19 04:08 0000
I guess this is already known, but just for completeness:
QA Notice: the following files contain insecure RUNPATH's
/var/tmp/portage/cm3-5.2.7_pre050331/work/m3-sys/m3quake/LINUXLIBC6:/var/tmp/portage/cm3-5.2.7_pre050331/work/m3-sys/m3middle/LINUXLIBC6:/var/tmp/portage/cm3-5.2.7_pre050331/work/m3-libs/libm3/LINUXLIBC6:/var/tmp/portage/cm3-5.2.7_pre050331/work/m3-libs/m3core/LINUXLIBC6:/usr/lib/cm3//lib
usr/lib/cm3/pkg/m3cgcat/LINUXLIBC6/m3cgcat
QA Notice: the following files contain runtime text relocations
[long list]
QA Notice: the following files contain executable stacks
[long list]
!!! ERROR: dev-lang/cm3-5.2.7_pre050331 failed.

------- Comment #1 From SpanKY 2005-12-19 19:46:30 0000 -------
cm3 is based upon gcc-3.2.x but it should be easy to fix the exec stacks

------- Comment #2 From Thierry Carrez (RETIRED) 2005-12-20 04:15:18 0000 -------
No clue, as usual.

------- Comment #3 From Tupone Alfredo 2006-01-13 12:22:16 0000 -------
Created an attachment (id=77023) [details]
cm3-5.2.6-RUNPATH.patch

Fixing RUNPATH, by building the offensive program static

------- Comment #4 From Tupone Alfredo 2006-01-13 12:28:09 0000 -------
Created an attachment (id=77025) [details]
cm3-5.2.6.ebuild.patch

change  to the ebuild. 
hmm ... I applied those to 5.2.6 :/ Bug is related to 5.2.7 
5.2.6 build and merge correctly. cm3 is not usable as produce the problem
described by Bug 116028

I hope that solution works for 5.2.7 

------- Comment #5 From Tupone Alfredo 2006-01-13 13:04:22 0000 -------
Created an attachment (id=77027) [details]
cm3-5.2.7_pre050331.ebuild

cm3-5.2.7 works :) with the same patch. Just rename the patch to
cm3-5.2.7_pre050331-RUNPATH.patch

------- Comment #6 From solar 2006-01-13 13:21:33 0000 -------
linking static is not the right solution.

------- Comment #7 From Tupone Alfredo 2006-01-14 06:30:33 0000 -------
(In reply to comment #6)
> linking static is not the right solution.
> 

I wonder why ...

Any piece of cm3 suite is built standalone :/

------- Comment #8 From solar 2006-01-14 12:09:25 0000 -------
(In reply to comment #7)
> (In reply to comment #6)
> > linking static is not the right solution.
> > 
> 
> I wonder why ...
> 
> Any piece of cm3 suite is built standalone :/
> 

linking static has sometimes some advantages but often disadvantages.
Think what happens if there is some obscure vuln in glibc. You now have
a copy of that vuln libc.a when the cm3 was built linked into the
executable forever and no easy way to detect that it linked in the old
libc. Linking static also makes larger in size and memory hungy apps.
Often the simple way to fix the rpath problems is to replace the
code in makefile's where you see -Wl,-R,"/path" with a simple -L "/path"
That allows it to link and have no unresolved symbols, without having the
hardcoded rpath value during normal runtime. If the -L does not work
due to it needing that path so it can run itself after building itself
and needs to find those libs which it linked to (which is not cross
compile friendly) then we can sometimes export LD_RUNPATH=/path

------- Comment #9 From Tupone Alfredo 2006-01-14 18:40:05 0000 -------
I know what linking static imply. But if you look at all the binary that cm3
provide, they were are all static, except the one that I changed, and the
compiler.

Anyway, the compiler is the only piece that you can see where is linked. 
All the other piece are built with the "make" like cm3 system. There is no -L
or rpath specification there. It is all elaborated automatically, with the same
tools that cm3 provide.

So, unless you fix this tools, so you can build in a different place that the
one they are to be shipped, there is nothing you can do. 

Unless you build static.

IMHO

------- Comment #10 From Thierry Carrez (RETIRED) 2006-01-15 09:17:36 0000 -------
vapier: your opinion as maintainer ?

------- Comment #11 From Tupone Alfredo 2006-01-16 05:33:01 0000 -------
Well, I suppose another solution is viable: writing a tool that strip from the
runpath string of the exe or shared libs, the "/var/tmp/portage/xxx/image/"
thing.
And calling this for any exe/shared lib encountered during the merge phase, or
manually driven inside the ebuild.
I'm not able to do this now :(

------- Comment #12 From Thierry Carrez (RETIRED) 2006-01-16 05:40:35 0000 -------
The tool exists and is called chrpath... but that means pulling it as a
build-time dep. Why not, I guess maintainer has now two choices :)

------- Comment #13 From solar 2006-03-05 08:02:47 0000 -------
The next ~arch portage revision will auto repair evil rpaths and not bail. 
Maintainers should still fix the packages they maintain as portage will only
die
with FEATURES=stricter (but that is a maintainer & QA problem) no longer
security@

http://bugs.gentoo.org/show_bug.cgi?id=124962

------- Comment #14 From Jakub Moc (RETIRED) 2006-09-21 03:29:10 0000 -------
No longer a security issue with current stable portage, re-assigning to
maintainer

------- Comment #15 From SpanKY 2007-01-24 04:48:51 0000 -------
cm3 no longer in portage

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug