From: Eric Paris <eparis@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov,
linux-security-module@vger.kernel.org, jmorris@nameil.org,
serue@us.ibm.com, morgan@kernel.org, casey@schaufler-ca.com,
esandeen@redhat.com
Subject: Re: [PATCH -v1 2/3] vm: use new has_capability_noaudit
Date: Wed, 29 Oct 2008 15:57:07 -0400 [thread overview]
Message-ID: <1225310227.23736.31.camel@localhost.localdomain> (raw)
In-Reply-To: <1225307723.6588.119.camel@moss-spartans.epoch.ncsc.mil>
On Wed, 2008-10-29 at 15:15 -0400, Stephen Smalley wrote:
> On Wed, 2008-10-29 at 15:06 -0400, Eric Paris wrote:
> > The oomkiller calculations make decisions based on capabilities. Since
> > these are not security decisions and LSMs should not record if they fall
> > the request they should use the new has_capability_noaudit() interface so
> > the denials will not be recorded.
> >
> > Signed-off-by: Eric Paris <eparis@redhat.com>
> > ---
> >
> > fs/proc/base.c | 2 +-
> > mm/oom_kill.c | 6 +++---
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/proc/base.c b/fs/proc/base.c
> > index 486cf3f..ef83e81 100644
> > --- a/fs/proc/base.c
> > +++ b/fs/proc/base.c
> > @@ -1020,7 +1020,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
> > task = get_proc_task(file->f_path.dentry->d_inode);
> > if (!task)
> > return -ESRCH;
> > - if (oom_adjust < task->oomkilladj && !capable(CAP_SYS_RESOURCE)) {
> > + if (oom_adjust < task->oomkilladj && !has_capability_noaudit(current, CAP_SYS_RESOURCE)) {
>
> This one looks like an actual permission check to see whether the
> current task is authorized to modify this value (by writing to some proc
> node). Which should be audited. Unlike the others, where they are
> checking whether some other task has a capability in order to help
> decide priorities for the OOM killer.
Will be fixed in -v2
next prev parent reply other threads:[~2008-10-29 19:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 19:06 [PATCH -v1 1/3] SECURITY: new capable_noaudit interface Eric Paris
2008-10-29 19:06 ` [PATCH -v1 2/3] vm: use new has_capability_noaudit Eric Paris
2008-10-29 19:15 ` Stephen Smalley
2008-10-29 19:57 ` Eric Paris [this message]
2008-10-29 19:07 ` [PATCH -v1 3/3] filesystems: use has_capability_noaudit interface for reserved blocks checks Eric Paris
2008-10-30 15:29 ` [PATCH -v1 1/3] SECURITY: new capable_noaudit interface Serge E. Hallyn
2008-10-30 16:46 ` Paul Moore
2008-10-30 17:17 ` Eric Paris
2008-10-30 17:29 ` Paul Moore
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=1225310227.23736.31.camel@localhost.localdomain \
--to=eparis@redhat.com \
--cc=casey@schaufler-ca.com \
--cc=esandeen@redhat.com \
--cc=jmorris@nameil.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=morgan@kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=serue@us.ibm.com \
/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