mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Paris <eparis@parisplace.org>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, hooanon05@yahoo.co.jp,
	jmorris@namei.org, safford@watson.ibm.com,
	"J. Bruce Fields" <bfields@fieldses.org>,
	linux-nfs@vger.kernel.org, Eric Paris <eparis@redhat.com>
Subject: Re: integrity: nfsd imbalance bug fix
Date: Mon, 11 May 2009 16:09:12 -0400	[thread overview]
Message-ID: <7e0fb38c0905111309s38bb5031q3661cb16203e402b@mail.gmail.com> (raw)
In-Reply-To: <1241804120.4843.7.camel@dyn9002018117.watson.ibm.com>

On Fri, May 8, 2009 at 1:35 PM, Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> On Wed, 2009-04-29 at 14:18 -0700, Andrew Morton wrote:
>> On Tue, 28 Apr 2009 14:32:14 -0400
>> Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:

>> > Index: security-testing-2.6/mm/shmem.c
>> > ===================================================================
>> > --- security-testing-2.6.orig/mm/shmem.c
>> > +++ security-testing-2.6/mm/shmem.c
>> > @@ -2680,7 +2680,7 @@ int shmem_zero_setup(struct vm_area_stru
>> >     if (IS_ERR(file))
>> >             return PTR_ERR(file);
>> >
>> > -   ima_shm_check(file);
>> > +   ima_opencount_get(file);
>> >     if (vma->vm_file)
>> >             fput(vma->vm_file);
>> >     vma->vm_file = file;
>>
>> Maybe do the IMA operations in (or under) shmem_file_setup() and
>> hugetlb_file_setup()?
>
> Again, that would hide the real issue of not having done integrity
> (permission) checking.

Where are we doing integrity or permission checks on hugetlb or shm
files?   Andrew's right, another example of this problem would be
drivers/gpu/drm/drm_gem.c::drm_get_object_alloc() (at least in
linux-next) which uses shmem_file_setup().  If we aren't doing
integrity checks on shmem already, why do we care about kernel vs.
non-kernel users?

moving the ima_opencount_get() from newseg down a layer into
*_file_setup() would, I think, have taken care of the drm case as
well.....

-Eric

      parent reply	other threads:[~2009-05-11 20:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28 18:32 Mimi Zohar
2009-04-28 22:56 ` James Morris
2009-04-29 21:18 ` Andrew Morton
2009-05-08 17:35   ` Mimi Zohar
2009-05-08 18:07     ` J. Bruce Fields
2009-05-08 18:47       ` Mimi Zohar
2009-05-11 20:09     ` Eric Paris [this message]

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=7e0fb38c0905111309s38bb5031q3661cb16203e402b@mail.gmail.com \
    --to=eparis@parisplace.org \
    --cc=akpm@linux-foundation.org \
    --cc=bfields@fieldses.org \
    --cc=eparis@redhat.com \
    --cc=hooanon05@yahoo.co.jp \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=safford@watson.ibm.com \
    --cc=zohar@linux.vnet.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

all inboxes | Powered by JetHome®