From: Chris Wright <chrisw@osdl.org>
To: Fred Emmott <mail@fredemmott.co.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] make root_plug more useful via whitelist
Date: Mon, 29 Nov 2004 16:47:32 -0800 [thread overview]
Message-ID: <20041129164732.G14339@build.pdx.osdl.net> (raw)
In-Reply-To: <200411272347.15728.mail@fredemmott.co.uk>; from mail@fredemmott.co.uk on Sat, Nov 27, 2004 at 11:47:15PM +0000
* Fred Emmott (mail@fredemmott.co.uk) wrote:
> patch: http://fredemmott.co.uk/files/rp.patch
>
> This adds a whitelist of programs such as /bin/login and /sbin/agetty which
> may be ran as root without the USB device prescent. It also includes my
> earlier patch to check the USB device's serial number as well as
> vendor/product.
>
> This is not meant for inclusion; I'd appreciate comments on anything I've done
> wrong, and suggestions on how to make it distribution neutral (at the moment
> it probably only works correctly on slackware) - I'm thinking of adding a
> security/root_plug_relax/ directory containing files such as "slackware.h"
> "redhat.h" etc.
There's a couple of problems here. First, the serial number thing
should be done differently. The serial number should be spcecified by
a module parameter, and just store it as u8 and do direct compare (this
will eliminate the unecessary kmalloc, and the subsequent memory leak
you introduced). Second, the relax stuff should not be done via config
parameters. It, of course, undermines the point of the module, but if
you want to do it, make it done via userspace writing to some exposed fs
(e.g.. echo /usr/bin/foo > ..../relax). Finally, do the lookup there,
and then keep your whitelist as inode based, not pathname based.
thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
next prev parent reply other threads:[~2004-11-30 0:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-27 23:47 Fred Emmott
2004-11-27 23:50 ` Randy.Dunlap
2004-11-27 23:58 ` Fred Emmott
2004-11-30 0:47 ` Chris Wright [this message]
2004-12-03 11:13 ` Fred Emmott
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=20041129164732.G14339@build.pdx.osdl.net \
--to=chrisw@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@fredemmott.co.uk \
/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®