[lkml]   [1996]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: /proc/<pid>/mem unreadable (was strace and linux 1.3.97)
>>>>> "?????" == unknown author writes:
>>>>> "Aaron" == Aaron Ucko <> writes:
>>>>> "Kevin" == Kevin M Bealer <> writes:

?????> The same happened to me. The problem is that strace accesses
?????> the tracee's memory through /proc/<pid>/mem but as of 1.3.96
?????> any read from processes different from the one which owns the
?????> memory fail with EACCES.

Aaron> This looks like an overly-conservative patch for the
Aaron> /proc/<pid>/mem security hole involving setuid programs. The
Aaron> kernel should really return EACCESS only if the process we are
Aaron> trying to read is setuid.

Kevin> From what I caught of the discussion, you can start watching
Kevin> the process's memory, then have the process 'exec' something
Kevin> suid root, and read straight through the suid root memory.

Seems to me that the answer, then, is to have /prov/<pid>/mem mod 600
and owned by the euid of the process, rather than owned by the uid
that ran it. Linus?

James H. Cloos, Jr. <URL:> Work:

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