Re: [PATCH][2.4] cleanup ptrace secfix and fix most side effects

Alan Cox (alan@lxorguk.ukuu.org.uk)
08 May 2003 23:48:17 +0100


On Iau, 2003-05-08 at 22:31, Alan Cox wrote:
> > Using is_dumpable() here is not neccesary because the checks done here are:
> >
> > > if (!(child->ptrace & PT_PTRACED))
> > > return -ESRCH;
>
> Except that current->mm->dumpable is not per task but per mm so you
> might ptrace one thread and have another go setuid.

Thinking about this harder

A ptraced thread cannot go setuid since we don't permit the exec to do
it

A setuid thread marks the mm dumpable so no thread can be ptraced (since
all threads inheriting the mm inherit it from the exec)

So ignore my earlier message

-
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/