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

* Re: strange "su" behaviour
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Ann Majeske @ 2004-01-30 19:19 UTC (permalink / raw)


Any time that you think you have found a security
hole, please do not discuss it in a public forum,
send email to security-alert@hp.com instead.




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

* Re: strange "su" behaviour
  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
  1 sibling, 0 replies; 3+ messages in thread
From: John Ferlan @ 2004-02-03 18:24 UTC (permalink / raw)


You did an "su" to root originally.  You knew root's password - so 
what's the issue about being able to then su to 'guest' without knowing 
the password?  Doing the 'su' back to 'wwwuser' doesn't necessarily ask 
for the password because your originally logged in uid was 'wwwuser'. 
The fact that other "unixoid"'s don't keep track of who the orginally 
logged in user is their issue...

Obviously I do hope you understand that if you know root's password you 
can do just about anything you want without needing to su. Try using a 
non root account in your path of reproducing this.

I also don't believe you mentioned Base(BSD) or Enhanced Security? 
There is a different mechanism for each and a slight difference in how 
they do and keep track of things - so that's important information you 
must provide.

Finally be sure you are up to date on all the security patches to V5.1 - 
as I know there were a number of things fixed/modified within the 
security space...

-- 

John Ferlan
Hewlett-Packard Company


^ 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