Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 1995 04:22:00 +0300 (MSK)
From:      =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) <ache@astral.msk.su>
To:        ache@freefall.freebsd.org, John Polstra <jdp@polstra.com>
Cc:        freebsd-hackers@freebsd.org, gibbs@freefall.freebsd.org
Subject:   Re: ld.so, LD_NOSTD_PATH, and suid/sgid programs
Message-ID:  <Dau-3ZmiH1@ache.dialup.demos.ru>
In-Reply-To: <m0t7Xo8-000078C@seattle.polstra.com>; from John Polstra at Mon, 23 Oct 95 18:05 PDT
References:  <m0t7Xo8-000078C@seattle.polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <m0t7Xo8-000078C@seattle.polstra.com> John Polstra writes:

>> >Bogus argument in my opinion.  The people who are going to use
>> >LD_NOSTD_PATH will know its effects.  If you still want to argue
>> >about this, fine, but I'd like to put this issue to a vote.
>> 
>> Yes, it can be used by intruder for hackers purposes, if he examine
>> previously what script does.

>I don't think it can be used for hacking purposes.  All it can possibly
>do is make a command fail to execute at all.  Any shell script would
>have to be pretty silly to permit that to result in a security breach.

Well, simple example:

	setuid_shared_binary > /tmp/file
	... (f.e. few static commands)
	setuid_static_binary < /tmp/file  # OOPS!
	(umask is restrictive, of course)

>If you're going to worry about LD_NOSTD_PATH in ld.so, then why not also
>have it reset PATH, IFS, DISPLAY, and many other environment variables?
>(I am *not* recommending that!).

FYI, all security-aware scripts resets PATH.
Did you see any?

But all existen scripts already knows about PATH resetting
and knows nothing about LD_NOSTD_PATH magic.

-- 
Andrey A. Chernov        : And I rest so composedly,  /Now, in my bed,
ache@astral.msk.su       : That any beholder  /Might fancy me dead -
http://dt.demos.su/~ache : Might start at beholding me,  /Thinking me dead.
RELCOM Team,FreeBSD Team :         E.A.Poe         From "For Annie" 1849



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