All of lore.kernel.org
 help / color / mirror / Atom feed
* viewprinting: what format should views be stored in?
@ 2004-08-16  0:15 Hans Reiser
  2004-08-16  1:48 ` George Beshers
  0 siblings, 1 reply; 57+ messages in thread
From: Hans Reiser @ 2004-08-16  0:15 UTC (permalink / raw)
  To: George Beshers, ReiserFS List

It is very important that we have something simple that reuses code for 
this purpose, and it also needs to be scalable.  That is, we need to be 
able to determine in insignificant time whether a file passes through a 
mask consisting of a million files.

One approach would be to use a format similar to that for chroot, that 
is, to keep the format we use for directory trees now, and use it for 
storing the mask.  This raises the question: how would the format for 
the mask differ from that of the underlying filesystem.

Another approach is to use stem compressed names, or some other unique 
within the fs format for the mask.

We need to be able to support specifying a mask that allows any file 
within a given directory to be visible.  That is, we need to support 
dirname/* but we don't yet need to support dirname/foo.*

We probably don't want to allow symbolic links to be followed unless 
where they point to is within the mask.

I want minimal code but I want it to be treelike in its performance 
scalability.

Ideas?

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: viewprinting: what format should views be stored in?
@ 2004-08-18  7:52 David Dabbs
  2004-08-18 18:37 ` David Masover
                   ` (2 more replies)
  0 siblings, 3 replies; 57+ messages in thread
From: David Dabbs @ 2004-08-18  7:52 UTC (permalink / raw)
  To: reiser, gbeshers, reiserfs-list


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.



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, or will any VFS fs be "maskable?"

All file types and access methods will be supported, yes? 
(mmap, AIO, DIRECT, pipes, hard/sym links, etc.)

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? 

If I understand the ways admins use chroot, or would like to use it, 
then should the design include "stackable" or "inheritable" masks? 
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.

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.

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, and if this exists then the files rooted 
in this directory would be set as the process's root filesystem?

Are masks capable of explicit exclusion as well as inclusion?
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? 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?) 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.


David

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: viewprinting: what format should views be stored in?
@ 2004-08-19  7:40 David Dabbs
  2004-08-19 11:21 ` David Greaves
  2004-08-19 14:30 ` George Beshers
  0 siblings, 2 replies; 57+ messages in thread
From: David Dabbs @ 2004-08-19  7:40 UTC (permalink / raw)
  To: Hans Reiser, George Beshers; +Cc: reiserfs-list



Motivation
----------------------------------------------------------------------
See Hans's original post. In and of itself, viewprinting will not be 
more secure than chroot. Viewprinting should be less work than 
chroot. By virtue of its being easier to deploy and administer, the 
net effect should be increased security, assuming more admins deploy
viewprinting.


Later Phase Considerations
----------------------------------------------------------------------
- Explicit exclusion in masks. 
- Notions of mask inheritance


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 applied by the underlying
filesystem. 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 & Constraints
----------------------------------------------------------------------
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.

Masked Processes
- May not create hard links.
- Child processes [of a masked process] must inherit the parent's 
  "mask bit" and mask definition.

Filesystem Support
- Reiser4 fs code will be required to implement viewprinting.
- Only Reiser4 filesystems may be "masked."

 

Questions
----------------------------------------------------------------------
>All file types and access methods will be supported, yes? 
>(mmap, AIO, DIRECT, pipes, hard/sym links, etc.)
>
>Hans: Yes.
>...except that they cannot create hard links (above)

Is this restriction unequivocal (yes)? 
Any other forbidden Unix fs objects or fs operations?


> 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.....;-)


Let me try again. At a mininmum, a mask specifies what objects are
visible to a process, correct? If objext X is included in or not 
explicitly excluded from the mask, then fooprocess is allowed to 
_attempt_to_ operate on object X. I say "attempt to" because, at 
that point (fall-through), the mask is finished wrt the operation, 
yes? Permission to actually carry out an operation on object X is 
determined by the user/object/permission mapping in the underlying
filesystem.

What was not clear to me was whether masks specified, proscribed, or
in any way controlled filesystem operations (permissions) for objects
that are visible when running under the mask. If so, what can be 
specified and is it an "allow" a "deny" or either?


> 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.

It was imprecise because perhaps I had a different vprint concept 
and implementation in mind. Using the creation tool, JAdmin creates 
a mask for fooprocess. The mask would be a directory structure 
rooted at /bin/fooprocess/metas/mask. All files (not dirs) in 
this tree would be hard links to the "real" files specified in the mask. 
Only dirs & files included in the spec are visible. When an instance of 
fooprocess is started, /bin/fooprocess/metas/mask is automagically mounted 
as the process's root filesystem. The mask would be the filesystem. 
Other than the use of the metas reiserism (and mask maintenance wizardry)
this is not any different than chroot. Since the end result here is
to be no more secure than chroot, but very much easier to deploy and 
maintain, is there a reason why this cannot be the case?


> 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 don't quite understand this paragraph above.


Probably because I'm not on the same page as you and George.
Imagine a filesystem with two trees: one, the real
root filesystem and two, the anti-root tree (exclusions). This
fs would be the root fs for the process. Let's say fooprocess has 
the following exclusions:

	/etc/passwd
	/etc/shadow
	/var

Above, when I said "insert a search of the mask tree" what I meant was
"first search the exception [semantic] tree (anti-tree) associated with 
this process. If you find the object there, then report it as NOT FOUND.
Otherwise, proceed with a normal fs tree search (fall-through). Basically,
a dynamic, per-process (er, per mask) hidden attribute. The modified VFS 
code to store the dentry of the root of the mask base dir, then use 
normal namei(), etc. path resolution interfaces to see if the file exists 
in the exception list? IOW, when fooprocess attempts to open /etc/passwd 
when fooprocess is under the above mask, the following happens: VFS 
identifies process as being undermask and so knows dentry of the base dir 
of the exception list (fooprocess/metas/mask). Before doing 'normal' 
handling, VFS treats this as a request to operate on 
fooprocess/metas/mask/etc/passwd. If VFS finds the filename, then NOT 
FOUND is returned. Otherwise, file processing proceeds normally.

> George:
> To give a couple of examples:
>     1) A given process (say a restricted shell) can not exec() an
>         executable with the set-uid bit on.
>          - directly
>          - indirectly (e.g., via bash)
>     2) Apache can only create/write files in /var/web/incoming.
>          - files created or modified can not have any execute bit set 
> and executing chmod is excluded.
>
>Hans:
>this protection happens while traversing the mask or at the fall through 
>point.  Hmmm, we need to accumulate a set of permissions that apply to 
>something that are specific to how we got there.  That could be complex 
>in the VFS details.  We can defer it to Phase II if necessary.  George, 
>you should spend a day (not this week) figuring out how much work it 
>would be to make that work.  It will be the details of it that will be 
>dangerous....

I'll tackle scenario #2:
* Executing chmod would be excluded because it would not be visible in the mask.
* "files created or modified can not have any execute bit set" 
  Implicit in this statement is that, in addition to filtering object 
  visibility, masks will preempt/proscribe certain fs operations -- in this 
  case, the setting of certain attributes (i.e. exec bit). If this is correct
  then what can masks allow/prohibit WRT operations/attributes performed
  on objects. This is what I was trying to clarify with my earlier question.


David


^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: viewprinting: what format should views be stored in?
@ 2004-08-20  7:23 David Dabbs
  2004-08-20 16:10 ` Valdis.Kletnieks
  0 siblings, 1 reply; 57+ messages in thread
