🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.security.misc
Article #117

Re: Advice on (potential?) security problem

#117
From: Valdis Kletnieks
Date: Sat, 08 Aug 1992 08:37
27 lines
1518 bytes
In article <1992Aug7.022422.9878@afterlife.ncsc.mil> sjr@afterlife.ncsc.mil (Stephen J. Roznowski) writes:
>Currently, the program does the following:
>
>	system("/bin/stty -echo ...");
>
>Now suppose that I do "all the correct things" before issuing the
>"system" call (set IFS, etc.) is this worse/same as the following:
>
>	tcgetattr(fd, &t);
>	t.c_lflag &= ~ECHO;
>	tcsetattr(fd, TCSANOW, &t);

Using 'system()' is a big loss security-wise.  You can easily
verify the security impact of an ioctl to turn on raw mode. However,
system() is open to SO many abuses it isn't funny.  For instance,
if PATH has '.' in it, you better hope your /bin/sh is one that
automatically resets IFS - otherwise, the guy can put a program
called 'bin' in the current directory, and nuke you - this was how
the infamous 'expreserve' hole worked - it did a 'system("/bin/mail"...)"

I'm sure the security mavens in this group can add another 5-6 different
ways to break a "system()" call.. ;)

				Valdis Kletnieks
				Computer Systems Engineer
				Virginia Tech
 
Technical Details
Message-ID: <5465@vtserf.cc.vt.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!vtserf!vttcf.cc.vt.edu!valdis
References: <1992Aug7.022422.9878@afterlife.ncsc.mil>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!vtserf!vttcf.cc.vt.edu!valdis
From: valdis@vttcf.cc.vt.edu (Valdis Kletnieks)
Newsgroups: comp.security.misc,alt.security
Subject: Re: Advice on (potential?) security problem
Message-ID: <5465@vtserf.cc.vt.edu>
Date: 8 Aug 92 08:37:42 GMT
References: <1992Aug7.022422.9878@afterlife.ncsc.mil>
Sender: usenet@vtserf.cc.vt.edu
Followup-To: comp.security.misc
Organization: Virginia Tech, Blacksburg, VA
Lines: 27