chiark / gitweb /
Avoid simple memory dumps via ptrace
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Wed, 12 Aug 2015 00:28:26 +0000 (20:28 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 18 Sep 2017 20:41:12 +0000 (21:41 +0100)
commit604500ead1762a926b1d68af98737f27f4173adf
tree6eb395fbf0123463b487e09a095540b02fc8c229
parent6ee2737d1c36c9eb5f8f8483c0e29f0267434add
Avoid simple memory dumps via ptrace

This avoids needing to setgid gpg-agent.  It probably doesn't defend
against all possible attacks, but it defends against one specific (and
easy) one.  If there are other protections we should do them too.

This will make it slightly harder to debug the agent because the
normal user won't be able to attach gdb to it directly while it runs.

The remaining options for debugging are:

 * launch the agent from gdb directly
 * connect gdb to a running agent as the superuser

Upstream bug: https://bugs.gnupg.org/gnupg/issue1211

Gbp-Pq: Topic block-ptrace-on-agent
Gbp-Pq: Name 0002-Avoid-simple-memory-dumps-via-ptrace.patch
agent/gpg-agent.c
configure.ac