From: chiefglider@gmx.de (Karl-Heinz Nausenack)
Subject: strange "su" behaviour
Date: 30 Jan 2004 01:37:47 -0800 [thread overview]
Message-ID: <2525cdab.0401300137.533018f2@posting.google.com> (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.
next reply other threads:[~2004-01-30 9:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-30 9:37 Karl-Heinz Nausenack [this message]
2004-01-30 19:19 ` strange "su" behaviour Ann Majeske
2004-02-03 18:24 ` John Ferlan
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox