[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Kernel 2.3.49/51 and exec permissions



Just so you know, I've been searching *everywhere* for info on this and
it's driving me nuts!

I've been following debian unstable for a while.  Currently that's
'woody'.  I reciently upgraded my kernel from on old 2.3.3x (35 I
think) to 2.3.49, complete with devfs configured.

Since then, if I run the 2.3.49 kernel, I can run *any* setuid
programs.

/usr/lib/man-db/man (which is the real, setuid binary for man)
produces the following behavior:
-------------------------------------------------------------------------
bash-2.04$ ls -al /usr/lib/man-db/man
-rwsr-xr-x    1 man      root        82752 Feb 29 00:27 /usr/lib/man-db/man
bash-2.04$ id
uid=1000(docwhat) gid=1000(docwhat) groups=1000(docwhat),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),37(operator),50(staff)
bash-2.04$ /usr/lib/man-db/man
/usr/lib/man-db/man: error in loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
bash-2.04$ sudo bash
bash-2.04# /usr/lib/man-db/man
/usr/lib/man-db/man: error in loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
bash-2.04# strace /usr/lib/man-db/man
strace: exec: Permission denied
execve("/usr/lib/man-db/man", ["/usr/lib/man-db/man"], [/* 58 vars */]) = 0
bash-2.04# gdb --quiet /usr/lib/man-db/man
GNU gdb 19990928
Copyright 1998 Free Software Foundation, Inc.
(no debugging symbols found)...
(gdb) run
Starting program: /usr/lib/man-db/man 
/usr/lib/man-db/man: error in loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

Program exited with code 0177.
(gdb) quit
-------------------------------------------------------------------------

This isn't true just of man, btw.  It's true of *all* setuid/setgid
programs that aren't setuid/setgid root.  As you can see, sudo works,
but not if I try to sudo to a non-root id (this is as root, note the #):
bash-2.04# sudo -u man bash
sudo: unable to exec /bin/bash: Permission denied

I hope someone can throw some light on this, it's driving me nuts and I
can't find anyone else reporting similar problems!

Kernel info:
2.3.49 and 2.3.51 compiled for a K6-2 AMD with gcc 2.95.2

Ciao!

-- 
"Home is where you wear your hat."
		--Dr. Emilio Lizardo (Adventures of Buckaroo Banzai)

The Doctor What: Second Baseman                  http://docwhat.gerf.org/
docwhat@gerf.org                                                   KF6VNC


Reply to: