From: Vasiliy Kulikov <segoon@openwall.com>
To: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Sasha Levin <levinsasha928@gmail.com>,
khlebnikov@openvz.org, xemul@parallels.com,
Dave Jones <davej@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: c/r: broken locking when executing map_files
Date: Fri, 11 May 2012 21:56:40 +0400 [thread overview]
Message-ID: <20120511175640.GA11238@albatros> (raw)
In-Reply-To: <20120506204904.GA1912@moon>
On Mon, May 07, 2012 at 00:49 +0400, Cyrill Gorcunov wrote:
> On Mon, May 07, 2012 at 12:21:32AM +0400, Vasiliy Kulikov wrote:
> > On Sat, May 05, 2012 at 23:32 +0400, Cyrill Gorcunov wrote:
> > > On Sat, May 05, 2012 at 10:53:06PM +0400, Cyrill Gorcunov wrote:
> > > | [root@neptune ~]# /proc/self/map_files/400000-419000
> > >
> > > it sleeps forever until killed, which is not good I think. Vasiliy, could
> > > you remind me what exactly is problem if we use unlocked ptrace_may_access
> > > here?
> >
> > There is a race between ptrace_may_access() and dname_to_vma_addr().
> > The target task may do exec() between these calls and
> > dname_to_vma_addr() will be called against a privileged task. This may
> > lead to a leak of task maps.
>
> Wait, the proc_map_files_lookup requires the caller to be cap-sysadmin
> granted, would not this be enough?
Yes :-) You can also remove additional checks after capable() in
readdir and revalidate functions.
--
Vasily Kulikov
http://www.openwall.com - bringing security into open computing environments
next prev parent reply other threads:[~2012-05-11 17:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-02 17:23 c/r: broken locking when executing map_files Sasha Levin
2012-05-02 17:27 ` Cyrill Gorcunov
2012-05-03 17:31 ` Cyrill Gorcunov
2012-05-05 18:20 ` Vasiliy Kulikov
2012-05-05 18:53 ` Cyrill Gorcunov
2012-05-05 19:32 ` Cyrill Gorcunov
2012-05-06 20:21 ` Vasiliy Kulikov
2012-05-06 20:49 ` Cyrill Gorcunov
2012-05-11 17:56 ` Vasiliy Kulikov [this message]
2012-05-11 18:18 ` Cyrill Gorcunov
2012-05-02 17:34 ` Pavel Emelyanov
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=20120511175640.GA11238@albatros \
--to=segoon@openwall.com \
--cc=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=gorcunov@openvz.org \
--cc=khlebnikov@openvz.org \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xemul@parallels.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