Re: [PATCH] Capabilities, this time in elf section

Richard B. Johnson (root@chaos.analogic.com)
Sat, 10 Apr 1999 22:45:40 -0400 (EDT)


[SNIPPED]
>
> Problem is that jschmoe can take a hex editor to any file she wants, and
> make it "ALL CAPS" and then SUID it, or just wait for somebody capable to
> run it. Even if she hasn't got the "set capability" cap. That's why
> capabilities can not reside in the executable file itself. But if they are
> in the filesystem, you need specialized tools that can recover/set them.
> F.ex. tar(1), so you can create backups that preserve them, etc. Or you
> forget about the dearly beloved Unix way of doing things, and get a
> different set of tools...
>
> Also note that the capability to write to raw disk is in essence equivalent
> to the current root power in both schemes.
> --
> Horst von Brand vonbrand@sleipnir.valparaiso.cl
> Casilla 9G, Viņa del Mar, Chile +56 32 672616

That's why VAX/VMS had 'known images' that were installed upon boot.
They were installed permanently open (even if OPEN was not specifed),
typically OPEN/SHARE/PRIV=(PRIV_LIST...). It was impossible to alter
these images without uninstalling them which required CHMKRNL (change-
mode to kernel) privs.

For images to be installed shared or priv'ed, they could not contain
debugging information. Further, they had to reside in SYS$SYSTEM, and
be owned by SYSTEM (root) (uid/gid of [1,4]).

The VAX/VMS virtual filesystem had other interesting attributes that
made altering priv'ed executables improbable. When a file is
created, a new version of an existing file (if it exists) was
created. Therefore existing files were never modified. Even if
you opened for append, or truncated, the original was not touched.
Older versions had to be purged (deleted) seperately and they could
only be deleted if nobody had them open.

Databases could 'MAP' files and therefore modify existing files. However
executable files could not be opened in an append mode because their
attributes could not be changed. You can't even modify the creation
date of a VAX/VMS file without very special VAX/MACRO tools that
operate in kernel mode.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.5 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/