From: David Dabbs @ 2004-08-20  7:23 UTC (permalink / raw)
  To: reiser, reiserfs-list; +Cc: david

>>>
>>> When did masks specify visibility of files? According to Hans :
>>
>> This is clearcase functionality so everyone assumed it from the original
>> posting http://www.namesys.com/blackbox_security.html
>
>yes.
>
>Trying for clarity in the role of the mask interpreter layer.
>Does the mask act as a gatekeeper - passing things through to the fs 
>(possibly simpler to implement but _far_ less functional)
>Or (more likely) does the mask layer take over the role of authoriser(?) 
>in which case it delegates to the fs for the fs authorisation (attr) and 
>then bitwise ANDs that with it's own masklet (maybe shortcutting if the 
>mask determines the file is invisible)
>
>I think we all agree on the latter but I thought it best to be clear.

This clarity/specificity, at least re. your Phase I, is what I've been trying 
to get a handle on as well. Seems that in order to discuss /how/ to build this feature we should share an understanding of /what/ it is that it will do. This includes user inputs ('constraints' in mask[let] specifications) as well as
side effects or changes to 'normal' process/OS/filesystem operations.

From Hans's original post:

>It will however allow a useful subset of the needed security constraints 
>to be more compactly specified
>
Is there a proposed membership for the "useful subset," or better yet
what security constraints are not useful?

