Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262259AbTEHXe2 (ORCPT ); Thu, 8 May 2003 19:34:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262262AbTEHXe1 (ORCPT ); Thu, 8 May 2003 19:34:27 -0400 Received: from pc2-cwma1-4-cust86.swan.cable.ntl.com ([213.105.254.86]:1162 "EHLO lxorguk.ukuu.org.uk") by vger.kernel.org with ESMTP id S262259AbTEHXe0 (ORCPT ); Thu, 8 May 2003 19:34:26 -0400 Subject: Re: [PATCH][2.4] cleanup ptrace secfix and fix most side effects From: Alan Cox To: Bernhard Kaindl Cc: Linux Kernel Mailing List , Marcelo Tosatti , Bernhard Kaindl In-Reply-To: <1052429495.13567.7.camel@dhcp22.swansea.linux.org.uk> References: <1052429495.13567.7.camel@dhcp22.swansea.linux.org.uk> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Message-Id: <1052434095.13551.54.camel@dhcp22.swansea.linux.org.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 08 May 2003 23:48:17 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 849 Lines: 24 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/