From owner-freebsd-security Wed Dec 5 7:53:36 2001 Delivered-To: freebsd-security@freebsd.org Received: from gw.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id A84CF37B416 for ; Wed, 5 Dec 2001 07:53:34 -0800 (PST) Received: from madman.nectar.com (madman.nectar.com [10.0.1.111]) by gw.nectar.com (Postfix) with ESMTP id 1C43ED; Wed, 5 Dec 2001 09:53:34 -0600 (CST) Received: (from nectar@localhost) by madman.nectar.com (8.11.6/8.11.6) id fB5FrWr23158; Wed, 5 Dec 2001 09:53:32 -0600 (CST) (envelope-from nectar) Date: Wed, 5 Dec 2001 09:53:32 -0600 From: "Jacques A. Vidrine" To: titus manea Cc: freebsd-security@FreeBSD.ORG Subject: Re: OpenSSH UseLogin problem Message-ID: <20011205155332.GA23116@madman.nectar.com> Mail-Followup-To: "Jacques A. Vidrine" , titus manea , freebsd-security@FreeBSD.ORG References: <20011205090318.A7617@unix.edc.dnttm.ro> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011205090318.A7617@unix.edc.dnttm.ro> User-Agent: Mutt/1.3.23.1i X-Url: http://www.nectar.cc/ Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Dec 05, 2001 at 09:03:18AM +0200, titus manea wrote: > LD_ env vars like LD_LIBRARY_PATH and such do not work for setuid binaries. > (ld.so man page) > programs. Here is an example ( i did it as root). The check is not actually for setuid binaries. The check is for uid == euid && gid == egid. Because of the way that OpenSSH handles privilege switching, uid == euid == gid == egid == 0 when /usr/bin/login is invoked. OpenSSH-portable, on the other hand, happens to handle this differently, and you get uid == euid == egid == 0, but gid = . That's why it is not vulnerable in any case. Login as root instead of su'ing to root, and you'll probably get `better' results. Cheers, -- Jacques A. Vidrine http://www.nectar.cc/ NTT/Verio SME . FreeBSD UNIX . Heimdal Kerberos jvidrine@verio.net . nectar@FreeBSD.org . nectar@kth.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message