linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4+ptrace exploit fix breaks root's ability to strace
@ 2003-03-22 10:31 Russell King
  2003-03-22 14:58 ` Alan Cox
  0 siblings, 1 reply; 15+ messages in thread
From: Russell King @ 2003-03-22 10:31 UTC (permalink / raw)
  To: Linux Kernel List

Hi,

Are the authors of the ptrace patch aware that, in addition to closing the
hole, the "fix" also prevents a ptrace-capable task (eg, strace started by
root) from ptracing user threads?

For example, you can't strace vsftpd processes started from xinetd.

Is this intended behaviour?

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: 2.4+ptrace exploit fix breaks root's ability to strace
@ 2003-04-17  5:46 Yusuf Wilajati Purna
  2003-04-19  5:57 ` Bernhard Kaindl
  0 siblings, 1 reply; 15+ messages in thread
From: Yusuf Wilajati Purna @ 2003-04-17  5:46 UTC (permalink / raw)
  To: linux-kernel, rmk, arjanv, alan; +Cc: purna

Hi,

On 2003-03-22 17:28:54, Arjan van de Ven wrote:
>On Sat, Mar 22, 2003 at 05:13:12PM +0000, Russell King wrote:
>> 
>> int ptrace_check_attach(struct task_struct *child, int kill)
>> {
>> 	...
>> +       if (!is_dumpable(child))
>> +               return -EPERM;
>> }
>> 
>> So, we went from being able to ptrace daemons as root, to being able to
>> attach daemons and then being unable to do anything with them, even if
>> you're root (or have the CAP_SYS_PTRACE capability).  I think this
>> behaviour is getting on for being described as "insane" 8) and is
>> clearly wrong.
>
>ok it seems this check is too strong. It *has* to check
>child->task_dumpable and return -EPERM, but child->mm->dumpable is not
>needed.

So, do you mean that the following is enough:

int ptrace_check_attach(struct task_struct *child, int kill)
{
      ...
+       if (!child->task_dumpable)
+               return -EPERM;
}

Regards,

Purna
         		



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2003-04-22  4:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-22 10:31 2.4+ptrace exploit fix breaks root's ability to strace Russell King
2003-03-22 14:58 ` Alan Cox
2003-03-22 14:10   ` Russell King
2003-03-22 15:28     ` Arjan van de Ven
2003-03-22 17:13       ` Russell King
2003-03-22 17:28         ` Arjan van de Ven
2003-03-22 19:09         ` Alan Cox
2003-03-22 18:01           ` Russell King
2003-03-23 10:31   ` Lists (lst)
2003-03-23 10:38     ` Russell King
2003-03-23 11:11       ` Martin Loschwitz
2003-03-23 10:43     ` Arjan van de Ven
2003-04-17  5:46 Yusuf Wilajati Purna
2003-04-19  5:57 ` Bernhard Kaindl
2003-04-22  5:03   ` Yusuf Wilajati Purna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).