mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Chris Wright <chrisw@osdl.org>, Andrew Morton <akpm@osdl.org>,
	hch@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: 2.6.6-mm2
Date: Fri, 14 May 2004 13:58:49 -0700	[thread overview]
Message-ID: <20040514135849.Y21045@build.pdx.osdl.net> (raw)
In-Reply-To: <20040514191454.GJ3044@dualathlon.random>; from andrea@suse.de on Fri, May 14, 2004 at 09:14:54PM +0200

* Andrea Arcangeli (andrea@suse.de) wrote:
> On Thu, May 13, 2004 at 12:42:49PM -0700, Chris Wright wrote:
> > * Andrew Morton (akpm@osdl.org) wrote:
> > > Chris Wright <chrisw@osdl.org> wrote:
> > > >  +static int capability_mask;
> > > >  +module_param_named(mask, capability_mask, int, 0);
> > > >  +MODULE_PARM_DESC(mask, "Mask of capability checks to ignore");
> > > 
> > > Is there a way to make this tunable at runtime, btw?
> > 
> > Yeah, it'd require sysctl or similar, and further reduces the security,
> > unless you only allow bit clearing or something.
> 
> the runtime switch would be more confortable, the config is:
> 
> ONFIG_SECURITY=y
> CONFIG_SECURITY_NETWORK=y
> CONFIG_SECURITY_CAPABILITIES=y
> CONFIG_SECURITY_CAPABILITIES_BOOTPARAM=y

So you already prepare for a capability bootparam.

> CONFIG_SECURITY_ROOTPLUG=m
> CONFIG_SECURITY_SELINUX=y
> CONFIG_SECURITY_SELINUX_BOOTPARAM=y
> CONFIG_SECURITY_SELINUX_DEVELOP=y
> # CONFIG_SECURITY_SELINUX_MLS is not set
> 
> if the runtime switch needs sysctl then probably we can stay with
> disable_cap_mlock or mlock_group (I prefer disable_cap_mlock because
> having more sysctl doesn't make it more secure, if you can exploit
> disable_cap_mlock you can exploit hugetlbfs_group and you can exploit
> mlock_group too). It's an hack and the simplest hack is

Well it's just basic security issue.  The disable_cap_mlock has less
runtime risk because it's only exposing a single capability.  The ability
to mask off capability checks as boot/module load time (not compilation
time) is more flexible, and doesn't have to touch any extra code (which
gives the feel of cleaner hack), and is runtime safe (unless you care
a lot about setting up oracle, then re-enabling the CAP_IPC_LOCK checks
to minimized risk exposure).  You could give the module_param some 0644
access, but now uid == 0 or CAP_DAC_OVERRIDE could freely change the
mask during runtime.  So, to my thinking, you'd want to control with
sysctl that only allows bit clearing.

> disable_cap_mlock and it is more "featured" than the group that is only
> available to one group of users at once.

