From: Hans Reiser <reiser@namesys.com>
To: David Dabbs <david@dabbs.net>
Cc: gbeshers@comcast.net, reiserfs-list@namesys.com
Subject: Re: viewprinting: what format should views be stored in?
Date: Wed, 18 Aug 2004 12:34:04 -0700 [thread overview]
Message-ID: <4123AF2C.2060500@namesys.com> (raw)
In-Reply-To: <20040818075216.B920D15DBC@mail03.powweb.com>
David Dabbs wrote:
>Hans and George,
>
>I've been lurking at the edge of this discussion and have not chimed in
>mostly because I only have a dial-up connection here at my in-laws
>house (and I'm suposed to be on vacation). Since there was a request for
>arguments for or against Hans's preferred approach, I thought I'd add
>my $0.02.
>
>In order to put everything into perspective as well as to provide context
>for some questions, I attempted to distill concrete items or decisions from
>the last several days' exchanges.
>
>As to arguments For or Against;
>For
>If you only have three months to prove a concept and obtain continued
>funding, then I agree with Hans's preference for reusing as much
>existing work as possible. Adapting Hans's statement regarding
>[in]compatibility, "...if we [write new code] we should do
>so only if it is sufficiently worthwhile."
>
>Against
>I can think of none at this point, given my understanding of
>the features.
>
>
>Project
>----------------------------------------------------------------------
>Demonstrate process-oriented filesystem viewprinting that scales to
>filesystems (and masks) containing millions of files. Provide
>exec-time mask application as well as tools for automating mask
>creation and maintenance.
>
>
>Definitions
>---------------------------------------------------------------------
>Process-Oriented
>Specifications of filesystem object visibility are applied to processes
>regardless of the effective user rights with which the process runs.
>
>Mask (or viewprint)
>A specification as to which files are visible to process[es]
>"running under" the mask. The [file] security underlying the mask
>remains a user/object/permission mapping. If a mask a) does not
>include a file or b) explicitly filters out acess, the file operation ceases
>and an error is returned. If the file upon which the process wants to
>operate is not filtered by the mask, then the operation request is
>passed on to the underlying filesystem. There, the requested file
>a) might not exist, b) might exist but not be visible/readable by the
>user running the process, etc.
>
>Fall-Through Point
>The point during some file operation at which it is determined that the
>file is not filtered by the mask. The request [for operation X on the file]
>is passed on to the VFS/underlying filesystem.
>
>
>
>Features & Performance (Qualitative/Soft)
>----------------------------------------------------------------------
>It is...our task to ensure that creating a correct mask is well automated
>and easy.
>
>We do process oriented security, and that is all for now. The underlying
>[file] security remains a user/object/permission mapping.
>
>We need to be able to determine in insignificant time whether a file
>"passes through" a mask consisting of a million filenames.
>
>..if we must break an existing program we should do so only with care
>and only if it is sufficiently worthwhile to do so.
>
>
>Features & Performance (Quantitative/Hard)
>----------------------------------------------------------------------
>Masks
>- must support dirname/*
>- do not [yet] need to support dirname/foo.*
>- should not allow symbolic link traversal unless the file pointed to
> is within the mask.
>
>
>- (by extension) should not allow hard links unless the file
> pointed to is within the mask.
>
>
^ should not allow hard links^ should not allow hard link to be created.
>
>
>Hans's Initial Considerations & Design Proposal
>----------------------------------------------------------------------
>[The solution] must be treelike in its performance scalability.
>
>It is very important that we have something simple that reuses code for
>this purpose. The big issue to decide at the start is, should a view
>specification be implemented with a format that is as if it is a
>subdirectory of the masked executable, and which we then take the
>filenames used by the executable and traverse the subdirectory as
>though it was root, and if we reach a valid fall through point, then
>allow [us to] traverse from the real filesystem root, and if not,
>we issue a suitable error.
>
>This would let us use all the existing semantic tree traversal code.
>It would, however, require us to add such plugins as "fall through points",
>and "prints", etc. I think the answer is yes, we want to do it this way.
>Please come up with arguments for and against it.
>
>
>
>Questions
>----------------------------------------------------------------------
>Handwaving for a moment over view creation and storage particulars, it
>is pretty clear that this new security feature will rely upon reiser4
>for masking. Does this mean that one will only be able to mask a
>reiser4 filesystem
>
yes
>, or will any VFS fs be "maskable?"
>
>
Filesystems without support for plugins are a horror....;-)
The other filesystems will be encouraged to adopt the reiser4 plugin
infrastructure.....
>All file types and access methods will be supported, yes?
>(mmap, AIO, DIRECT, pipes, hard/sym links, etc.)
>
>
Yes.
>In the original proposal posted to the list Hans (I think) referred to
>viewprinting as "chroot on steroids." Let's assume that the mask
>creation tools deliver on making viewprint creation and maintainance
>very easy/painless for admins. In what way will viewprinting be more
>secure than chroot?
>
>
It won't. Security research is the art of security/effort. Maximizing
just security is a solved problem, and is called a turned off computer
in a good safe.
Viewprinting is less work than chroot.
>If I understand the ways admins use chroot, or would like to use it,
>then should the design include "stackable" or "inheritable" masks?
>
>
Sure, but not in 1.0. Good point though.
>This is not unlike stackable filesystems or filter pipelines. If,
>for instance, most processes need to see /usr/local/lib/* and
>/usr/local/bin/*, then this spec is in a 'base' mask and the mask
>for /usr/local/bin/fooprocess would inhert from and add to this
>base specification.
>
>
I dislike your example but agree with your argument.
>Early on in the conversation, there was discussion about
>"permissible functionality." At a minimum, a mask, true to its name,
>will effect filesystem object _visibility_. It was not completely
>clear whether the mask will be proscriptive viz operations. IOW, will
>the mask say that fooprocess "is not permitted to [attempt to] RWX
>object bar?" I believe this is not something masks will do, but I
>wanted clarification.
>
>
I don't know why I don't understand your question, but I don't.....;-)
>Hans, in your preferred approach you referred to "a format that
>is as if it is a subdirectory of the masked executable." Did you have
>in mind checking for something like /usr/bin/fooprocess/metas/mask
>when exec() loads the exe,
>
yes
> and if this exists then the files rooted
>in this directory would be set as the process's root filesystem?
>
>
your statement is imprecise.
The mask will be checked first, and then iff it falls through we do a
normal filesystem traversal.
>Are masks capable of explicit exclusion as well as inclusion?
>
>
Not in version 1.0.
>If the answer is 'Yes,' then what are your thoughts as to how this
>might be accommodated when your main tool is reiser4's semantic
>tree layer? Inclusion would be straightforward -- if the directory
>exists or the name exists within the directory then fall through.
>But exclusion?
>
True, it might be an issue. I must think about it.
> If you are limited to the semantic layer, then there's
>no stat node with which to play tricks.
>
>I wonder if it would be feasible if masks only specified
>exclusions? If, for instance, the mask wanted to exclude /foo/*,
>then the directory foo would exist (in the mask semantic tree).
>To exclude /etc/passwd, passwd would exist in the directory /etc.
>Since you're already going to need to preempt dcache searches
>(aren't you?)
>
Sigh, yes, or we need to use dcache for the mask.
> you can insert a search of the mask tree. If the
>search fails, then it is not excluded and the request falls through
>to normal VFS handling. In the /etc/passwd case above, it would find
>/etc/passwd and so the file is excluded. Processing would stop there, returning some error. How does this sound? I need to sleep on this,
>because it is very late here.
>
>
I don't quite understand this paragraph above.
>
>David
>
>
>
>
next prev parent reply other threads:[~2004-08-18 19:34 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-18 7:52 viewprinting: what format should views be stored in? David Dabbs
2004-08-18 18:37 ` David Masover
2004-08-18 21:47 ` George Beshers
2004-08-18 19:20 ` George Beshers
2004-08-18 20:20 ` Hans Reiser
2004-08-18 21:44 ` George Beshers
2004-08-18 21:48 ` Hans Reiser
2004-08-18 23:18 ` George Beshers
2004-08-19 0:42 ` Hans Reiser
2004-08-19 2:01 ` George Beshers
2004-08-19 5:50 ` Hans Reiser
2004-08-19 12:48 ` George Beshers
2004-08-20 6:59 ` Hans Reiser
2004-08-20 12:36 ` George Beshers
2004-08-20 18:14 ` Hans Reiser
2004-08-20 21:42 ` George Beshers
2004-08-18 19:34 ` Hans Reiser [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-08-22 5:45 David Dabbs
2004-08-21 20:48 David Dabbs
2004-08-21 7:38 David Dabbs
2004-08-21 8:59 ` Hans Reiser
2004-08-20 22:29 David Dabbs
2004-08-20 17:14 David Dabbs
2004-08-20 7:23 David Dabbs
2004-08-20 16:10 ` Valdis.Kletnieks
2004-08-20 21:04 ` George Beshers
2004-08-21 6:42 ` Hans Reiser
2004-08-19 7:40 David Dabbs
2004-08-19 11:21 ` David Greaves
2004-08-19 16:16 ` George Beshers
2004-08-20 6:19 ` Hans Reiser
2004-10-26 14:45 ` Lamont R. Peterson
2004-10-26 16:39 ` Hans Reiser
2004-10-26 16:57 ` George Beshers
2004-10-26 18:37 ` Hans Reiser
2004-10-26 20:20 ` George Beshers
2004-10-27 4:48 ` Hans Reiser
[not found] ` <4124D09A.1060208@comcast.net>
2004-08-19 17:31 ` David Greaves
2004-08-20 6:52 ` Hans Reiser
2004-08-20 12:08 ` George Beshers
2004-08-20 14:07 ` David Greaves
2004-10-26 15:54 ` Lamont R. Peterson
2004-10-27 1:04 ` David Masover
2004-08-20 6:13 ` Hans Reiser
2004-08-19 14:30 ` George Beshers
2004-08-16 0:15 Hans Reiser
2004-08-16 1:48 ` George Beshers
2004-08-16 2:02 ` Hans Reiser
2004-08-16 13:47 ` George Beshers
2004-08-16 19:50 ` George Beshers
2004-08-17 7:07 ` Hans Reiser
2004-08-17 19:29 ` George Beshers
2004-08-17 20:28 ` Hans Reiser
2004-08-17 23:46 ` George Beshers
2004-08-18 2:22 ` Hans Reiser
[not found] ` <4121F4D6.8090506@comcast.net>
2004-08-17 19:43 ` Hans Reiser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4123AF2C.2060500@namesys.com \
--to=reiser@namesys.com \
--cc=david@dabbs.net \
--cc=gbeshers@comcast.net \
--cc=reiserfs-list@namesys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.