From: Eric Paris <eparis@redhat.com>
To: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Andrew Vagin <avagin@parallels.com>,
Andrey Vagin <avagin@openvz.org>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Kees Cook <keescook@chromium.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: Mon, 31 Dec 2012 10:20:47 -0500 [thread overview]
Message-ID: <1356967247.31923.14.camel@localhost> (raw)
In-Reply-To: <20121231151356.GA11118@moon>
On Mon, 2012-12-31 at 19:13 +0400, Cyrill Gorcunov wrote:
> On Mon, Dec 31, 2012 at 09:27:14AM -0500, Eric Paris wrote:
> > On Mon, 2012-12-31 at 14:14 +0400, Andrew Vagin wrote:
> > > On Sun, Dec 30, 2012 at 05:03:07PM -0500, Eric Paris wrote:
> > > > 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
> > >
> > > Currently prctl(PR_SET_MM_*, addr, ) returns EINVAL for valid addresses.
> > > I think it's a bug. Are you agree?
> >
> > Can you help me understand how prctl(PR_SET_MM_*, relates to
> > checkpoint/restore? My worry here is that somehow this interface could
>
> Here how we use it (from userspace code)
>
> ret |= sys_prctl_safe(PR_SET_MM, PR_SET_MM_START_CODE, (long)args->mm.mm_start_code, 0);
> ret |= sys_prctl_safe(PR_SET_MM, PR_SET_MM_END_CODE, (long)args->mm.mm_end_code, 0);
> ...
>
> the values of mm.mm_start_code and such are saved in image file and obtained
> during checkpoint stage. Note the prctl_set_mm requires the caller to have
> CAP_SYS_RESOURCE privilege granted.
Is there anything which prevents an unpriv application from changing
mm.mm_start_code and mm.mm_end_code in the image, thus taking advantage
of the privileged restore code to bypass the mmap_min_addr
restrictions?
next prev parent reply other threads:[~2012-12-31 15:27 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
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 [this message]
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=1356967247.31923.14.camel@localhost \
--to=eparis@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@openvz.org \
--cc=avagin@parallels.com \
--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).