Question of audience...machine running oracle, or machine with users
that want safe gpg.  In fact, they probably aren't same machine, and I
bet in both cases a single group would work.  Well, anyway for gpg we
only want rlimits, and this work is already done...

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

  reply	other threads:[~2004-05-14 20:58 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-13 10:27 2.6.6-mm2 Andrew Morton
2004-05-13 10:45 ` 2.6.6-mm2 Christoph Hellwig
2004-05-13 10:51   ` 2.6.6-mm2 Andrew Morton
2004-05-13 11:12     ` 2.6.6-mm2 Christoph Hellwig
2004-05-13 11:25       ` 2.6.6-mm2 Andrew Morton
2004-05-13 13:18         ` 2.6.6-mm2 Adrian Bunk
2004-05-13 13:39           ` 2.6.6-mm2 Chris Mason
2004-05-13 14:09             ` 2.6.6-mm2 Adrian Bunk
2004-05-17 20:52               ` 2.6.6-mm2 Bill Davidsen
2004-05-14  7:30       ` 2.6.6-mm2 Ian Kent
2004-05-13 14:15     ` 2.6.6-mm2 Adrian Bunk
2004-05-13 19:18     ` 2.6.6-mm2 Chris Wright
2004-05-13 19:29       ` 2.6.6-mm2 Andrew Morton
2004-05-13 19:35         ` 2.6.6-mm2 Chris Wright
2004-05-13 19:38       ` 2.6.6-mm2 Andrew Morton
2004-05-13 19:42         ` 2.6.6-mm2 Chris Wright
2004-05-14 19:14           ` 2.6.6-mm2 Andrea Arcangeli
2004-05-14 20:58             ` Chris Wright [this message]
2004-05-15  2:43               ` 2.6.6-mm2 Andrea Arcangeli
2004-05-15  7:43                 ` 2.6.6-mm2 Hugh Dickins
2004-05-14 19:06         ` 2.6.6-mm2 Kevin O'Connor
2004-05-14 19:36           ` 2.6.6-mm2 Chris Wright
2004-05-14 19:42           ` 2.6.6-mm2 Kevin O'Connor
2004-05-13 10:53 ` 2.6.6-mm2, usb ehci warnings/error? Prakash K. Cheemplavam
2004-05-13 12:11   ` 2.6.6-mm-rc3-mm2 USB 2.0 after suspend issue Ari Pollak
2004-05-13 12:14 ` 2.6.6-mm2 Matt H.
2004-05-13 18:24   ` 2.6.6-mm2 Andrew Morton
2004-05-13 22:40     ` 2.6.6-mm2 Greg KH
2004-05-13 12:54 ` i810 AGP fails to initialise (was Re: 2.6.6-mm2) Sean Neakums
2004-05-13 13:53   ` Dave Jones
2004-05-13 13:58     ` Andi Kleen
2004-05-13 14:02       ` Sean Neakums
2004-05-13 15:41         ` Andi Kleen
2004-05-14  3:47           ` Clemens Schwaighofer
2004-05-14  7:42           ` Sean Neakums
2004-05-15  9:52             ` Sean Neakums
2004-05-17  8:49               ` Sean Neakums
2004-05-17 10:01                 ` Andi Kleen
2004-05-17 11:04                   ` Sean Neakums
2004-05-17 11:46                     ` Andi Kleen
2004-05-17 12:37                       ` Sean Neakums
2004-05-13 13:38 ` 2.6.6-mm2: EFI_VARS=m is broken Adrian Bunk
2004-05-13 15:03   ` Matt Domsch
2004-05-13 13:42 ` 2.6.6-mm2 Paolo Ornati
2004-05-13 14:01   ` 2.6.6-mm2: bk-driver-core-module-fix.patch no longer required Adrian Bunk
2004-05-13 14:36     ` Paolo Ornati
2004-05-13 15:07 ` 2.6.6-mm2 Lorenzo Allegrucci
2004-05-13 18:55   ` 2.6.6-mm2 Andrew Morton
2004-05-13 19:41     ` 2.6.6-mm2 Lorenzo Allegrucci
2004-05-14 17:48 ` 2.6.6-mm2 R. J. Wysocki
2004-05-14 17:47   ` 2.6.6-mm2 Christoph Hellwig
2004-05-14 21:20     ` 2.6.6-mm2 R. J. Wysocki
2004-05-14 23:56 ` 2.6.6-mm2 Joseph Fannin
2004-05-14 23:58   ` 2.6.6-mm2 Chris Wright
2004-05-13 12:39 2.6.6-mm2 Oleg Nesterov
2004-05-13 18:28 ` 2.6.6-mm2 Andrew Morton
2004-05-13 23:51 ` 2.6.6-mm2 Nick Piggin
2004-05-13 15:44 2.6.6-mm2 David Brownell
2004-05-13 19:14 2.6.6-mm2 Martin J. Bligh
2004-05-13 19:21 ` 2.6.6-mm2 Andrew Morton
2004-05-13 20:47 ` 2.6.6-mm2 Adrian Bunk
     [not found] <fa.h4eq5gb.nj6q31@ifi.uio.no>
     [not found] ` <fa.gi5j8pu.92umbq@ifi.uio.no>
2004-05-14  0:50   ` 2.6.6-mm2 Andy Lutomirski
2004-05-14  1:01     ` 2.6.6-mm2 Chris Wright
2004-05-14 18:51 2.6.6-mm2 Jan Killius

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=20040514135849.Y21045@build.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®