Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [suspend] [patch 3/3] attach-fail-reasons: SELinux deny_ptrace
Date: Thu, 08 Mar 2012 16:51:00 -0000	[thread overview]
Message-ID: <4F58E376.2000303@redhat.com> (raw)
In-Reply-To: <87d38nnivc.fsf@fleche.redhat.com>

On 03/08/2012 04:43 PM, Tom Tromey wrote:

> I wonder whether ptrace-hardening approaches other than SELinux still
> have restrictions on PTRACE_TRACEME.  If so then you may want a similar
> patch anyhow.


AFAIK, yama (ubuntu) only protects PTRACE_ATTACH.

From <https://wiki.ubuntu.com/Security/Features#ptrace>:

"ptrace scope

A troubling weakness of the Linux process interfaces is that a single user is able to examine the
memory and running state of any of their processes. For example, if one application was compromised,
it would be possible for an attacker to attach to other running processes (e.g. SSH sessions,
GPG agent, etc) to extract additional credentials and continue to immediately expand the scope
of their attack without resorting to user-assisted phishing or trojans.

In Ubuntu 10.10 and later, users cannot ptrace processes that are not a descendant of
the debugger. The behavior is controllable through
the /proc/sys/kernel/yama/ptrace_scope sysctl, available via Yama.

In the case of automatic crash handlers, a crashing process can specficially allow an existing
crash handler process to attach on a process-by-process basis
using prctl(PR_SET_PTRACER, debugger_pid, 0, 0, 0)."

-- 
Pedro Alves


      parent reply	other threads:[~2012-03-08 16:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06  6:18 Jan Kratochvil
2012-03-06  8:35 ` Mark Kettenis
2012-03-06  8:42   ` Jan Kratochvil
2012-03-06 19:29 ` Tom Tromey
2012-03-08  6:53 ` [suspend] " Jan Kratochvil
2012-03-08 16:43   ` Tom Tromey
2012-03-08 16:46     ` Jan Kratochvil
2012-03-08 17:50       ` Tom Tromey
2012-03-08 16:51     ` Pedro Alves [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=4F58E376.2000303@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=tromey@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox