Messages in this thread | | | Date | Mon, 13 Jul 1998 11:50:01 -0500 | From | Mitchell Blank Jr <> | Subject | Re: ptrace() fun (Re: CAP_USER_* patch (Was Re: secured logs)) |
| |
Pavel Kankovsky wrote: > Wait... if the user can't read the exe, he (or she) should not be able to > trace the process. Funny, the kernel does not allow you to attach to an > already running process (ptrace(PTRACE_ATTACH,... ) checks dumpable) but > it lets your traced process exec an unreadable exe and you are still > tracing it!! (Both 2.0.34 & 2.1.108 seem to be affected.)
Yes, I brought this up before. After digging around in sys_ptrace() a bit I decided there were probably a few things that weren't done optimally. Unfortunately the current implementation of ptrace is somewhat icky (a seperate version of sys_ptrace under each architecture instead of arch-dependent functions called from a common core syscall) so getting this fixed would be very hard right now. My personal feeling is that this stuff can wait until 2.3 comes out - then we should push for a much-needed reorginization of the arch-dependent directories. Common syscalls like ptrace should have their permission-checking code implemented in one place. This benfits both portability and security.
This isn't to say that the arch-dependent stuff is bad currently - on the whole it's done quite well. This is a good example of a place where it could use a little cleaning up. 2.3 is the time.
-Mitch
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |