From: Eric Paris <eparis@redhat.com>
To: Andrey Vagin <avagin@openvz.org>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Kees Cook <keescook@chromium.org>,
Cyrill Gorcunov <gorcunov@openvz.org>,
Serge Hallyn <serge.hallyn@canonical.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
James Morris <jmorris@namei.org>
Subject: Re: [PATCH] prctl: fix validation of an address
Date: Sun, 30 Dec 2012 17:03:07 -0500 [thread overview]
Message-ID: <1356904987.9725.10.camel@localhost> (raw)
In-Reply-To: <1356778810-20879-1-git-send-email-avagin@openvz.org>
On Sat, 2012-12-29 at 15:00 +0400, Andrey Vagin wrote:
> The address should be bigger than dac_mmap_min_addr, because
> a process with CAP_RAWIO can map a vma bellow mmap_min_addr.
NAK
This doesn't make any sense. dac_mmap_min_addr should ONLY be used in
security/min_addr.c and security/commoncap.c. Period. You should not
be allowed to circumvent LSM protections. Maybe you are missing that
mmap_min_addr = max(dac_mmap_min_addr, CONFIG_LSM_MMAP_MIN_ADDR) ?
But this patch is absolutely unacceptable. Maybe you can help me
understand what problem you had and what you were hoping for?
-Eric
>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Cyrill Gorcunov <gorcunov@openvz.org>
> Cc: Serge Hallyn <serge.hallyn@canonical.com>
> Cc: "Eric W. Biederman" <ebiederm@xmission.com>
> Cc: Eric Paris <eparis@redhat.com>
> Cc: James Morris <jmorris@namei.org>
> Signed-off-by: Andrey Vagin <avagin@openvz.org>
> ---
> kernel/sys.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sys.c b/kernel/sys.c
> index 265b376..e0e1bbd 100644
> --- a/kernel/sys.c
> +++ b/kernel/sys.c
> @@ -1868,7 +1868,7 @@ static int prctl_set_mm(int opt, unsigned long addr,
> if (opt == PR_SET_MM_EXE_FILE)
> return prctl_set_mm_exe_file(mm, (unsigned int)addr);
>
> - if (addr >= TASK_SIZE || addr < mmap_min_addr)
> + if (addr >= TASK_SIZE || addr < dac_mmap_min_addr)
> return -EINVAL;
>
> error = -EINVAL;
next prev parent reply other threads:[~2012-12-30 22:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-29 11:00 [PATCH] prctl: fix validation of an address Andrey Vagin
2012-12-30 22:03 ` Eric Paris [this message]
2012-12-31 10:14 ` Andrew Vagin
2012-12-31 14:27 ` Eric Paris
2012-12-31 15:13 ` Cyrill Gorcunov
2012-12-31 15:20 ` Eric Paris
2012-12-31 15:38 ` Cyrill Gorcunov
2012-12-31 21:12 ` Serge E. Hallyn
2013-01-01 8:26 ` Andrey Wagin
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=1356904987.9725.10.camel@localhost \
--to=eparis@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@openvz.org \
--cc=ebiederm@xmission.com \
--cc=gorcunov@openvz.org \
--cc=jmorris@namei.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serge.hallyn@canonical.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;
as well as URLs for NNTP newsgroup(s).