lkml.org 
[lkml]   [1998]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.023 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site