#794667 gnupg-agent: facilitate running gpg-agent as a separate user account

#794667#5
Date:
2015-08-05 14:24:48 UTC
From:
To:
gpg-agent doesn't defend against another process by the same user
inspecting its memory or doing other nasty things to the process.
While i'm encouraging upstream to add what protections are possible
[0], it would also be useful to have some tooling around creating a
secondary user account to run the agent in a designated,
non-privileged manner.

This might be a distro-specific project, since account creation,
removal, etc are normally not handled by gpg itself, but by the
distro.

Perhaps we can use this bug to brainstorm such an approach for
gpg-agent at least.

#794667#10
Date:
2015-08-06 22:36:58 UTC
From:
To:
Another way that a distro can mitigate this (and other) attacks on a
user process like gpg-agent is by installing it with the setgid bit
set. The Linux kernel will prevent ptrace attacks on such a process in
a race free manner.

for example, ssh-agent already does exactly this:
ian@draal~ [i]> ls -l /usr/bin/ssh-agent
-rwxr-sr-x 1 root ssh 350232 Mar 23 11:32 /usr/bin/ssh-agent*