From: Oleg Nesterov <oleg@redhat.com>
To: Stijn Volckaert <Stijn.Volckaert@elis.ugent.be>
Cc: Roland McGrath <roland@hack.frob.com>,
Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] Allow introspection to already attached ptracer in __ptrace_may_access
Date: Wed, 24 Dec 2014 19:06:54 +0100 [thread overview]
Message-ID: <20141224180654.GA11973@redhat.com> (raw)
In-Reply-To: <549ABF87.8060905@elis.ugent.be>
On 12/24, Stijn Volckaert wrote:
>
> The question now is whether or not it's the security module's
> responsibility to check whether a tracee relationship is already in
> place or if ptrace itself should do it.
Honestly, I have no idea
> --- a/kernel/ptrace.c 2014-12-24 13:53:23.055346526 +0100
> +++ b/kernel/ptrace.c 2014-12-24 14:17:20.617824840 +0100
> @@ -232,6 +232,9 @@ static int __ptrace_may_access(struct ta
> /* Don't let security modules deny introspection */
> if (same_thread_group(task, current))
> return 0;
> + /* Don't deny introspection to already attached ptracer */
> + if (!ptrace_check_attach(task, true))
> + return 0;
Perhaps this makes sense, probably security checks do not make sense
if the target is traced.
But in this case I'd suggest to simply
if (ptrace_parent(task) == current)
return 0;
Oleg.
next prev parent reply other threads:[~2014-12-24 18:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-24 13:28 [PATCH RFC] Allow introspection to already attached ptracer in __ptrace_may_access Stijn Volckaert
2014-12-24 18:06 ` Oleg Nesterov [this message]
2015-01-05 23:47 ` Kees Cook
2015-01-06 0:17 ` Casey Schaufler
2015-01-06 9:07 ` Stijn Volckaert
2015-01-06 18:44 ` Oleg Nesterov
2015-01-08 10:40 ` Stijn Volckaert
2015-01-08 19:18 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141224180654.GA11973@redhat.com \
--to=oleg@redhat.com \
--cc=Stijn.Volckaert@elis.ugent.be \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@hack.frob.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.