Logo Umeet2001

ESPAÑOL
Presentación

Programa

Desarrollo

ENGLISH

Presentation

Programa

Desarrollo


rielok, time to start, I guess
rielI will now make this channel moderated
rielmeaning that the audience cannot speak here
rielinstead, if you have a question, please ask it in the channel #qc
rielok, I'll be introducing today's lecture
rielwell, today's evening lecture, David had another lecture earlier today ;)
rielthis lecture will be about a framework for a more flexible security infrastructure in Linux
rielmore flexible security is a good thing, for various reasons
rielfor one, on large server systems the traditional user - group - other security is a pain to manage for eg. the anonymous CVS user
rieltoday's lecture will be given by Chris Wright and Seth Arnold from WireX Communications
rielthey are developing the Linux Security Module (LSM) framework
cdubheh, is that our queue? ;-)
rielas for an introduction about them, they have told me nothing special would be needed, since "<cdub> heh, sarnold's cunning intelect and smashing good looks speak for themselves ;-)"
rielso I guess I'll turn over the channel to cdub and sarnold
cdubthanks riel ;-)
sarnoldthank you riel for introducing us, and thanks also to uninet.edu for providing a forum for a lecture series
rieloh, and if you have a question ... feel free to ask it in #qc
cdub<rsd:#qc> is LSM somewhat related to NSA work on security for Linux?
cdubheh, we'll start off with some history, and you should see the analogy
cdubyes, thanks.  and also, thanks to all who are attending.
cdubalright...
cdubstarting with the linux 2.5 kernel summit.
cdubthe NSA gave a presentation aobut SELinux and the security framework they had in the kernel.
cdubto make a long story short, linus and others agreed that linux needed advanced security
cdubhowever, linus really wanted something flexible.
cdubhe did not want to accept one security project at the cost of turning another away.
cdubthis basically started the LSM project.
cdubwe started trying to define an abstract framework to allow a variet of security policies to be implemented in the kernel
cdubwithout having to continue patching for every project.
cdubthe first important question we faced was how do we want to interpose our framework
cdubthere were many people in favor of a strict syscall interpostition
cdubwe eventually chose to leave the syscall boundary alone
cdub(which was good, as linus advised us against it)
cdubinstead we chose to view each kernel object that was accessible to user space as something that needs protection
cdubthe state-of-the-art in the present kernel allows for basic mode bit tests (super user test) and capabilities tests (which typically amount to a super user test)
cdubso we started by trying to create a framework that would support the current access control system in the kernel
cdubthe problem with the syscall boundary is that it is far away from where the 'action' is taking place.
cdubthere is user data that needs to be copied into kernel, there are kernel objects that need to be looked up, etc.
cdubso by focusing on the kernel objects themselves, like inode, file, task_struct, etc, we feel we can get best access control coverage
cdubby looking at the placement of the existing capable() and suser() checks we saw that this approach was not too far off from where the kernel presently is.
cdubso we began defining a structure of callbacks that represents all the kernel objects, and all the actions that users can do the manipulate the kernel object
cdubthe lsm code itself that is in the kernel is a series of hooks that protects access to the kernel objects
cdubthese hooks execute the callbacks, which call into module specific code
cdubone critical idea here is
cdubseparate _policy_ from _mechanism_
cdubwe want to make the framework as security policy agnostic as possible, and push _all_ policy decisions into the security module.
cdubthe current security policies in the kernel are bascially DAC (discetionary access control)
cdubbut there are many other types of security policies, like MAC, DTE, etc...
cdubone important feature missing in DAC is the ability to do object specific labelling
cdubacme:#qc> like the netfilter infrastructure?
sarnoldas far as I understand netfilter :) yes, very similar to the netfilter infrastructure
cdubyes, just like that ;-)
cdubso part of the access control framework supports object labelling
cdubthis means we've added a new member to all these kernel objects...
cdubsomething we affectionately call, the opaque security blob
cdubso, in addition to providing access control hooks, we provide the necessary allocation/deallocation hooks for these policy sepcific opaque security blobs (read: void * ;-)
cdubthen, the security module can use these labels as part of the access control criteria when chosing whether to allow access or not.
cdubthat's the high level overview of LSM
cdubperhaps we should field some questinos before we move on
cdub<velco:#qc> blob ? like Binary Large OBject ? large
cdubthese are just void *, the security module can place whatever it likes there
cdubacme:#qc> what other uses do you envision when this infrastructure (i.e. the hooks) are in place? resource control (i.e. kinda like userbeans)?
sarnold< acme:#qc> what other uses do you envision when this infrastructure (i.e. the hooks) are in place? resource control (i.e. kinda like userbeans)?
cdubhehe
cdubgo ahead sarnold ;-)
sarnoldI'm sorry to say that I do not know what userbeans are off the top of my head; however, the hooks are placed in fairly convenient locations .. I imagine there are probably many possible uses..
sarnoldsome quick and dirty thoughts that come to mind are features such as BSD's portal filesystem, or directory watchers..
cdubacme, one of the things we have tried to do, is resist a generic hooking scheme...so the hooks are specific to access control
sarnold< acme:#qc> userbeans: is user quotas for kernel resources, Andrey Savochkin did it and Marcelo Tosatti worked a bit on it in the past
sarnoldhow very cool :)
cdubsure, sounds like something that could be implemented in an LSM.
sarnoldI imagine that a security module could also take a whack at implementing resource limits through the LSM interface
cdubsince LSM has hooks to control object creation, etc...
cdub<acme:#qc> kinda like inode->u.generic_ip, netdevice->private, struct sock->protinfo.destruct_hook (yes, I'm overloading the thing) 8)
cdubyes, we have inode->i_security, etc. and these hold module specific object labels.
cdubany other questions before we move on?
cdubsarnold, anything you'd like to add?
cdubriel:#qc> will it be possible to use multiple security modules at the same time ?
sarnold13:30 < riel:#qc> will it be possible to use multiple security modules at the same time ?
cdubhehe, how about you hold on just a sec on that one ;-)
cdubi was going to cover that next
cdubalright...
cdubnow that we've looked at the high level framework, let's take a look at some of the details.
cdubthe callbacks are all in one stucture, security_operations.
cdubwhen the module is initialized, either at load time, or during init_calls if it's complied in to kernel
cdubit needs to initializ this security_ops
cdubthis is done via a standard, register_security type interface
cduband one of the first things we hit was
cdubhow to possibly stack security modules with this interface
cdub(and don't forget each module is storing it's own opaque label in the kernel object)
cdublinus has strong opinions on this, as do many people in the security field
cdublinus says effectively, do not compose security policies
cdubsecurity research says, that in general, security policies do not compose
cdubwe decided to take a middle ground here.
cdubone important thing to note is that the super user and capabilities checks are done against data in the task_struct directly
cdubso it should be "trivial" to compose an arbitrary security policy with the superuser or capability module, since they don't directly step on each other's toes (via the opaque pointer)
cdubthe only problem now, is the kernel interface (the callback structure)
cdubso we have the notion of a primary module.  this is the one that first calls register_security
cduball subsequent modules register not with the kernel, but with the primary module itself
cdubthis allows the kernel to be clueless about module stacking
cduband forces the modules that are stacking with each other to explicitly allow such behaviour
cdubthis way, we think that while arbitrary composition of security policies may be an intractable problem
cdubcompostion of some know policies can be done easily
cdubwe have considered creating a basic composition module
cdubthat just allows you to register multiple modules, and basically && or || the results, but such a module does not exist right now.
cdubso to recap, module stacking is supported, but we tried to make the kernel unaware, so the stacking mechanism is not fully generic.
cdubanother key issue that we hit was what exactly does a hook look like?
cdubdoes the hook give authoritative access to an object, or just simply restrictive access to an object.
cdubthis makes most sense when you consider what the kernel code looks like.
cdub<riel:#qc> cdub: mmmm, something like ACLs would combine well with something like vserver  (virtual servers in one machine)
cdubyes, i think so, however, we still have a few other issues to iron out with vserver, that i'll get to shortly.
cdubkernel code often looks like this:
cdubif (uids != match && !(capable()) goto failed;
cdubdo_action()
cdubwith LSM it looks similar:
cdubif (uids != match && !(capable()) goto failed;
cdubif (security_ops->do_action()) goto failed;
cdubdo_action();
cdubso we have a problem that we may want to override access to some object for some subject
cdubthe security hook there is only going to restrict access granted by the in-kernel logic
cdubwe have argued about this very point quite a bit, and decided to make a compromise...
cdubwe have a hook in the capable() function, so that fucntion can override (this is the behaviour of 'standard' POSIX.1e capabilities)
cdubthe compromise is that, the capable function gets very little context.  just a 32 bit vector CAP_SYS_ADMIN, etc...
cdubso while we can restrict access to objects on a very fine granularity
cdub(the restrictive interfaces may have many arguments to the callback, inode, dentry, etc.)
cdubwe can only override access control on a coarse granularity (32bit vector)
cdubwe chose this compromise because it enables the most security modules, with the smallest amount of changes in the kernel.
cdubalright, now the vserver problem...
cdubvserver is a project to allow multiple virtual servers to run in isolated security contexts
cdubwe can support most of what vserver would like to do, with two exceptions:
cdub1) vserver directly touches scheduler code, something we never intend to do...hopefully more modular scheduler designs will offload this from us ;-)
cdub2) vserver returns data to the user based on the users context
cdubwe can restrict access to the data based on the context, but we can not return context specific data in call syscall paths.
cdubthis is something that we can work on as we improve the LSM framework.
cduboh, i forgot to mention, LSM is targeting 2.5 for mainline acceptance...
sarnold(as a specific example, vserver can return different uname information to different security contexts..)
cdubyes, thanks sarnold ;-)
cdub(we can acutally handle that one, but some of the others we can't, sorry can't remember which right now)
cdubanother problem we've had should hopefully be solved for us by the VFS changes anticipated in 2.5
cdubsome security policies would like to make access control decisions based on file name, while others based on inode number.
cdubthe security_ops framework mirrors the inode_operations
cdubso just before the filesystem is called to do something, we check if it's ok
cdub<maluco:#qc> cdub : like LIDS do?
cdubyou mean filenames?
cdubyes, exactly ;-)
cdubsome argue that filenames aren't sufficient, since you are really trying to protect the inode, but that's a matter for security policy wars ;-)
cdubwe try to be agnostic, so we hope to support projects like LIDS.
cdubsince our hooks mirror the inode_operations, we take the same arguements.
cdubfor those that have tried, you can't reliably build a pathname from an inode alone.  you really need both the dentry and the vfsmount
cdubluckily, al viro plans on chaning the filesystem interface, so we anticipate this functionality Real Soon Now (TM) ;-)
cdubwhew, that's a lot of info...perhaps we should break for some more questions....
cdubheh, alright then, no more rest for my typing hand ;-)
cdubso where are we now?
cdubwe have implemented the full framework
cduband we have implemented modules that use the framework, namely superuser and capabilities.
cdubin addition, from the lsm community at large, we have a DTE module, an SELInux module, and a module that implements much of the Openwall kernel patch.
cdubwe are closely tracking 2.5 development, and hope to propose lsm sometime after the VFS changes are done.
cdubi haven't mentioned a whole lot about the network part of LSM.
cdubit draws largely from netfilter, and only adds what's missing for complete coverage.
cdubso part of the LSM interface is a series of netfilter hooks.
cdubwe do not want to re-invent the wheel afterall ;-)
cdubah, yes, and of course, we are tracking the extended attributes and ACL development, as EA makes enables a lot of labeling to be done without having to use a backing file for a attribute database
cdub<acme:#qc> cdub:  using the netfilter existing infrastructure for the network parts of LSM is a nice thing
cdubyes, i agree ;-)
cdub<acme:#qc> cdub:  but by doing that you're extending a network specific infrastructure and going toward a more generic infrastruture ;)
cdubwell, that's one way to look at it ;-)  when it came to LSM network supoort it was obvious that we needed to leverage netfilter.
cdubso, i think of netfilter as extending LSM ;-)
cdubheheh
cdubs/extending/enhancing
cdub<acme:#qc> so netfilter, LSM, EA, userbeans, etc could be a big generic hook infrastructure 8)
cdubindeed, and this is where we walk a fine line.
cdubfor example, the LTT project came to us when we first started and suggested we use LTT as the beginning of LSM
cduband this is exactly what we don't want.
cdubso we try to keep focused on security and access control
cdub<acme:#qc> but there are common parts and this is where all the projects can benefit
cdubyes, i agree, we don't plan to solve all the problems, but just as we've used netfilter, others can use us to enable there needs.
cdubfor example, we do not support full audit
cdubthis has high kernel intrusion
cdubbut, people who care about audit have a lot of there work done for them by LSM
cdub<velco:#qc> is LSM concerned with authentication ? where does it get credentials (and veryfier). or it is outside the scope of LSM ?
cdubthis we consider a policy that would be enforced by a module., so LSM core does not care.
cdubLSM hooks things like fork and exec for example
cdubso during this time the module may set the tasks credentials.
cdub<hensema:#qc> I've recently read in some interview that the Hurd is able to  run a process without a user concext, eg. without rights. This would enable a ftp server to run without rights (as apposed to running as root on Unix) until a user is logged in. Would something like this be implementable using LSM?
cdubyes, and in fact, judicious use of capabilities would allow this on linux already i think.
sarnold14:18 < Jae:#qc> which modules are already available ?
cdubbut LSM can enable you to give your ftp server just the rights it needs to do it's job, and no more ;-)
cdubDTE, SELinux, Openwall, capability, superuser are the modules available right now.
sarnoldthere are currently the root=god module, POSIX1.e capabilities, a domain and type enforcement module, the SELinux module, many pieces of Solar Designer's Openwall module ..
cdubSELinux is itself in infrastructure that allows multiple policies (MAC, etc.) so there is quite a bit available now.
cdubLIDS people said they would like to port when LSM stableizes
cduband i have a partially functional vserver module
cduband, we are accepting patches and modules ;-)
cdubah yes, and i believe Janus has plans to use LSM
cdubsarnold, do you have anything to add?  what have i forgotten? ;-)
sarnold(note that we don't intend to try to get the various LSM modules accepted into 2.5 mainline along with LSM .. we keep them in a source repository along with LSM mainly for convenience and helping to keep them up to date...)
sarnoldhmm
sarnoldan additional thought .. riel was asking about composing ACLs and vserver
sarnoldand, perhaps this is a great example of why generic modules don't automatically compose well
sarnoldfor example, the ACLs could be implemented entirely 'within' the vserver's context, providing an additional level of mandatory access control through vserver
sarnoldhowever, the ACLs could also be implemented outside the vserver framework, to allow more fine-grained sharing between the vservers
sarnoldtwo perfectly legitimate security policies come from slightly different perspectives of composing two (fairly straight-forward looking) modules
sarnoldare there any other questions?
cdubsome project details...
cdubyou can find patches at lsm.immunix.org
rielok, it seems pretty quiet now
sarnold(oh yes, for those of you wondering about 'LTT' from above: http://www.opersys.com/LTT/)
cdubwe have a mailing list...
cdubhttp://mail.wirex.com/mailman/listinfo/linux-security-module
cduband we hang out on irc.openprojects.net #lsm-dev
cdub<wli:#qc> Is it within the scope of LSM design to counteract covert communication channels?
cdubahh, good question.
cdubnot completely, as this is a losing battle.
cdubyes, and i/o seek times, etc..
cdubwe do not have the ability to close all covert channels
cdubbut there are many LSM hooks that help you cover many cases.
cdubkind of a bland answer, but covert channels are very tough...
rielok, thanks to cdub and sarnold for this nice lecture
rielin 30 minutes there will be another lecture
rielby  Raúl Eduardo Millán Villalaz, about Viabilidad economica y técnica de Linux en el Escritorio de Trabajo
rielthat lecture will be in spanish, but maybe there will be a translation in #redes
rielcdub, sarnold:  THANK YOU
fernandoplas plas plas plas plas plas plas plas plas plas plas plas plas
fernandoplas plas plas plas plas plas plas plas plas plas plas plas plas
rielclap clap clap clap clap clap clap clap
rielclap clap clap clap clap clap clap clap
rielclap clap clap clap clap clap clap clap
fernandoplas plas plas plas plas plas plas plas plas plas plas plas plas
rielclap clap clap clap clap clap clap clap
rielclap clap clap clap clap clap clap clap
fernandoplas plas plas plas plas plas plas plas plas plas plas plas plas
fernandoplas plas plas plas plas plas plas plas plas plas plas plas plas
MJesusclap clap clap clap clap clap clap clap clap clap
wliheh
MJesusclap clap clap clap clap clap clap clap clap clap
MJesusclap clap clap clap clap clap clap clap clap clap
hensemaThanks, cdub en sarnold. Very nice
FloodeRsplas splas splas
FloodeRsplas splas splas
FloodeRsplas splas splas
JALHclap clap clap clap clap clap clap
JALHclap clap clap clap clap clap clap
MJesusclap clap clap clap clap clap clap clap clap clap
MJesusclap clap clap clap clap clap clap clap clap clap
MJesusclap clap clap clap clap clap clap clap clap clap
FloodeRchop chop chop
FloodeRchop chop chop
MJesusclap clap clap clap clap clap clap clap clap clap
E-D-W-I-Nplas plas plas plas plas plas plas plas plas plas plas plas plas
E-D-W-I-Nplas plas plas plas plas plas plas plas plas plas plas plas plas
E-D-W-I-Nplas plas plas plas plas plas plas plas plas plas plas plas plas
E-D-W-I-Nplas plas plas plas plas plas plas plas plas plas plas plas plas
*** dmc has left #linux
fernandoplas plas plas plas plas plas plas plas plas plas plas plas plas
E-D-W-I-Nplas plas plas plas plas plas plas plas plas plas plas plas plas
MJesusclap clap clap clap clap clap clap clap clap clap
fernandoplas plas plas plas plas plas plas plas plas plas plas plas plas
E-D-W-I-Nplas plas plas plas plas plas plas plas plas plas plas plas plas
E-D-W-I-Nplas plas plas plas plas plas plas plas plas plas plas plas plas
MJesusclap clap clap clap clap clap clap clap clap clap
fernandoplas plas plas plas plas plas plas plas plas plas plas plas plas
*** joseph has left #linux
dardhalsarnold: great work
E-D-W-I-Nplas plas plas plas plas plas plas plas plas plas plas plas plas
dardhalcdub: great work
MJesusplas plas plas plas plas plas plas plas plas plas plas plas plas plas plas
Jaeclap clap clap clap clap clap clap clap clap clap clap clap
cdubthanks for listening!  and please join us on the mailing list or irc if you'd like to help or ask more question!
* Jae is downloading the patch :)
*** riel changes topic to '00:00 CET Raúl Eduardo Millán Villalaz "Viabilidad economica y técnica de Linux en el Escritorio de Trabajo" | English in #redes ?? | questions in #qc'
* riel really has to go now
rielcdub, sarnold: it was a nice and interesting lecture
cdubthanks unriel
MJesusthnks all !!

Generated by irclog2html.pl by Jeff Waugh - find it at freshmeat.net!


Mas información: umeet@uninet.edu