- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Oct 12 2015
Oct 6 2015
Done with commit 9db6547. Thanks for reminding me about this annoyance.
Oct 3 2015
Oct 2 2015
Sep 30 2015
Sep 23 2015
Sep 22 2015
Sep 21 2015
Sep 17 2015
Sep 11 2015
Thank you, I'll send the DCO.
Also, I'll rebase the patches against current git master and adjust them to
conform with the doc/HACKING requirements.
Nope. Search for the original discussion on the debian bug tracker. We
introduced this option just for one Debian user and it shall in general not be
used. Thus who feel that they need a longer key should anywa switch to ecc.
Sep 10 2015
Sep 9 2015
gpg-agent has a --allow-emacs-pinentry option which should solve dkg's concerns
of unintended use of the emapcs pinebtry feature.
Thus I change your request for a generic method to pass options to pinentry to a
feature request.
Sorry, I missed that for 2.0.29
Sep 8 2015
This should be something similar to gpg --always-trust
Sep 7 2015
No DCO received, no review, won't apply. Sorry.
To be considered for 1.7
We can consider that for 1.7.
Can you please send a DCO to gcrypt-devel (see doc/HACKING).
Sorry, we won't do that.
(Please do not try to continue a discussion here but take it to gcrypt-devel
instead - but I doubt that you will convince us).
Sep 4 2015
AESNI is enabled in the gnupg 2.1 installer which we will use with gpg4win 3.0
Sep 1 2015
Aug 31 2015
Aug 27 2015
Did you mean:
In this case we should also return 0 ?
Aug 24 2015
ANy news?
Aug 13 2015
c) Run gpg-agent under gdb
d) Run a modified gpg-agent (rm ~/S.gpg-agent; my-gpg-agent --daemon)
e) Hook into the tty and use pinentry-curses
f) scp ~/.gnupg/private-keys-v1.d/* mybox: and sniff the passphrase.
re 1) ssh-rsa-cert-v01@openssh.com is the certifiate as used by sshd/ssh. The
agent protocols however uses an ssh-rsa-cert-v00@openssh.com format to send the
private key to the agent. We should be easy to support this if it is sufficient
to just get the private key from the ssh-rsa-cert-v00.
re 2) I need to look close on how this is handled by the ssh-agent protocol.
gpg-agent should not look for an ssh file directly because its API is based on
the ssh-agent protocol. Thus a modified ssh is required. I noticed an
ssh-agent object related to card - this needs futher investigations.
Aug 12 2015
so far, the proposed mechanisms for getting at gpg-agent's memory from a peer
process running as the same user are:
a) ptrace (e.g. via /usr/bin/gcore or /usr/bin/strace)
b) /proc/$PID/mem, which is owned by the user and mode 0600
DarkStarSword's patch effectively closes (a) (by rejecting ptrace connections)
and appears on my GNU/Linux system to close (b) as well: /proc/$PID/mem is
root-owned when the patch is applied instead of being user-owned.
Are there other channels for per-process memory access that we should be
thinking about?
I agree with Werner and Neal that the UNIX model is probably insufficient to
close all the holes easily, but i also don't think that's a good reason to avoid
closing those holes we can close.
If there are other ways that another process by the same user can get at the
RAM, please point them out and i'll look into ways to address them too.
In the meantime, i'll also look into ways to facilitate running the process as a
separate user account entirely.
I am closing this.
BTW: I can't share DarkStarSword's fear about prioritizing ease of debugging
over security - I would never do that for a real security problem; Neal and me
both explained why this proposed fix does can't help against an attack.
I'm going to introduce the prctl(SET_DUMPABLE, 0) change to main in
agent/gpg-agent.c in the debian 2.1.x series as of 2.1.7-1, using the patch i'm
attaching here.
I make no representations that this solves all possible memory leakages, but it
does address one specific and relatively straightforward attack.
As to Werner's legitimate concerns about making debugging harder, there remain
at least two options: ptrace as the superuser, and launching gpg-agent itself
under gdb directly.
If this experiment proves disastrous somehow (i'm not seeing how), we can always
revert the patch.
Aug 11 2015
The issue is not resolved: if "gpg --recv-keys" is not sufficient, then some
other step must be added to the instructions, as currently they do not work, at
least not for this non-expert user.
There are two problems:
- This sentence does not make sense: "You should see a message indicating that
the signature is good and made by of the signing keys." (Maybe the solution is
as simple as deleting "of"?)
- The following instructions are too brief: "Make sure that you have the right
key, either by checking the fingerprint of that key with other sources or by
checking that the key has been signed by a trustworthy other key." Someone who
is trying to download GnuPG as part of bootstrapping a secure environment for
the first time (e.g. so they can download other software such as Tor in a
trustworthy way), will not know how to follow either of those suggestions.
Concrete instructions are needed.
If I simply download the GPG sources and corresponding signature, and run the
gpg --verify command that is given, I get the following output:
gpg: directory `/home/rrt/.gnupg' created
gpg: new configuration file `/home/rrt/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/rrt/.gnupg/gpg.conf' are not yet active during
this run
gpg: keyring `/home/rrt/.gnupg/pubring.gpg' created
gpg: Signature made Wed 01 Jul 2015 13:56:58 BST using RSA key ID 4F25E3B6
gpg: Can't check signature: public key not found
gpg: Signature made Thu 02 Jul 2015 05:31:06 BST using RSA key ID 33BD3F06
gpg: Can't check signature: public key not found
In other words, it doesn't seem to do anything useful.
This is on purpose. --recv-key is not sufficient.
Please send mail and follow the instructions on the page.
Aug 9 2015
Glad I was able to help get one bug fixed at least :)
The in-memory encryption will definitely help in this scenario (that is, a
casual attack by e.g. a colleague or another student having a laugh as their
friend left their screen unlocked... real attack - I should know, I've done it,
and had it done to me, as had several of my friends back in uni (to be fair -
that was on Firefox password manager, but it could just as easily have been
gpg-agent)... This is not about stopping a motivated attacker with physical
access to the system as they could always subvert the system in other ways e.g.
adding a shell alias to run a trojaned gpg-agent instead of the real thing,
install a key logger, etc).
I'm still not super happy that a casual attacker could walk away with a core
file containing the encrypted passphrase and the key to decrypt it. What started
as a casual attack for a laugh could later transform into a more serious attack
given that they can hold onto this information indefinitely. I'm not a motivated
attacker, but that would tempt the hell out of me if I was even slightly so
inclined. I should know, because I've been in a similar situation in the past
where I obtained an unshadowed passwd file (through a purely casual attack when
I was looking up a friend's uid and discovered the passwd file was not
shadowed... so of course I made a copy). I could have left it alone, but it
tempted the hell out of me and I ended up running john over it for two straight
weeks (never did much with the result, but that's not the point)!
I would hope that the developers of any security product learns to think like an
attacker.
I must say I am deeply troubled by the priority seeming to be on the ease of
debugging a security product which has the sole purpose of keeping a passphrase
safe. As the saying goes security is always a trade-off, but given that
gpg-agent is a security product and not a word processor, this particular trade
off does not sit right with me. I would expect the development team to have root
access on their own systems, which avoids the issue as the root user can always
attach a debugger with or without this change - is there truly a reason that
they need to attach to a running gpg-agent on a system they don't have root on?
And what about the thousands of gpg-agents running on other systems in the wild
that should never need to attach a debugger (and if they do... sudo)?
The information about FIPS mode and SELinux is good to know, at least for people
running distributions that support and enable them by default. But from what I
can gather FIPS mode is a RHEL only feature (I may be wrong - I'm not all that
familiar with it), and SELinux is still either not enabled, or in permissive
mode in many distributions by default (including Debian and Ubuntu).
As I mentioned in the original report, an alternative way to protect the memory
of gpg-agent is to install it with the setgid bit set (ssh-agent does both the
prctl() and setgid for example - now there's some developers I applaud). Unlike
SELinux and FIPS mode this works in every distribution and has been supported
for donkeys years.
Aug 7 2015
With my tests it works with keyrings when specified using --keyring.
However, gpgv should also work with a keybox by default. This is now
implemented:
trustedkeys.kbx is now the default. If that does not exists gpgv also tries to
use trustedkeys.gpg (keybox or keyring) for backward compatibility. Right there
is a minor backward compatibility problem if a file "trustedkeys.kbx" alread
exists and you migrate to 2.1 - but I do not think that this is a real world
problem.
I am not sure how to to this in gpg and gpgme, thus for now only the gpg-agent part.
Okay, I added a --force option to gpg-agent.
gpg-connect-agent 'DELETE_KEY --force <KEYGRIP>' /bye
Does now do the same as
rm ~/.gnupg/private-keys-v1.d/<KEYGRIP>.key
This identified another bug: To be prepared for FIPS evaluation,
gpg-agent does not store the cached passphrases in the clear but
encrypts them in memory. Right this is security by obscurity but if
we ever have a way to store that key in a secured RAM (e.g. TPM, ARM
TrustZone) we can indeed limit the time a passphrase is available in
the clear to the period it is really needed. This all seems to work
but your tests shows that libassuan does not clear its internal line
buffers so that you can actually find the passphrase in the core
file. I just pushed a fix for this.
IIRC, FIPS mode in Linux inhibits all access to process memory system
wide. Changing this just a for a single user process does not make
much sense.
Further, being able to attach to a running processing is one of the
best debug methods we have. Giving up on this without for a perceived
extra protection is not going to work. There are too many ways to get
the passphrase using other ways. Linux can't protect a user to get
data belonging to him. Iff gpg-agent were a system daemon things
would be different and extra protection would make sense as a
fallback.
Without this I can do gcore pidof gpg-agent and QUITE CLEARLY see my
passphrase in the produced dump:
ian@draal~ [i]> gcore (pidof gpg-agent) 0x00007fb8f8849293 in __select_nocancel () at
../sysdeps/unix/syscall-template.S:81
81 ../sysdeps/unix/syscall-template.S: No such file or directory. warning: target file /proc/1560/cmdline contained unexpected null characters warning: Memory read failed for corefile section, 8192 bytes at 0x7ffce0a12000. Saved corefile core.1560 0x00007f2dd583c293 in __select_nocancel () at
../sysdeps/unix/syscall-template.S:81
81 ../sysdeps/unix/syscall-template.S: No such file or directory. warning: target file /proc/1540/cmdline contained unexpected null characters warning: Memory read failed for corefile section, 8192 bytes at 0x7ffccfbe3000. Saved corefile core.1540 ian@draal~ [i]> strings core.1560 | grep pass passwd This is my ultra secure passphrase - I definitely expect any program that
manages this to take reasonable steps to keep it safe even if I accidentally
leave my screen unlocked one day!
Invalid passphrase; please try again You need a passphrase to unlock the secret key for user:%0A"test123
<test@test.com>"%0A2048-bit RSA key, ID DE3A7EAB, created 2015-08-06 (main key
ID F459B571)%0A
SETERROR Invalid passphrase; please try again
his is my ultra secure passphrase - IQ
ian@draal~ [i]>With this one line change I cannot do the above - that's the definition of
reducing the attack surface last time I checked.
You absolutely can still use gdb to debug it - you just have to start it under
gdb as opposed to attaching to an existing process, or attach the debugger as
root. You could also just disable the syscall in a debug build.
Aug 6 2015
The problem is that the same secret key may be used for OpenPGP, S/MIME, Ssh,
and possible other cleints directly accessing gpg-agent.
Thus I am not sure how to best do it. The direct gpg-agent interface of gpgme
could be used to delete a key if we add a --force option to the agent's
DELETE_KEY command.
It does not reduce the attack surface. And yes, it complicates things
because you can't anymore debug the process without changing the code
or using other tricks (aka attack). I have not tested the SELinux
feature for quite some time but gnupg supports SELinux if configured
with --enable-selinux-support. If you want some protection better use
that.
dkg: We disable core dumps for the simple reason that we do not want
to see core files on disk. Disk sectors have a longer lifetime than a
process and a user session - thus avoiding core files is a real world
threat mitigation.
This has since been handled in: T1691
It is fixed in Gpg4win.
Aug 5 2015
So a single syscall to demonstrably reduce the attack surface really complicates
things does it?
News to me.
I agree with you that the standard UNIX model is generally insufficient here.
Perhaps the distros could weigh in with mechanisms to facilitate
secondary-account creation for agents and the like. I've opened
https://bugs.debian.org/794667 about this.
However, i don't think the weak UNIX permissions model is a reason to avoid a
small piece of code like that offered by DarkStarSword below. Closing off one
avenue of attack is still worthwhile, even if other avenues remain. As werner
said, gpg-agent won't create a coredump (even though other avenues of attack are
possible).
Is there something about the complexity of prctl(PR_SET_DUMPABLE, 0); that makes
it undesirable?
dkg: The problem is that the underlying architecture is broken. Unix's stock
permission model is about protecting users from other users, not protecting
processes from other processes. Thus, I don't think it makes any sense to
complicate the code by implementing these effectively useless protections.
FWIW, a widely used practical system that does a much better job at this is
Android. Android runs every program under its own uid. We could do the same
thing with gpg-agent. In fact, this is currently possible with a little help
from ssh. Unfortunately, this requires a fair amount of work by the user to set
up. In particular, the user needs to create a secondary account. It would be
nice if distributions provided a simply way for an unprivileged user to allocate
additional uids, but this is probably a lot of work.
Aug 4 2015
The Mail you show is a so called PGP/MIME mail.
We are well aware that GpgOL for Outlook 2010 and later versions only provides a
very basic OpenPGP support and no PGP/MIME Support. It is mentioned on the
website and in the documentation.
We are hoping to develop this but this is a huge Feature and very problematic to
implement given Outlook's extension API.
Jul 28 2015
This was done with 26ab44b.
I'm now using pinentry-qt5 as my main pinentry but I doubt that there will be
any problems. After dropping the "Secure widgets" There were no code changes
necessary to support Qt5.
Jul 22 2015
Solution is fine for me from a usability point of view.
For other users, it is not fine because they will first have to find this
solution, which probably will not happen before having fallen into the pit. So I
would prefer a changed default behavior.
I will try to convince the authors of the OpenPGP standard to remove some of the
complexity of the standard as well as the resulting issues.