Sv.2 suid bits

Henry Spencer henry at utzoo.UUCP
Sat Nov 30 06:58:28 AEST 1985


> > Eek, I should hope not!  Can you say "Security hole big enough
> > to drive a truck through?"  I knew you could!
> 
> 	I've heard that said about shell scripts many times, but no
> one has ever explained why. Could some knowledgeable soul fill me
> in please?

Basically because the interpretation of shell scripts is much more a
function of context than is the case for C programs, and the shell script
has less control over the context.  Writing bullet-proof setuid programs
in C is extremely difficult; most existing setuid programs can be induced
to fall over or misbehave if you work at it hard enough.  In the shell
it's far worse.	 Consider the effect of running a setuid shell program
with a nonstandard value of IFS set -- the interpretation of the shell
script will bear no relation to what the writer intended.  This problem
can be solved, but there are ten more lurking deeper in.  The shell is
simply too complex to permit *confidence* that there are no further holes,
given that such confidence is very difficult to achieve even in C.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Net.bugs.usg mailing list