This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
ld.so setuid bug?
- From: Richard Henderson <rth at twiddle dot net>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 3 Sep 2004 18:51:15 -0700
- Subject: ld.so setuid bug?
I installed today's cvs on one of my alphas today, and didn't
notice any problems until I tried to sudo again. I appears
that there's something wrong with some setuid path in ld.so:
$ echo "int main() { return 0; }" > z.c
$ gcc z.c
$ ./a.out
$ echo $?
0
# change permissions and owner in another window
$ ls -l ./a.out
-rwsr-xr-x 1 root rth 12673 Sep 4 01:39 ./a.out*
$ ./a.out
Segmentation fault
Which is exceedingly annoying to debug, since I can't run it
under the debugger without suppressing that code path. Unless
there's some LD_FOO debugging variable that can force ld.so
to pretend that it's setuid? (Which would make for a nice
testsuite feature, so I'm guessing it doesn't. Yet.)
Anyway, before I go looking for miscompilations or whatnot,
does anyone else see this?
r~