From owner-freebsd-bugs Tue Jan 7 13:55:50 2003 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCA2037B401 for ; Tue, 7 Jan 2003 13:55:48 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32EC743EA9 for ; Tue, 7 Jan 2003 13:55:46 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b180.otenet.gr [212.205.244.188]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id h07LtZU8013134; Tue, 7 Jan 2003 23:55:36 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.6/8.12.6) with ESMTP id h07LtagX024124; Tue, 7 Jan 2003 23:55:36 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.6/8.12.6/Submit) id h07LeT7r023499; Tue, 7 Jan 2003 23:40:29 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 7 Jan 2003 23:40:29 +0200 From: Giorgos Keramidas To: Cache Cc: freebsd-bugs@FreeBSD.org Subject: Re: ps information leak in FreeBSD Message-ID: <20030107214029.GA23473@gothmog.gr> References: <20030105204650.M16523@sowatech.com.pl> <20030106010321.GB3619@gothmog.gr> <20030106175305.M65727@sowatech.com.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030106175305.M65727@sowatech.com.pl> Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 2003-01-06 17:53, Cache 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