[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LRH.2.00.0905070946480.22586@tundra.namei.org>
Date: Thu, 7 May 2009 09:48:29 +1000 (EST)
From: James Morris <jmorris@...ei.org>
To: Chris Wright <chrisw@...s-sol.org>
cc: Oleg Nesterov <oleg@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org,
Eric Paris <eparis@...hat.com>,
Stephen Smalley <sds@...ho.nsa.gov>,
David Howells <dhowells@...hat.com>
Subject: Re: [PATCH 3/3] ptrace: do not use task_lock() for attach
On Wed, 6 May 2009, Chris Wright wrote:
> * Oleg Nesterov (oleg@...hat.com) wrote:
> > But this can happen without this change too?
> >
> > - cpu2 takes task_lock(), tracehook_tracer_task() returns NULL because
> > we are not traced yet.
> >
> > - cpu1 does ptrace_attach() and succeds, because cpu2 didn't update sid
> > yet
> >
> > - cpu2 continues, it doesn't check avc_has_perm() (tracer == 0) and
> > updates sid.
> >
> > No?
>
> Yes.
>
> > Shouldn't selinux_setprocattr() take ->cred_exec_mutex, like we do in
> > selinux_bprm_set_creds() path?
>
> I was looking at the same, seems like it to me. James?
As far as I can tell, yes.
(Added David Howells and security folk to the cc -- please make sure at
least that the LSM list is cc'd when changing code which affects LSM
modules).
- James
--
James Morris
<jmorris@...ei.org>
--
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