From: James Morris <jmorris@namei.org>
To: Eric Paris <eparis@redhat.com>
Cc: linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov,
linux-security-module@vger.kernel.org, sds@tycho.nsa.gov,
spender@grsecurity.net, dwalsh@redhat.com,
cl@linux-foundation.org, arjan@infradead.org,
alan@lxorguk.ukuu.org.uk, kyle@mcmartin.ca, cpardy@redhat.com,
arnd@arndb.de
Subject: Re: [PATCH -v2 1/2] VM/SELinux: require CAP_SYS_RAWIO for all mmap_zero operations
Date: Wed, 22 Jul 2009 23:53:44 +1000 (EST) [thread overview]
Message-ID: <alpine.LRH.2.00.0907222345530.17486@tundra.namei.org> (raw)
In-Reply-To: <20090721230339.20180.99803.stgit@paris.rdu.redhat.com>
On Tue, 21 Jul 2009, Eric Paris wrote:
> error = security_file_mmap(file, reqprot, prot, flags, addr, 0);
> if (error)
> return error;
> +
> + if ((addr < mmap_min_addr) && !capable(CAP_SYS_RAWIO))
> + return -EACCES;
> +
These DAC checks should happen before the LSM hook, in keeping with the
general design goal of LSM of "DAC before MAC", so that application
behavior remains as consistent as possible.
- James
--
James Morris
<jmorris@namei.org>
next prev parent reply other threads:[~2009-07-22 13:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 23:03 Eric Paris
2009-07-21 23:03 ` [PATCH -v2 2/2] Security/SELinux: seperate lsm specific mmap_min_addr Eric Paris
2009-07-22 9:23 ` [PATCH -v2 1/2] VM/SELinux: require CAP_SYS_RAWIO for all mmap_zero operations James Morris
2009-07-22 13:53 ` James Morris [this message]
2009-07-22 15:42 ` Christoph Lameter
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=alpine.LRH.2.00.0907222345530.17486@tundra.namei.org \
--to=jmorris@namei.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=arnd@arndb.de \
--cc=cl@linux-foundation.org \
--cc=cpardy@redhat.com \
--cc=dwalsh@redhat.com \
--cc=eparis@redhat.com \
--cc=kyle@mcmartin.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=spender@grsecurity.net \
/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®