From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Oren Laadan <orenl@cs.columbia.edu>
Cc: Linux Containers <containers@lists.osdl.org>,
Stephen Smalley <sds@epoch.ncsc.mil>,
Casey Schaufler <casey@schaufler-ca.com>,
linux-security-module@vger.kernel.org,
SELinux <selinux@tycho.nsa.gov>,
Alexey Dobriyan <adobriyan@gmail.com>,
Andrew Morgan <morgan@kernel.org>
Subject: Re: [PATCH] c/r: tighten ptrace checking for checkpoint to PTRACE_MODE_ATTACH
Date: Thu, 25 Jun 2009 07:48:39 -0500 [thread overview]
Message-ID: <20090625124839.GA29757@us.ibm.com> (raw)
In-Reply-To: <1245922467-9444-1-git-send-email-orenl@cs.columbia.edu>
Quoting Oren Laadan (orenl@cs.columbia.edu):
> Security modules distinguish reading of process state (via proc) from
> full ptrace access using the access mode: PTRACE_MODE_{READ,ATTACH}.
>
> Read access to /proc/pid/mem requires a full ptrace attach (for more
> details, see: http://lwn.net/Articles/282930/).
>
> Checkpoint needs access to full process state, including memory, so
> we require PTRACE_MODE_ATTACH.
>
> Signed-off-by: Oren Laadan <orenl@cs.columbia.edu>
Acked-by: Serge Hallyn <serue@us.ibm.com>
thanks,
-serge
> ---
> checkpoint/checkpoint.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/checkpoint/checkpoint.c b/checkpoint/checkpoint.c
> index 325dfa3..7b141e3 100644
> --- a/checkpoint/checkpoint.c
> +++ b/checkpoint/checkpoint.c
> @@ -296,7 +296,7 @@ static int may_checkpoint_task(struct ckpt_ctx *ctx, struct task_struct *t)
> return -EAGAIN;
> }
>
> - if (!ptrace_may_access(t, PTRACE_MODE_READ)) {
> + if (!ptrace_may_access(t, PTRACE_MODE_ATTACH)) {
> __ckpt_write_err(ctx, "access to task %d (%s) denied",
> task_pid_vnr(t), t->comm);
> return -EPERM;
> --
> 1.6.0.4
prev parent reply other threads:[~2009-06-25 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 9:34 [PATCH] c/r: tighten ptrace checking for checkpoint to PTRACE_MODE_ATTACH Oren Laadan
2009-06-25 12:48 ` Serge E. Hallyn [this message]
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=20090625124839.GA29757@us.ibm.com \
--to=serue@us.ibm.com \
--cc=adobriyan@gmail.com \
--cc=casey@schaufler-ca.com \
--cc=containers@lists.osdl.org \
--cc=linux-security-module@vger.kernel.org \
--cc=morgan@kernel.org \
--cc=orenl@cs.columbia.edu \
--cc=sds@epoch.ncsc.mil \
--cc=selinux@tycho.nsa.gov \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox