[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8bd0f97a0910160006y3e0479b1o390579a0cd469533@mail.gmail.com>
Date: Fri, 16 Oct 2009 03:06:11 -0400
From: Mike Frysinger <vapier.adi@...il.com>
To: David Howells <dhowells@...hat.com>
Cc: graff.yang@...il.com, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org,
uclinux-dist-devel@...ckfin.uclinux.org,
gyang@...ckfin.uclinux.org, akpm@...ux-foundation.org
Subject: Re: [Uclinux-dist-devel] [PATCH] mm/nommu.c: Fix improperly call of
security API in mmap
On Wed, Oct 14, 2009 at 10:08, David Howells wrote:
> <graff.yang@...il.com> wrote:
>> The original code calling security_file_mmap() use user's hint address
>> as it's 5th argument(addr). This is improper, as the hint address may be
>> NULL.
>> In this case, the security_file_mmap() may incorrectly return -EPERM.
>>
>> This patch moved the calling of security_file_mmap() out of
>> validate_mmap_request() to do_mmap_pgoff(), and call this
>> security API with the address that attempting to mmap.
>
> I think this is the wrong approach. Firstly, the hint is cleared in NOMMU
> mode, and secondly, I think that the check against the minimum LSM address is
> pointless in NOMMU mode too.
>
> So I think the attached patch is a better approach.
Acked-by: Mike Frysinger <vapier@...too.org>
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists