Re: /proc/<pid>/mem unreadable (was strace and linux 1.3.97)

Miquel van Smoorenburg (
Mon, 6 May 1996 20:21:04 +0200 (MET DST)

In article <>,
Matthias Urlichs <> wrote:
>In, article <>,
> "James H. Cloos Jr." <> writes:
>> 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?
>No, that woon't work, for when the setuid program does a
>it's still vulnerable between these two calls.
>The _only_ workable solution for this is to invalidate the /proc/###/mem
>inode when the process in question calls exec().

As you might have seen, it is fixed in 1.3.98. Access to /proc/###/mem
is only allowed if the process has been PTRACE_ATTACHed to by the
process that tries to read/write/mmap to it.


+ Miquel van Smoorenburg   + Cistron Internet Services +  Living is a     |
| (SP6) | Independent Dutch ISP     |   horizontal     |
+   +    +      fall        +