From owner-freebsd-security@FreeBSD.ORG Thu Feb 26 07:30:05 2004 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A411016A4CE; Thu, 26 Feb 2004 07:30:05 -0800 (PST) Received: from gw.celabo.org (gw.celabo.org [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B41243D1D; Thu, 26 Feb 2004 07:30:05 -0800 (PST) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.celabo.org (Postfix) with ESMTP id AF9BF548A2; Thu, 26 Feb 2004 09:30:04 -0600 (CST) Received: by madman.celabo.org (Postfix, from userid 1001) id 407CD6D455; Thu, 26 Feb 2004 09:30:04 -0600 (CST) Date: Thu, 26 Feb 2004 09:30:04 -0600 From: "Jacques A. Vidrine" To: kientzle@acm.org Message-ID: <20040226153004.GB46714@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , kientzle@acm.org, freebsd-security@freebsd.org, das@freebsd.org References: <403CEF67.5040004@kientzle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <403CEF67.5040004@kientzle.com> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.4i-ja.1 cc: freebsd-security@freebsd.org cc: das@freebsd.org Subject: Re: Environment Poisoning and login -p X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Security issues [members-only posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2004 15:30:05 -0000 On Wed, Feb 25, 2004 at 10:54:31AM -0800, Tim Kientzle wrote: [...] > Possible fix: Have login unconditionally discard LD_LIBRARY_PATH > and LD_PRELOAD from the environment, even if "-p" is specified. [...] > Possible fix: Eliminate the "-p" option to login. I would prefer to redefine `-p' to mean, ``don't discard environmental variables believed to be safe to propogate''. We can start with this list: http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html plus EDITOR KRB5CCNAME LOGIN MAILDIR SSH_AGENT_PID SSH_AUTH_SOCK TERMCAP If that is too draconian for you, then I guess just drop /LD_.*/. Put the `environment cleaner' in libutil. Cheers, -- Jacques Vidrine / nectar@celabo.org / jvidrine@verio.net / nectar@freebsd.org