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] [day] [month] [year] [list]
Message-ID: <20110627174041.GA13983@redhat.com>
Date:	Mon, 27 Jun 2011 19:40:41 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	penguin-kernel@...ove.sakura.ne.jp
Cc:	roland@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: arch_ptrace_attach() without ptrace_traceme()?

On 06/27, Oleg Nesterov wrote:
>
> On 06/27, penguin-kernel@...ove.sakura.ne.jp wrote:
> >
> > Regarding commit f1671f6d "ptrace: fix exit_ptrace() vs ptrace_traceme() race",
> > is calling arch_ptrace_attach() when ptrace_traceme() returned 0 without doing
> > anything (due to PF_EXITING race) expected behavior?
>
> Hmm. Good point, I thinks this should be fixed.

But it is not clear how we can fix this, perhaps we should ignore this
problem...

arch_ptrace_attach() is inherently racy when PTRACE_TRACEME is called.
Please note that f1671f6d did not introduce this race, although I have
to admit I didn't notice this problem when I did this patch.

The race with PF_EXITING you described doesn't differ from another
scenario. PF_EXITING is not set, ptrace_traceme() actually attaches
the caller, but its paren exits and untraces it before it does
arch_ptrace_attach().

If only I knew what arch_ptrace_attach() can do in general ;) But
probably it should be paired with ptrace_disable(), and it is not
called when the tracer detaches on exit anyway. So I think we can
ignore this race.

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