public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cliffe <cliffe@ii.net>
To: Crispin Cowan <crispin@crispincowan.com>
Cc: Simon Arlott <simon@fire.lp0.eu>,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: Re: Defense in depth: LSM *modules*, not a static interface
Date: Tue, 06 Nov 2007 15:26:49 +0800	[thread overview]
Message-ID: <47301739.3010604@ii.net> (raw)
In-Reply-To: <472FE383.70103@crispincowan.com>

Crispin Cowan wrote:
> Simon Arlott wrote:
>   
>> On Tue, October 30, 2007 07:14, Cliffe wrote:
>>   
>>     
>>> And while I acknowledge that many of these layers are currently buried
>>> within the kernel (netfilter...) they are security layers which in many
>>> cases would probably make sense as stackable security modules.
>>>
>>> Making the interface static forces mammoth solutions which then must
>>> attempt to solve all of the above in one ls*m*. What happened to
>>> dividing tasks into easy to manage chunks?
>>>       
...
>> Alternatively the M in LSM can be restored and modules can be stacked.
>> It should be possible for the primary LSM to check the security_ops of the
>> secondary LSM(s) and complain if it considers there to be an incompatiblity.
>>   
>>     
> That is what I advocate. Restore the modular feature immediately, this
> static interface is lots of cost (mostly opportunity cost) and very
> little benefit (mostly defense against contrived FUD threats).
>
> Crispin
>   

Security can (and should) be implemented in a layered approach. Not 
allowing stacking means that, rather than creating modules which 
complement each other, certain layers need to be migrated into the 
mainline kernel code. This would be ok if every situation had the same 
security requirements; however, they do not.

For example small LSMs that provide hooks for Malware scanners (like 
dazuko), certain security improvements (such as RaceGuard, PaX ...) and 
POSIX capabilities could be stacked with other larger lsms (traditional 
access control, IDS, firewalls) rather than copying these techniques 
into all the large lsms (such as SELinux and AppArmor) or putting them 
into the mainline kernel. Obviously it would be easier to maintain one 
capability lsm which stacks, than capabilities being implemented in 
every access control lsm.

It may be possible to compile stacked LSMs together (I don't know), but 
modules provide greater flexibility and either way stacking should be 
pursued.

I agree with Crispin, restore modules. Then discussions of suitable ways 
of providing stacking can occur / continue.

Cliffe wrote:
> Al Viro wrote:
>> On Tue, Oct 30, 2007 at 03:14:33PM +0800, Cliffe wrote:
>>  
>>> Defense in depth has long been recognised as an important secure 
>>> design principle. Security is best achieved using a layered approach.
>>>     
>>  
>> "Layered approach" is not a magic incantation to excuse any bit of snake
>> oil.  Homeopathic remedies might not harm (pure water is pure water),
>> but that's not an excuse for quackery.  And frankly, most of the
>> "security improvement" crowd sound exactly like woo-peddlers.
>>   
>
> I agree completely; but layers that provide actual security 
> improvements are important. 

Just to clarify, I was agreeing with Al that layers for the sake of 
layers does not improve security if the layers are flawed. I was not 
implying that the specific LSMs that are being proposed currently 
(AppArmor etc) are flawed. I personally think that AppArmor provides 
security improvements which are particularly suitable in some situations.

However, if you do have defense in depth then a flaw in one layer may be 
compensated by another layer. For example if you have a system wide 
firewall that does not allow any incoming traffic to enter a system, and 
an AppArmor profile denies all network traffic to a specific 
application, then a flaw in the firewall which would ordinarily result 
in a compromise of the systems policy would not cause that specific 
application to be exposed. Granted this may be a poor example, but it 
does illustrate that layers provide security improvements. Of course 
this kind of setup does provide management and usability challenges but 
that is an area for improvement.

Anyway I hope that my opinion is helpful,

Cliffe.


-- 
Z. Cliffe Schreuders
BSc Comp Sci (Hons) & Int Comp
PhD Candidate, Casual Tutor
School of IT
Murdoch University

  reply	other threads:[~2007-11-06  6:26 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 19:04 Linux Security *Module* Framework (Was: LSM conversion to static interface) Rob Meijer
2007-10-29 19:41 ` Crispin Cowan
2007-10-30  5:13   ` Peter Dolding
2007-10-30  7:14     ` Defense in depth: LSM *modules*, not a static interface Cliffe
2007-10-30  6:55       ` Al Viro
2007-10-30  7:55         ` Crispin Cowan
2007-10-30 15:01           ` Casey Schaufler
2007-10-30  8:00         ` Cliffe
2007-10-30 12:30       ` Simon Arlott
2007-11-06  3:46         ` Crispin Cowan
2007-11-06  7:26           ` Cliffe [this message]
2007-11-06 23:59             ` Peter Dolding
2007-11-07  3:50               ` Cliffe
2007-11-07  3:35                 ` Casey Schaufler
2007-11-07  4:11                   ` Tetsuo Handa
2007-11-07  4:34                     ` Peter Dolding
2007-11-07  4:34                     ` Casey Schaufler
2007-10-30 18:42     ` Linux Security *Module* Framework (Was: LSM conversion to static interface) Jan Engelhardt
2007-10-30 19:14       ` Casey Schaufler
2007-10-30 19:50         ` Jan Engelhardt
2007-10-30 23:38       ` Peter Dolding
2007-10-31  0:16         ` david
2007-10-31  2:21           ` Peter Dolding
2007-10-31  3:43             ` Casey Schaufler
2007-10-31  5:08             ` david
2007-10-31  6:43             ` Crispin Cowan
2007-10-31  9:03               ` Peter Dolding
2007-10-31 10:10               ` Toshiharu Harada
2007-11-01  2:04                 ` Peter Dolding
2007-11-01  2:20                   ` Casey Schaufler
2007-11-01  2:51                     ` Peter Dolding
2007-11-01  7:17                       ` Jan Engelhardt
2007-11-01 11:49                         ` David Newall
2007-11-04  1:28                           ` Peter Dolding
2007-11-05  6:56                       ` Andrew Morgan
2007-11-05 13:29                         ` Serge E. Hallyn
2007-10-29 20:27 ` Casey Schaufler

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=47301739.3010604@ii.net \
    --to=cliffe@ii.net \
    --cc=crispin@crispincowan.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=simon@fire.lp0.eu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox