Subject: Re: Linux ptrace emulation patch
To: None <>
From: Christos Zoulas <>
List: tech-kern
Date: 05/24/2001 20:59:34
In article <>,
Emmanuel Dreyfus <> wrote:
>I fixed a bug in Linux ptrace emulation on the PowerPC. It's located in
>machine independent code, and I'm not sure this fix would not break non
>PowerPC ports (that is, i386, since Alpha and m68k do not seem to have a
>strong ptrace support).
>Therefore, I'm looking for someone who could test emulation of
>Linux/i386 gdb on a Linux process and check that this patch does not
>decrease gdb functionnality.

I think that this is a security hole...


>Index: linux_misc.c
>RCS file: /cvsroot/syssrc/sys/compat/linux/common/linux_misc.c,v
>retrieving revision 1.88
>diff -r1.88 linux_misc.c
>>       int ret;
><                       return sys_ptrace(p, &pta, retval);
>>                       ret = sys_ptrace(p, &pta, retval);
>>                       switch (request) {
>>                               case LINUX_PTRACE_PEEKTEXT:
>>                               case LINUX_PTRACE_PEEKDATA:
>>                                       ret = copyout (retval, 
>>                                           (caddr_t)SCARG(&pta, data),
>>                                           sizeof ret);
>>                                       *retval = SCARG(&pta, data);
>>                                       break;
>>                               default:        
>>                                       break;
>>                       }
>>                       return ret;
>Emmanuel Dreyfus