Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71609 - Early bindings for +s executables should be chosen by glibc and not by each package
Summary: Early bindings for +s executables should be chosen by glibc and not by each p...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 76210 121758 130934 138817 147871 149635 150972 151395 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-17 15:08 UTC by BlaisorBlade
Modified: 2007-12-08 18:07 UTC (History)
13 users (show)

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


Attachments
setuid-bind-now.patch (setuid-bind-now.patch,955 bytes, patch)
2006-04-24 23:11 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BlaisorBlade 2004-11-17 15:08:33 UTC
With emerge mc, and with many other packages, I get this error message:

QA Notice: /usr/lib/mc/cons.saver is setXid, dynamically linked and using lazy bindings.
This combination is generally discouraged. Try: LDFLAGS='-Wl,-z,now' emerge mc

This issue was earlier discussed at:

http://lwn.net/Articles/99137/

To quote from a comment:

"Is the decision to use RDLT_LAZY hardcoded in /lib/ld-linux.so.2 ? Maybe it would make sense to change that to the equivalent of RTLD_NOW for SUID apps for more deterministic behavior, since the delay caused by LD_DEBUG abuse only increases the already present delay for dynamic symbol resolution in the middle of an operation."

Now, wouldn't it make sense to fix this in glibc, as this reader says?

Reproducible: Always
Steps to Reproduce:
1. Emerge any package building a +s executable and not using early bindings for it in linker settings.
Comment 1 solar (RETIRED) gentoo-dev 2005-04-29 06:24:30 UTC
While this sounds very ideal this change would prevent Xorg from starting.
There is a few cases where setXid is used with lazy bindings. 
It's not the right thing todo but it's just the way things work now.
Comment 2 Mark Loeser (RETIRED) gentoo-dev 2005-12-15 01:01:59 UTC
As stated, at this point in time, we can't reasonably do this.
Comment 3 SpanKY gentoo-dev 2005-12-15 06:32:33 UTC
actually we can, i have such a patch to do so
Comment 4 SpanKY gentoo-dev 2006-04-24 23:11:14 UTC
Created attachment 85428 [details, diff]
setuid-bind-now.patch
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-09-02 05:23:25 UTC
*** Bug 121758 has been marked as a duplicate of this bug. ***
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2006-09-14 08:15:18 UTC
*** Bug 130934 has been marked as a duplicate of this bug. ***
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-09-17 00:36:18 UTC
*** Bug 147871 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2006-09-24 04:43:11 UTC
*** Bug 76210 has been marked as a duplicate of this bug. ***
Comment 9 Philipp Riegger 2006-09-25 10:41:36 UTC
A glibc bug about this was marked as a duplicate of this. But there was a patch attached, solving the problem. Is this patch going to be submitted or should i remove "stricter" from my FEATURES since "it's just the way things work now"?
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-09-30 10:50:16 UTC
*** Bug 149635 has been marked as a duplicate of this bug. ***
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-10-13 10:29:26 UTC
*** Bug 150972 has been marked as a duplicate of this bug. ***
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-10-14 16:14:45 UTC
*** Bug 151395 has been marked as a duplicate of this bug. ***
Comment 13 SpanKY gentoo-dev 2006-12-04 08:29:28 UTC
*** Bug 138817 has been marked as a duplicate of this bug. ***
Comment 14 SpanKY gentoo-dev 2007-07-04 18:23:05 UTC
we had a discussion a while ago among hardened/security but never came to a resolution

we're dropping the bindnow-flags from ebuilds and the warning has been removed from portage ... the only bit left is whether we want this functionality in our glibc (if only for USE=hardened)
Comment 15 Mark Loeser (RETIRED) gentoo-dev 2007-12-08 01:51:49 UTC
(In reply to comment #14)
> we had a discussion a while ago among hardened/security but never came to a
> resolution
> 
> we're dropping the bindnow-flags from ebuilds and the warning has been removed
> from portage ... the only bit left is whether we want this functionality in our
> glibc (if only for USE=hardened)
> 

So...do we? :)  This has been open for ages and it would be nice for it to come to a conclusion.
Comment 16 solar (RETIRED) gentoo-dev 2007-12-08 17:10:13 UTC
hardened does not care about this and never really has. 
We already link -z now -z relro by default. 
Being that there would be no clear/nice way to for *libc to handle executables 
such as X which are +s and require -z lazy bindings. I don't see a point in 
doing anything here. "/etc/suid-bind-now/" while works. It's just not pretty.
Comment 17 Mark Loeser (RETIRED) gentoo-dev 2007-12-08 17:12:47 UTC
Since hardened doesn't care for this, then I think this time we can really close it.