Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jan 2003 23:40:29 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Cache <cache@sowatech.com.pl>
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: ps information leak in FreeBSD
Message-ID:  <20030107214029.GA23473@gothmog.gr>
In-Reply-To: <20030106175305.M65727@sowatech.com.pl>
References:  <20030105204650.M16523@sowatech.com.pl> <20030106010321.GB3619@gothmog.gr> <20030106175305.M65727@sowatech.com.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2003-01-06 17:53, Cache <cache@sowatech.com.pl> wrote:
> May be,I don't have any FreeBSD 5.0 Box, but use ps with -p (pid),
> or run ./info.sh (this file is in proc-patch.tar.gz)
>
> I have see this problem on ex. SunOs or Solaris i'm don't sure now.

Can you try the following to test this on a 4.X installation?

1. Make sure you have security.bsd.see_other_uids (or its equivalent
   for 4.X kernels) set to a non-zero value.

2. Run as root a process that will take a while to finish.  I used
   `sleep 10000' to give me some time to finish the test.

3. From a non-superuser shell run `ps xa | grep sleep' and note the
   PID of the long running root process.

4. As root, set security.bsd.see_other_uids=0.

5. At the non-superuser shell type `ps xau -p PID'.  You shouldn't be
   able to see anything about the process here.

6. Now return to othe root shell and set security.bsd.see_other_uids=1.

7. At the non-superuser shell type `ps xau -p PID'.  This time the
   process should show up.

This is what I used to test my 5.X kernel, and it seems to work as
expected, hiding all information for processes that should not be
visible.

- Giorgos


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030107214029.GA23473>