Secure setuid shell scripts

Guy Harris guy at auspex.UUCP
Wed Oct 26 03:34:10 AEST 1988


>just one question.  Is this problem a security hole for only BSD systems,
>or does it exist on other SVID type systems or others?

The one I know of would be a problem on non-BSD systems if they have the
following features:

	1) "#!" - the ability for the kernel to recognize that an
	   executable file is really a shell (or other) script, and to run
	   the appropriate shell on it

	2) symbolic links (not necessary in all cases, but necessary to
	   make it work under arbitrary circumstances)

and that handles certain aspects of process creation in a certain way.

If it's missing 1), the system doesn't *have* set-UID shell scripts in
the sense being discussed here; the trick is that if the *script* has
its set-UID or set-GID bit set, when it runs the shell in question it
will run it with set-UID or set-GID privileges.  Most non-BSD systems
don't have it, but some non-BSD systems do (although many of them
started from BSD, even though they may be S5-compatible...).



More information about the Comp.unix.wizards mailing list