Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* strange "su" behaviour
@ 2004-01-30  9:37 Karl-Heinz Nausenack
  2004-01-30 19:19 ` Ann Majeske
  2004-02-03 18:24 ` John Ferlan
  0 siblings, 2 replies; 3+ messages in thread
From: Karl-Heinz Nausenack @ 2004-01-30  9:37 UTC (permalink / raw)


"su" behaves not in the expected way.
For example (wwwuser is the user for the WWW server, but every
other user, local or from NIS, shows the same behaviour; guest
is a NIS user) 

At first, login as wwwuser:

$ id 
uid=201(wwwuser) gid=65534(nobody) groups=0(system)
$ su
Password:
# id
uid=0(root) gid=1(daemon)
groups=0(system),3(mem),7(terminal),9(opr),12(lp)
# su guest
bash-2.05a$ id
uid=3170(guest) gid=2777(guests)
bash-2.05a$ su wwwuser
$ id
uid=201(wwwuser) gid=65534(nobody) groups=0(system)
$ /usr/sbin/sizer -v
Compaq Tru64 UNIX V5.1 (Rev. 732); Fri Mar 21 16:36:25 CET 2003

Note, that the command "su wwwuser" did not ask for a password.
This doesn't happen in Tru64 4.0F, but on a dozen machines running
5.1.

I use the terms "wwwuser" and "guest" just to relieve the explanation,
you can change this to every other user.
In fact, it is possible to su to any user, whoms parent process has
done the su command before.

This is especially a problem for processes which were initially
started by root, as the WWW-Server (Apache starts up when booting and
then switches to wwwuser): with the "su" command in an CGI script it
is possible to setuid to any user without knowing his password and
even to root.
In this case the wwwuser does not have to be a member of the system
group.

I can not reproduce this on any other Unixoid, so  I think, we have a
security hole here. Do you know, how to fix it?




Please excuse the use of a pseudonym, but I think it's better, if our 
students find the security holes by their own.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-03 18:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-30  9:37 strange "su" behaviour Karl-Heinz Nausenack
2004-01-30 19:19 ` Ann Majeske
2004-02-03 18:24 ` John Ferlan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox