Re: [RFC][PATCH v2] security: split proc ptrace checking into read vs. attach

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stephen Smalley
Date: Thursday, May 15, 2008 - 12:45 pm

On Thu, 2008-05-15 at 14:37 -0500, Serge E. Hallyn wrote:
<snip>
<snip>

I was going to split up the mem checking, but when I noticed that
check_mem_permission() presently always requires current to already be
tracing the target process, I saw no point in distinguishing between the
different modes of access - they all effectively require full ptrace in
the first place.

The other case that might be nice to distinguish is readlink vs.
follow_link, as the latter potentially allows access to objects that
would otherwise be private to the target process (pipes, sockets) or
unreachable by current (files in directories not searchable by current),
as noted by Chris, but I'm not sure how helpful that will be in practice
because most if not all programs that access /proc/pid/fd at all end up
at least stat'ing the fd files even if they never open them, and thus
always hit follow_link.  But SELinux will check those attempts to stat
or open the files at least.

-- 
Stephen Smalley
National Security Agency

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH v2] security: split proc ptrace checking into ..., Stephen Smalley, (Thu May 15, 11:56 am)
Re: [RFC][PATCH v2] security: split proc ptrace checking ..., Casey Schaufler, (Thu May 15, 12:25 pm)
Re: [RFC][PATCH v2] security: split proc ptrace checking ..., Serge E. Hallyn, (Thu May 15, 12:37 pm)
Re: [RFC][PATCH v2] security: split proc ptrace checking ..., Stephen Smalley, (Thu May 15, 12:45 pm)