lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071123105457.GA93@tv-sign.ru>
Date:	Fri, 23 Nov 2007 13:54:57 +0300
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Alexey Dobriyan <adobriyan@...ru>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Roland McGrath <roland@...hat.com>,
	Scott James Remnant <scott@...ntu.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm 1/2] ptrace_stop: fix the race with ptrace detach+attach

On 11/23, Alexey Dobriyan wrote:
>
> On Thu, Nov 22, 2007 at 07:14:59PM +0300, Oleg Nesterov wrote:
> > If the tracer went away (may_ptrace_stop() failed), ptrace_stop() drops tasklist
> > and then changes the ->state from TASK_TRACED to TASK_RUNNING.
> > 
> > This can fool another tracer which attaches to us in between. Change the ->state
> > under tasklist_lock to ensure that ptrace_check_attach() can't wrongly succeed.
> 
> ptrace_check_attach? Both do read_lock -- can run in parallel,

Yep.

> so how can it help?

read_lock prevents ptrace_attach(), so the new tracer can't attach
and then do ptrace_check_attach().

Oleg.

-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