Re: /proc/<pid>/mem unreadable (was strace and linux 1.3.97)
Miquel van Smoorenburg (miquels@drinkel.ow.org)
Mon, 6 May 1996 20:21:04 +0200 (MET DST)
In article <96May3.101144+0100met_dst.2218-305+20@work.smurf.noris.de>,
Matthias Urlichs <smurf@smurf.noris.de> wrote:
>In linux.dev.kernel, article <199605021038.FAA16498@caffeine.io.com>,
> "James H. Cloos Jr." <cloos@jhcloos.com> 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
>seteuid(getuid())
>exec(user_program)
>
>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.
Mike.
--
+ Miquel van Smoorenburg + Cistron Internet Services + Living is a |
| miquels@cistron.nl (SP6) | Independent Dutch ISP | horizontal |
+ miquels@drinkel.ow.org + http://www.cistron.nl/ + fall +