>[viewprinting] is also useful when you want to conveniently manage the 
>set of objects a particular executable is allowed to access without walking 
>the filesystem tree to do it.

"Without walking the filesystem to do it" implies that the view/mask
interpreter is the authorisor. The ultimate implementation may not need 
to walk the fs to determine whether process X can access object Y, but one 
cannot avoid doing so if you want to obtain dentries etc. needed by the VFS.

Hans and George, what did you find lacking in currently-available Linux security
module frameworks such as LIDS or LSM? They provide system function hooks
in which module writers may control object access. LSM-based work is on-going. See 
http://sic.iaik.tugraz.at/Best%20Paper%20Award/2004/LSM_quaritsch_winkler.pdf
for details of their addition of module stacking (multiple policies) and hooks into
the TCP layer. I'm going to read up on these frameworks.

>> What if it [mask] changes between two processes starting?
>> Does the running processes mask change? (cf chmod a file - seems 
>>
>> George: I am disinclined to tackle changing masks on the fly 
>> until I have a compelling story to justify the work.
>
>ok - agreed.

No changes on the fly? How does that square with the following 
from the blackbox_security.html feature description?

>
>We will accomodate these scenarios by creating three special view
>specifications: 
>...
>2. Every access outside some view creates a dialogue with the 
>administrator, in which if he oks it the view specification is amended 
>to allow the access. The administrator is also allowed to ok the access 
>without amending the specification, for the case where close monitoring 
>of some accesses is desired, which will result in his being prompted for 
>every access of that kind until he chooses to amend the specification. 
>...


>>>>
>>>> Hans: Your statement is imprecise. The mask will be checked first, 
>>>> and then iff it falls through we do a normal filesystem traversal.
>>>>   
>>>
>>> It was imprecise because perhaps I had a different vprint concept 
>>> and implementation in mind. Using the creation tool, JAdmin creates 
>>> a mask for fooprocess. The mask would be a directory structure 
>>> rooted at /bin/fooprocess/metas/mask. All files (not dirs) in this 
>>> tree would be hard links to the "real" files specified in the mask. 
>>> Only dirs & files included in the spec are visible. When an instance 
>>> of fooprocess is started, /bin/fooprocess/metas/mask is 
>>> automagically mounted as the process's root filesystem. The mask 
>>> would be the filesystem. Other than the use of the metas reiserism 
>>> (and mask maintenance wizardry)
>>> this is not any different than chroot. Since the end result here is
>>> to be no more secure than chroot, but very much easier to deploy and 
>>> maintain, is there a reason why this cannot be the case?
>>>  
>>>
>> I think the 'thing' at /usr/bin/fooprocess/metas/mask
>> is a semantic expansion of the mask (ie it's like a directory tree 
>> but it doesn't point to files, it just contains lots of masklets).
>> It can be traversed in parallel to the real tree traversal and the 
>> masklets it returns will modify the real results. It is purely 
>> semantic. I've expanded this later.
>>
>> Call it a maskfs?

David, isn't what I described above a maskfs (just not called that?)
Anyway, I believe it [mask layer] should be a real filesystem that does 
(eventually) point to files. Yes, the maskfs would need to store the 
"compact representation of the security constraints." Isn't that stat data? 

Based upon the shorthand in use so far, we'll say a masklet specification 
consists of an object name and some permission flags. Why not build the 
maskfs (as before, a directory tree in an existing reiser4 fs) with an entry 
for each object referenced in the mask. So, starting with the (admittedly poor)
prior example mask; Note that since masks can only deny authorisation but not grant it, any flags in the mask are denials. The following are logical:

     /                    -w-      # default dir perms
     /**                 -wx      # default file perms
     /etc/config.file  --x       # only exec denied, rw depends on fs attrs
     <other dirs/files obtained from the admin's process viewprint>

you would then end up with something like:

# ls -l /usr/local/bin/fooprocess/metas

     mask/                 ?-? ?-? ?-?   #  perms from above ANDed with fs attrs
        metas/
            dirdefault     ??? ??? ???    # whatever was in the mask
            filedefault    ??? ??? ???
        etc/                ?-? ?-? ?-?    # writing prohibited
            config.file     ??- ??- ??-    # cannot execute
        ...

When this 'maskfs' tree is created every explicitly named object from 
the mask is associated/linked to the actual object's inode but the attr 
bits are the real ones ANDed with the masklet's. Processes would be 
chrooted to this dir. When the process wants to write to /etc/config.file 
it simply interacts with the chrooted fs with no changes required in the VFS
layer, yes? Now, say the process wants to read a file that is allowed by 
the masklet but not explicitly included in the mask e.g. /etc/foo.conf. 
The VFS will first resolve etc, then the file foo.conf. The dir plugins we 
configure for this tree will, upon not finding foo in this dir, search the 
real /etc for it. If it exists, it is created in the maskfs tree,
assigned the proper attrs, and finally linked to the real /etc/foo.conf. 
Subsequent requests for /etc/foo are processed directly from the maskfs. 
This is a 'lazy linking' of sorts. 

Changing a mask is as easy as chmod on the file, if it was explicitly
part of the mask when it was created. If it wasn't, simply touching it adds it.
The plugins will check that the file actually exists, read the real object's
attr and mask out anything denied by the default file attrs.

Updating the maskfs when the underlying fs has changed is an issue. 
This is only a concern for fs objects that have been instantiated in
maskfs. An enhanced dnotify might be the way to go, 
http://www.lambda-computing.com/~rudi/dnotify/

Is this feasible/workable?

>>
>> If it hits, what types are there in a masklet?
>> I think:
>> * doesn't exist (file not found)
>> * file attribute mask (eg: prevent any writing)
>> * acl 'mask' (an obvious extension of attr but no longer simple 'AND' 
>> logic)
>> * syscall mask (prevent hardlink and maybe chmod - although see below)
>> * 'umask' (chmod) mask (prevent setting suid or execute bit - but may 
>> allows setting +w and setgid on directories - may extend to acls too)
>
> For proof of concept the first 2 suffice.

If we want to specify permissions for a process irrespective of the uid/gid
executing it wouldn't we just specify explicit rights and ignore the ugo
fs attrs?

Regarding permitting/denying syscalls, chmod, etc. I think we should
look into using LSM modules for this (whenever there is funding for it, of course).

David D.


^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: viewprinting: what format should views be stored in?
@ 2004-08-20 17:14 David Dabbs
  0 siblings, 0 replies; 57+ messages in thread
From: David Dabbs @ 2004-08-20 17:14 UTC (permalink / raw)
  To: David Greaves, Hans Reiser; +Cc: George Beshers, reiserfs-list, david

>| David Greaves wrote:
>
>Hans Reiser wrote:
>
>| David Greaves wrote:
>|
>|>
>|> David
>|> PS can I offer 'mask specification' (shortened to maskspec above)
>> instead of 'presentation mask' for the glossary.
>|>
>|>
>|> Glossary? of?
>
>terms.
>There have been occasional mails that try and clarify what we're
>talking about. I think they're helpful.

Definitely. We'll be able to meaningfully discuss implementing if we share
the same concepts for requirements/functionality. Naturally, consistent terminology for these concepts should be helpful for us as well as anyone else 
joiing in sometime later.
 
>Confusion is bad.

Certainly a time waster.


DavidD


^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: viewprinting: what format should views be stored in?
@ 2004-08-20 22:29 David Dabbs
  0 siblings, 0 replies; 57+ messages in thread
From: David Dabbs @ 2004-08-20 22:29 UTC (permalink / raw)
  To: George Beshers, Valdis.Kletnieks; +Cc: David Dabbs, reiserfs-list


George Beshers wrote:
>The honest answer is that it has been over a year since I looked at the
>SELinux stuff.  It is on my to-do list to review what's there.
>
>However, modulo that disclaimer, I believe what we are doing can 
>readily become part of a larger strategy, indeed as you point out, it 
>must to truely promote security. This doesn't bother me in the 
> slightest.  I will feel that the time was worthwhile if our 
> implementation becomes a standard part of a larger security
>apparatus, e.g., because we proved that file system masks could 
>scale to multi-terabyte repositories.
>
>I will take a gander at the paper you reference this weekend.
>
>
>Valdis.Kletnieks@vt.edu wrote:
>
>On Fri, 20 Aug 2004 07:23:24 -0000, David Dabbs said:
>
>>Hans and George, what did you find lacking in currently-available Linux
>>security module frameworks such as LIDS or LSM? They provide system
>>function hooks in which module writers may control object access. 
>>LSM-based work is on-going. See http://sic.iaik.tugraz.at/Best%20Paper
>>%20Award/2004/LSM_quaritsch_winkler.pdf for details of their addition 
>>of module stacking (multiple policies) and hooks into the TCP layer. 
>>I'm going to read up on these frameworks.
>>    
>>
>Amen to that - while reading through Hans' summary, I was having a 
>hard time figuring out what this was buying us that SELinux doesn't 
>provide. Thanks for the pointer to the Quartisch&Winkler paper, as 
>module stacking seems to be heating up.


We should also review the following LSM-based project from IBM
presented at Usenix 2004. 

http://www.usenix.org/events/usenix04/tech/freenix/rahimi.html

While I'm not familiar with the OpenBSD "Trusted Path Execution" concept, controlling trusted/untrusted applications figured centrally in Hans's original proposal. In addition, the abstract mentions a "pseudo-filesystem" and this sounds similar to what has been under consideration here.

DavidD

 

Trusted Path Execution for the Linux 2.6 Kernel as a Linux Security Module 
Niki A. Rahimi, IBM 

Abstract
The prevention of damage caused to a system via malicious executables is a significant issue in the current state of security on Linux operating systems. Several approaches are available to solve such a problem at the application level of a system but very few are actually implemented into the kernel. The Linux Security Module project was aimed at applying security to the Linux kernel without imposing on the system. It performs this task by creating modules that could be loaded and unloaded onto the system on the fly and according to how the administrator would like to lock down their system. 
The Trusted Path Execution (TPE) project was ported to the Linux kernel as a Linux Security Module (LSM) to create a barrier against such security issues from occurring. This paper will attempt to explain how Trusted Path Execution is implemented in the Linux kernel as an LSM. It will also describe how TPE can prevent the running of malicious code on a Linux system via a strategically placed hook in the kernel. The usage of a pseudo-filesystem approach to creating an access control list for users on the system will also be discussed. The paper will further explain how TPE is designed and implemented in the kernel. This paper will show how the access control list is utilized by the module to place checks on the execution of code on the system along with a check of the path the code is being run in. Further, the origins of the "Trusted Path" concept and its origination in the OpenBSD operating system will be discussed along with how TPE was introduced to the Linux security community. The paper will conclude with a synopsis of the contents and future paths and goals of the project. 


^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: viewprinting: what format should views be stored in?
@ 2004-08-21  7:38 David Dabbs
  2004-08-21  8:59 ` Hans Reiser
  0 siblings, 1 reply; 57+ messages in thread
From: David Dabbs @ 2004-08-21  7:38 UTC (permalink / raw)
  To: Hans Reiser, George Beshers; +Cc: Valdis.Kletnieks, David Dabbs, reiserfs-list


>Hans Reiser wrote:
>We only do filesystem isolation because that is our specialty, 
>filesystems, and it is better to do less well.
>
>We fundamentally differ from other approaches because I don't think the 
>problem is in developing tools to allow people to fine grain security if 
>they take the time to do it, I think the problem is that nobody has the 
>time to specify fine grained security for the executables on their 
>computers, and our focus is on the filesystem aspects of automating the 
>specification of the fine grained security for an executable.  
>Researchers after us can generalize our approach to things outside the 
>filesystem namespace, or, better, put those things into the filesystem 
>namespace.;-)

Sounds like your approach will differ a) in scope, in that you are only concerned with securing filesystem access and b) in that you will provide "wizards" where the other approaches provide none or the ones they provide suck. If this is the case, then why are we talking about mask interpreters and how they will moderate file access? Why aren't we focusing on your "sweet spot"; the wizards that assist the clueless/lazy/overworked admin in profiling a process in order to create and maintain the viewprint/mask?

If your ultimate concern is truly in providing tools that make it easy to deploy
comprehensive security, then it seems the approach to take is to contribute wizards/whatever that make implementing your process-oriented fs security vision incredibly simple under LSM or other framework. If you're only going to focus on your metier, filesystems, and exclusively on your own filesystem, at least contribute something that doesn't reinvent any wheels and which "plays well with others." People do need to secure more than the filesystem. Reiser4's adoption curve would seem to benefit if people can implement advanced filesystem security and also use the same framework to secure other aspects.  


David



^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: viewprinting: what format should views be stored in?
@ 2004-08-21 20:48 David Dabbs
  0 siblings, 0 replies; 57+ messages in thread
From: David Dabbs @ 2004-08-21 20:48 UTC (permalink / raw)
  To: Hans Reiser; +Cc: George Beshers, Valdis.Kletnieks, reiserfs-list


>Hans Reiser wrote:
>The LSM paper cited (that does not require paying money) says very 
>little about what they do with regards to the filesystem.  Do you have a 
>more informative URL?
>

Okay. Here's what I found with a few clicks in Google. None of these will describe exactly what you want to do. AFAIKS none are process-oriented, but LSM probably provides much of the foundation needed to get where you want to go.

David


Here's what appears to be a free version of the TPE paper. The reference to "pseudo filesystem" meant the sysfs interface.
http://oss.software.ibm.com/linux/presentations/usenixtech2004/tpepaper.pdf

Sept 2004 SysAdmin mag article about implementing BSD Secure Levels in LSM
* http://www.samag.com/documents/s=9304/sam0409a/0409a.htm

LSM Docs (kernel 2.5 interface, still uses sys_security)
* http://lsm.immunix.org/docs/2.5/lsm_interface.html
* http://lsm.immunix.org/lsm_modules.html

LSM List Archive
* http://mail.wirex.com/pipermail/linux-security-module/2004-August/date.html

File operations controls from the SELinux docs. SEL is LSM-based.
* http://www.nsa.gov/selinux/papers/freenix01/node9.html

"Advances in Linux Security: The Linux Security Modules Project".
Talk given at August 2003 SecureWorld conference.
http://oss.software.ibm.com/linux/presentations/secureworld2003/P14-LSM.pdf
  
LIDS home
* http://www.lids.org/

LIDS faq: protecting files
* http://www.lids.org/lids-faq/lids-faq.html#CONFIGURING-LIDS



^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: viewprinting: what format should views be stored in?
@ 2004-08-22  5:45 David Dabbs
  0 siblings, 0 replies; 57+ messages in thread
From: David Dabbs @ 2004-08-22  5:45 UTC (permalink / raw)
  To: Hans Reiser, George Beshers; +Cc: reiserfs-list


>
>The LSM paper cited (that does not require paying money) says very 
>little about what they do with regards to the filesystem.  Do you have a 
>more informative URL?
>

Here's a concrete example of an LSM directory jail implementation. Not all the features I think you're aiming for but it is source and is indicative of what is possible (er, has already been done) with LSM.

David



http://lwn.net/Articles/57713/

From:   "Serge E. Hallyn" <hallyn@CS.WM.EDU> 
To:   linux-security-module@wirex.com 
Subject:   dirjail module 
Date:   Mon, 10 Nov 2003 23:42:26 -0500 


Attached are the header comments for a new LSM.  I wrote it a few
months ago to address a particular need in a large-scale installation
for which DTE would have been inefficient.  The module source can be
found at http://www.cs.wm.edu/~hallyn/dirjail.c.

I'll be curious to see if anyone else sees any use for this.

-serge

/*
 * File: dirjail.c
 *
 * Description: Intended as an efficient prison for suspect child processes.
 *
 *  Assume a large set of users.  Each has a directory under, say,
 *  /home/sxx/username, where xx is a number from 00-03, and username
 *  is the account name.  Their files may be served and processed by
 *  system processes and scripts (apache, accounting, etc).  However,
 *  they may also, under /home/sxx/username, place their own scripts.  You
 *  wish to confine the scripts to MOSTLY access only /home/sxx/username.
 *
 *  modprobe dirjail
 *  for count in 00 01 02 03; do
 *    echo -n /home/s$count > /proc/jails
 *  done
 *  echo -n /bin > /proc/exec_exceptions
 *  echo -n /lib > /proc/exec_exceptions
 *  echo -n /tmp > /proc/rw_exceptions
 *  echo -n /proc > /proc/read_exceptions
 *
 *  Now a script started from under /home/s01/user3 will be confined to
 *  only read, write, and execute files under /home/s01/user3.  Exceptions
 *  to this are:
 *    it may execute anything under /bin
 *    it may read and write under /tmp
 *    it may read under /proc
 *
 *  For the sake of simplicity, directory rx is always allowed.
 *  However, directory write and file rwx are restricted.
 *
 *  Any children of said process will be convined to the same jail.
 *
 * Copyright (C) 2001 Serge E. Hallyn <hallyn@cs.wm.edu>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 */



^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2004-10-27  4:48 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-16  0:15 viewprinting: what format should views be stored in? 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
2004-08-18  2:37                 ` viewprinting: what format should views be stored in? (let me quickly correct an imprecision) Hans Reiser
     [not found]         ` <4121F4D6.8090506@comcast.net>
2004-08-17 19:43           ` viewprinting: what format should views be stored in? Hans Reiser
  -- strict thread matches above, loose matches on Subject: below --
2004-08-18  7:52 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
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-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-20 17:14 David Dabbs
2004-08-20 22:29 David Dabbs
2004-08-21  7:38 David Dabbs
2004-08-21  8:59 ` Hans Reiser
2004-08-21 20:48 David Dabbs
2004-08-22  5:45 David Dabbs

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.