[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120511175640.GA11238@albatros>
Date: Fri, 11 May 2012 21:56:40 +0400
From: Vasiliy Kulikov <segoon@...nwall.com>
To: Cyrill Gorcunov <gorcunov@...nvz.org>
Cc: Sasha Levin <levinsasha928@...il.com>, khlebnikov@...nvz.org,
xemul@...allels.com, Dave Jones <davej@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: c/r: broken locking when executing map_files
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@...tune ~]# /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
--
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