lkml.org 
[lkml]   [2006]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateMon, 4 Sep 2006 15:00:27 -0700 (PDT)
FromLinus Torvalds <>
SubjectRe: Trouble with ptrace self-attach rule since kernel > 2.6.14


On Mon, 4 Sep 2006, Andreas Hobein wrote:
>
> I've tested tracing child threads from the parent thread as well as tracing
> siblings and parent threads from a child. All tests where successful when
> reverting the above mentioned changes.

The problems tend to happen when the thread leader exits while one of the
sub-threads is being traced, and the tracer thread ends up being
re-parented to be the child of the traced thread (or something like that -
I forget the exact details).

There was also some problem with the tracer doing an exit() without
detaching, or something.

We may have fixed most of the problems since - Oleg has certainly been
cleaning up some of this, and it's possible that the problems we had are
ok now.

Even back when it was broken, _normal_ use never showed the problem (ie no
well-behaved ptrace use would cause anything bad to happen). But the
breakage was a local DoS attack, where you could either force an oops or a
unkillable process, I forget which.

There was an exploit for at least one of the exploits, so maybe somebody
could test that exploit together with the one-line revert.

That said, it sounds like both of the people who ever noticed this are
reasonably happy with their work-arounds, so I'm hoping we can simply
decide not to care, and just keep doing the simpler "you can't ptrace your
own thread group" thing. That rule simply avoids a lot of special cases.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [from the cache]
©2003-2010