Getting rid of the root account

John F. Haugh II jfh at rpp386.Dallas.TX.US
Sat Jun 10 12:02:42 AEST 1989


In article <127 at orchid.warwick.ac.uk> mirk at uk.ac.warwick.cs (Mike Taylor) writes:
>But to re-iterate my point again: UNIX supplies a complete, elegant
>and secure privilege mechnaism, and the fact that it has so many holes
>in it *now* is only due to the insecure things people have done with
>it.

Your plan requires at a minimum concurrent group sets, and then STILL
requires being SUID root if it performs any of the tasks which only
root may perform.

Consider for a moment a `mount' program which only group `oper'
may execute.  Group 'oper' is not special - you must still be
UID 0 in order to mount a filesystem [ System V least wise ].  So
you must make the modes 4010 with user 'root' and group 'oper'.
And you must prove that EVERY operation performed by `mount'
conforms to the security system you've implemented.

The alternative is to grant the mount program `MOUNT' privilege
_and_ use permission bits.  Make the program mode 010, group
oper, and have code similiar to

	add_privilege (MOUNT);
	mount (device, directory);
	drop_privilege (MOUNT);

buried in there.  Now you must only show that the privilege
MOUNT can not be abused by other calls - and it can't because
the privilege only exists during the mount() system call.  You
may make you job much easier by coding

	main (...)
	{
		drop_privilege (ALL);

as the very first step.  Your proof now consists of the
statement `There is no privilege to abuse, except here ...'

This is why least privilege and privilege bracketing is such
a hot idea.  What are you going to trust, a program running
with root privilege 100 percent of the time, or a program
running demonstrably with no privilege 99 percent of the time
and only a single privilege the remaining 1 percent?
-- 
John F. Haugh II                        +-Button of the Week Club:-------------
VoiceNet: (512) 832-8832   Data: -8835  | "AIX is a three letter word,
InterNet: jfh at rpp386.Cactus.Org         |  and it's BLUE."
UucpNet : <backbone>!bigtex!rpp386!jfh  +--------------------------------------



More information about the Comp.unix.wizards mailing list