Page MenuHome GnuPG
Feed Advanced Search

Dec 15 2016

justus added a comment to T2400: GnuPG 2.1 regression in unattended key generation.

I'm going to write some documentation about the programmatic use of GnuPG.

Dec 15 2016, 5:54 PM · gnupg (gpg22), Bug Report, gnupg
justus claimed T2400: GnuPG 2.1 regression in unattended key generation.
Dec 15 2016, 5:54 PM · gnupg (gpg22), Bug Report, gnupg
justus closed T2359: Query which key will be used for a given mailbox as Resolved.
Dec 15 2016, 5:29 PM · gnupg (gpg22), gnupg, Feature Request
justus added a comment to T2700: Clean up the command line interface (avoid abbreviated --long-options, consistency).

Fixed for gpg as of 6b16b02109f4bb5b934e456667ff4c0ba7bc85fd.

Dec 15 2016, 5:27 PM · gnupg, Feature Request, gnupg (gpg22)
justus added a project to T2700: Clean up the command line interface (avoid abbreviated --long-options, consistency): In Progress.
Dec 15 2016, 5:27 PM · gnupg, Feature Request, gnupg (gpg22)

Dec 13 2016

justus set External Link to https://lists.gnupg.org/pipermail/gnupg-devel/2016-December/032298.html on T2701: Do not let users create keys without an expiration date.
Dec 13 2016, 4:53 PM · Feature Request, gnupg (gpg22)
justus closed T2701: Do not let users create keys without an expiration date as Resolved.
Dec 13 2016, 4:53 PM · Feature Request, gnupg (gpg22)
justus added a comment to T2701: Do not let users create keys without an expiration date.

--quick-keygen fixed in dd3dde07a9a46130ac01d849f8edf0566e44f11f.

The default expiration interval has been discussed on the mailing list. There
was a rough consensus on two years, which has been challenged by Neal who thinks
it is too short given the current state of the tools, but the ensuing discussion
did not revolve around the time span, so I'm keeping my two years for now. In
any case, it is easy to adjust.

I decided to not change the --full-key-gen, because a) the user asked for it, b)
changing that requires breaking up a large chunk of translated text, and I do
not want to do that right now (a release is imminent).

Dec 13 2016, 4:53 PM · Feature Request, gnupg (gpg22)

Dec 9 2016

werner closed T2857: gpg-agent crashes regularly, out of core in secure memory allocations as Resolved.
Dec 9 2016, 4:04 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner removed a project from T2857: gpg-agent crashes regularly, out of core in secure memory allocations: Restricted Project.
Dec 9 2016, 4:04 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

I just released Libgcrypt 1.7.4 - whcih should fix that bug.

Dec 9 2016, 4:04 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
justus added a comment to T2701: Do not let users create keys without an expiration date.

Partially addressed in d568a1561642ed9b7b7b6282b86c56786d10a956.

Dec 9 2016, 2:56 PM · Feature Request, gnupg (gpg22)

Dec 7 2016

werner added a project to T2857: gpg-agent crashes regularly, out of core in secure memory allocations: Restricted Project.
Dec 7 2016, 5:39 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner removed a project from T2857: gpg-agent crashes regularly, out of core in secure memory allocations: In Progress.
Dec 7 2016, 5:39 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

Backported to LIBGCRYPT-1-7-BRANCH

Dec 7 2016, 5:39 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

I have now pushed a change to Libgcrypt master to implement auto-extending of
secre memory pools. Commit b6870cf but there are two cother commits which this
is based upon. My test shows that I can now decrypt a message encrypted to the
test-hugekey.key.

I will port this back to Libgcrypt 1.7.

Dec 7 2016, 5:07 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent

Dec 6 2016

werner added a comment to T2701: Do not let users create keys without an expiration date.

Would you mind to write to gnupg-devel and ask for comments on your proposal?
In particular on how long the default expiration time shall be. 12, 18, or 24
months?

Dec 6 2016, 9:55 PM · Feature Request, gnupg (gpg22)
werner added a project to T2857: gpg-agent crashes regularly, out of core in secure memory allocations: In Progress.
Dec 6 2016, 5:50 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

I will try out the idea of extending the secmem pool even if that means no mlock.

Dec 6 2016, 5:50 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
dkg added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

ah right, "ulimit -l" says 64 (kbytes) on my Linux system as well. According to
mlock(2) that's since kernel 2.6.9.

So i think it's worth adopting the supplied patch as a workaround at least (i
can confirm that it resolves the specific use case described in T2857 (dkg on Dec 05 2016, 05:47 PM / Roundup)), and i
agree with you that we should extend libgcrypt to extend secure memory allocation.

it's not clear to me that swap is outside the trust boundary anyway these days,
and modern systems should prefer encrypted swap where possible.

Dec 6 2016, 5:49 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

The secmem has two goals:

  • Avoid swapping out tehse pages. Thus the mlock.
  • Making sure that on free the memory is zeroized.

mlock requires root privileges and thus a special init sequence is required
(install as setuid(root) and gpg-agent drops the privileges direct after
allocating and mlocking the secmem). In the old times, and probably still today
on non-Linux platforms, this is still required. However, Linux turned to
allowing any process to mlock a certain amount (64k on my box).

I tend to suggest that we extend Libgcrypt to extend the secure memory
allocation by not using mlocked memory but keeping the the seroization feature.
The second option from T2857 (wk on Dec 05 2016, 07:11 PM / Roundup).

Dec 6 2016, 5:38 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
dkg added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

is the only goal of the secure memory to keep the RAM from being written to
swap, or are there other goals of secure memory? why is it unlikely that a new
block of memory can be mlock'd? what are the consequences of the new block not
being mlock'd? will it still be treated as secure memory?

crashing in the event that we run out of secure memory is simply not acceptable
these days, especially in a model where we have persistent long-term daemons
that people expect to remain running.

Dec 6 2016, 5:18 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
dkg added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

I just posted 0001-agent-Respect-enable-large-secmem.patch to gnupg-devel:

https://lists.gnupg.org/pipermail/gnupg-devel/2016-December/032285.html

Dec 6 2016, 5:12 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
dkg added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

D400: 927_0001-agent-Respect-enable-large-secmem.patch

Dec 6 2016, 5:12 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent

Dec 5 2016

werner added a comment to T2857: gpg-agent crashes regularly, out of core in secure memory allocations.

Yeah, I saw the Debian bug report. Unfortunately there is no easy
solution to this except for rejecting the use of large secret keys.

The problem here is that the big number library needs to allocate from
a limited secure memory region (32 KiB by default) and terminates on
allocation failure. I know that this is sub-optimal but we are doing
this for 19 years now. Checking for an error after each low-level big
number operation would make the code unreadable and will introduce
bugs. Ideas on what to do:

  • On secure memory allocation failure, call the out-of-memory handler which may then free other memory (or purchase new memory). This can be done in the application.
  • On secure memory allocation failure, allocate a new block of secure memory and allocate from that one. There are two disadvantages: a) It is unlikely that the new block can be mlock'd. b) A free will be a a little bit slower because it needs to check the list of secure memory blocks and not just one address range. The address range check is needed so that we can figure out whether the freed address is in the secmem range and needs to zeroed out. This requires a new Libgcrypt version, though no ABI change.
  • We have a ./configure option --enable-large-secmem which sets 64k instead of 32k aside for the secmem. This is currently only used in gpg to enable gpg's --enable-large-rsa option. Given that in 2.1 we use the gpg-agent for the secret key operations we should have the same options in gpg-agent. However, it is only a kludge, but one we once agreed upon to silence some pretty vocal experts on key size.
Dec 5 2016, 7:11 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
werner added a project to T2857: gpg-agent crashes regularly, out of core in secure memory allocations: gnupg (gpg22).
Dec 5 2016, 7:11 PM · gnupg (gpg22), Bug Report, gnupg, gpgagent
justus added a comment to T2701: Do not let users create keys without an expiration date.

Thanks!

Dec 5 2016, 1:44 PM · Feature Request, gnupg (gpg22)
werner added a comment to T2701: Do not let users create keys without an expiration date.

--quick-set-expire now available.

Dec 5 2016, 12:22 PM · Feature Request, gnupg (gpg22)
werner added a comment to T2701: Do not let users create keys without an expiration date.

I'll take the --quick-set-expire command. -wk

Dec 5 2016, 9:26 AM · Feature Request, gnupg (gpg22)
werner added a comment to T2400: GnuPG 2.1 regression in unattended key generation.

The only viable solution will be to export the key secret key after key
generation, append that to the %secring given file and delete the key from
gpg-agent's store. Recall that the agent needs to know the secret key so that
gpg is abale to create the self-signatures. Adding a dedicated cache for this
would complicate the gpg-agent code a lot.

Dec 5 2016, 9:24 AM · gnupg (gpg22), Bug Report, gnupg
werner added a comment to T2359: Query which key will be used for a given mailbox.

That is becuase we consider a mail address to be a unique indentifier and thus
and algorithm to figure out the best matching makes sense. Other kinds of user
IDS not not need to be unique and should at best return an ambigious key error.
Well, expired keys and such should be sorted out, though.

Dec 5 2016, 9:03 AM · gnupg (gpg22), gnupg, Feature Request

Nov 28 2016

justus added a comment to T2425: 2.1.14 intermittent `make check` failure on gpgtar.scm.

Let's use T2425 for the tar failure, and T2847 for the ssh failure. The
log you posted here shows exactly the same problem as in T2847.

Do you also see tar failing?

You can use

make -Ctests/openpgp check XTESTS="gpgtar.scm gpgtar.scm gpgtar.scm gpgtar.scm
gpgtar.scm"

to run the same test over and over again. That is how I measured how often we
see the failure. We updated our box since, and I haven't tried it again yet.

Nov 28 2016, 2:33 PM · MacOS, gnupg, gnupg (gpg22), Bug Report

Nov 20 2016

ilovezfs added a comment to T2425: 2.1.14 intermittent `make check` failure on gpgtar.scm.

The ssh.scm failure is still happening intermittently with 2.1.16

https://bot.brew.sh/job/Homebrew%20Versions%20Pull%20Requests/1733/version=yosemite/console

$ ssh -V
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011

Nov 20 2016, 6:53 PM · MacOS, gnupg, gnupg (gpg22), Bug Report

Nov 14 2016

werner removed a project from T2731: es_poll not supported under W32: Unreleased.
Nov 14 2016, 5:39 PM · Bug Report, gpgrt, Windows 32, gnupg (gpg22), Windows
werner added a comment to T2731: es_poll not supported under W32.

1.25 has been released.

Nov 14 2016, 5:39 PM · Bug Report, gpgrt, Windows 32, gnupg (gpg22), Windows
justus closed T2731: es_poll not supported under W32 as Resolved.
Nov 14 2016, 10:39 AM · Bug Report, gpgrt, Windows 32, gnupg (gpg22), Windows
justus added a comment to T2731: es_poll not supported under W32.

Fixed in 40e5ff0a0084c0d9521b401db4f38885bfdae233.

Nov 14 2016, 10:39 AM · Bug Report, gpgrt, Windows 32, gnupg (gpg22), Windows
justus added a project to T2731: es_poll not supported under W32: Unreleased.
Nov 14 2016, 10:39 AM · Bug Report, gpgrt, Windows 32, gnupg (gpg22), Windows

Nov 10 2016

werner added a comment to T2359: Query which key will be used for a given mailbox.

For backward compatibily reasons.

Nov 10 2016, 12:29 PM · gnupg (gpg22), gnupg, Feature Request

Nov 3 2016

justus added a comment to T2359: Query which key will be used for a given mailbox.

Fixed in ab89164be02012f1bf159c971853b8610e966301.

I also don't quite understand why we restrict this to user ids resembling mail
addresses, so I'll keep issue this open for discussion.

Nov 3 2016, 3:12 PM · gnupg (gpg22), gnupg, Feature Request

Oct 31 2016

dkg added a comment to T2359: Query which key will be used for a given mailbox.

I like this work, thanks for it! I wonder whether it would also be useful for
full-match userID, not only for a raw e-mail address?

For example, if i query for '=Peter Palfrader' or '=ssh://host.example', it
ought to give me the key with the highest-validity binding for the requested
user ID.

Oct 31 2016, 4:02 PM · gnupg (gpg22), gnupg, Feature Request

Oct 25 2016

aheinecke added a comment to T2360: Add support for TOFU in GpgME.

This is resolved. we have WITH_TOFU_INFO now.

Oct 25 2016, 2:48 PM · gnupg (gpg22), gpgme, Feature Request
aheinecke removed a project from T2360: Add support for TOFU in GpgME: In Progress.
Oct 25 2016, 2:48 PM · gnupg (gpg22), gpgme, Feature Request
aheinecke closed T2360: Add support for TOFU in GpgME as Resolved.
Oct 25 2016, 2:48 PM · gnupg (gpg22), gpgme, Feature Request

Oct 21 2016

werner added a comment to T2359: Query which key will be used for a given mailbox.

The idea is to change the algorithm in the case that a full mail address is
given - and only a mail address. For both -r and --locate-key. g10/getkey.c
has get_pubkey_byname which implements --locate-key and already checks for a
mail address (IS_MBOX). This function needs to be changed to figure out all
matching keys an return the best one. -r should make use of that function also
if it is a mailbox.

Oct 21 2016, 10:43 AM · gnupg (gpg22), gnupg, Feature Request

Oct 10 2016

justus added a comment to T2425: 2.1.14 intermittent `make check` failure on gpgtar.scm.

We now have a macOS box, and are building our software on it using Jenkins.

On that box, I also see the gpgtar test failing in about 14% of all runs. There
is something to be learned here.

Oct 10 2016, 3:18 PM · MacOS, gnupg, gnupg (gpg22), Bug Report

Oct 7 2016

justus added a comment to T2359: Query which key will be used for a given mailbox.

Please clarify the plan a bit. Shall we use the algorithm currently used by
--recipient, the one used by --locate-key, or implement a new one?

Oct 7 2016, 11:10 AM · gnupg (gpg22), gnupg, Feature Request

Oct 6 2016

dkg added a comment to T2700: Clean up the command line interface (avoid abbreviated --long-options, consistency).

another item for consistency is gpg-agent's different behavior between
--enable-ssh-socket and --extra-socket (and the undocumented --browser-socket,
for that matter, but since it's not documented maybe it's fine to just change
that one).

Oct 6 2016, 4:26 PM · gnupg, Feature Request, gnupg (gpg22)
justus added a comment to T2700: Clean up the command line interface (avoid abbreviated --long-options, consistency).

I have created two sample commits, pushed to

https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=shortlog;h=refs/heads/justus/issue2700

The second one does indeed change translated strings. If I don't update
translated strings, then the messages will still refer to the old version of the
options, which will still work but won't show up in '--help'. Is there a
problem with updating the strings when I also update the .po files?

Oct 6 2016, 11:48 AM · gnupg, Feature Request, gnupg (gpg22)

Sep 30 2016

werner added projects to T2731: es_poll not supported under W32: Windows, gnupg (gpg22), Windows 32, gpgrt, Bug Report.
Sep 30 2016, 10:32 AM · Bug Report, gpgrt, Windows 32, gnupg (gpg22), Windows
werner updated subscribers of T2731: es_poll not supported under W32.
Sep 30 2016, 10:32 AM · Bug Report, gpgrt, Windows 32, gnupg (gpg22), Windows

Sep 28 2016

werner added a comment to T2700: Clean up the command line interface (avoid abbreviated --long-options, consistency).

Please do that as soon as you have some spare time. Take care not to chnage
translated strings.

Sep 28 2016, 9:36 AM · gnupg, Feature Request, gnupg (gpg22)
werner raised the priority of T2701: Do not let users create keys without an expiration date from Wishlist to Normal.
Sep 28 2016, 9:35 AM · Feature Request, gnupg (gpg22)
werner added a comment to T2701: Do not let users create keys without an expiration date.

By renew you mean prolonging the expiration time?

To add this new default we should first add a --quick-set-expire command to make
it easier to change the expiration time. Or --quick-expire to match the name
used in --edit-key - I don't care. And of course gpgme needs a new API.

Sep 28 2016, 9:35 AM · Feature Request, gnupg (gpg22)
werner updated subscribers of T2359: Query which key will be used for a given mailbox.
Sep 28 2016, 9:29 AM · gnupg (gpg22), gnupg, Feature Request
werner added a comment to T2359: Query which key will be used for a given mailbox.

According to T1143 (aheinecke on Jun 08 2016, 07:15 PM / Roundup) the plan is that locate-key as well as -r uses a new
mechanism to figure oiut the appropriate key. aheinecke already implemented
this strategy in Kmail but we want to have it in gnupg proper.

If the given key is specified by a mail address the new scheme kicks in for
--locate-key and all keys given with -r. gpg finds all matching non-expired and
suitable keys and then computes the validity (WoT, TOFU, whatever). That is
list ordered and the top ranked key is used. Newer keys/subkeys are preferred
and thus in general there should never be an ambiguity. In case there is an
ambiguity, -r should return an error and --locate-key should return all those keys.

Sep 28 2016, 9:29 AM · gnupg (gpg22), gnupg, Feature Request
werner reassigned T2359: Query which key will be used for a given mailbox from werner to justus.
Sep 28 2016, 9:29 AM · gnupg (gpg22), gnupg, Feature Request
werner added a comment to T2359: Query which key will be used for a given mailbox.

This bug supersedes T1143 and T1232.

Sep 28 2016, 9:21 AM · gnupg (gpg22), gnupg, Feature Request

Sep 27 2016

justus closed T2693: Compile error on iMac OS X El Capitan - dns-stuff.c as Resolved.
Sep 27 2016, 6:05 PM · Bug Report, gnupg (gpg22), gnupg
justus added a comment to T2693: Compile error on iMac OS X El Capitan - dns-stuff.c.

I got my hands on a macOS box, and this particular problem is fixed in 2e64ccb0.

I still cannot compile gnupg there, but I'm working on it.

Sep 27 2016, 6:05 PM · Bug Report, gnupg (gpg22), gnupg

Sep 23 2016

justus added a comment to T2700: Clean up the command line interface (avoid abbreviated --long-options, consistency).

Also, most options join words with hyphens, but some don't.

Sep 23 2016, 2:44 PM · gnupg, Feature Request, gnupg (gpg22)
justus renamed T2700: Clean up the command line interface (avoid abbreviated --long-options, consistency) from Avoid abbreviated --long-options, e.g. --recv-keys to Clean up the command line interface (avoid abbreviated --long-options, consistency).
Sep 23 2016, 2:44 PM · gnupg, Feature Request, gnupg (gpg22)
justus added projects to T2701: Do not let users create keys without an expiration date: gnupg (gpg22), Feature Request, gnupg.
Sep 23 2016, 11:51 AM · Feature Request, gnupg (gpg22)
justus added projects to T2700: Clean up the command line interface (avoid abbreviated --long-options, consistency): gnupg (gpg22), Feature Request, gnupg.
Sep 23 2016, 11:18 AM · gnupg, Feature Request, gnupg (gpg22)

Sep 22 2016

sloughin added a comment to T2693: Compile error on iMac OS X El Capitan - dns-stuff.c.

Sep 22 2016, 3:46 PM · Bug Report, gnupg (gpg22), gnupg
sloughin added a comment to T2693: Compile error on iMac OS X El Capitan - dns-stuff.c.

Thanks - attached please find the results of the grep command on the arpa directory...

Sep 22 2016, 3:46 PM · Bug Report, gnupg (gpg22), gnupg
justus added a comment to T2693: Compile error on iMac OS X El Capitan - dns-stuff.c.

Thanks. I believe the relevant part is:

checking whether the resolver is usable... no
checking whether I can make the resolver usable with BIND_8_COMPAT... no

The latter is indeed a MacOS X specific thing.

Would you be so kind to execute the following commands on your machine, and
report the results back?

grep COMPAT /usr/include/arpa/*
grep PACKETSZ /usr/include/arpa/*

Sep 22 2016, 12:59 PM · Bug Report, gnupg (gpg22), gnupg

Sep 21 2016

werner added a comment to T2695: gpg --always-trust --quick-gen-key fails to create a trust database.

actually it was a feature request that a trustdb is not created in case of
--always-trust. But sure, it should not error out.

Sep 21 2016, 9:52 PM · Bug Report, gnupg, gnupg (gpg22)

Sep 20 2016

justus added projects to T2695: gpg --always-trust --quick-gen-key fails to create a trust database: gnupg (gpg22), gnupg, Bug Report.
Sep 20 2016, 2:58 PM · Bug Report, gnupg, gnupg (gpg22)
justus set Version to 2.1.15, master on T2695: gpg --always-trust --quick-gen-key fails to create a trust database.
Sep 20 2016, 2:58 PM · Bug Report, gnupg, gnupg (gpg22)
sloughin added a comment to T2693: Compile error on iMac OS X El Capitan - dns-stuff.c.

Sep 20 2016, 1:23 PM · Bug Report, gnupg (gpg22), gnupg
sloughin added a comment to T2693: Compile error on iMac OS X El Capitan - dns-stuff.c.

Thanks for reply - I discovered the MacPG installer, which worked, so no urgency on
this but I provide the output from ./configure in case it helps others. It's in
RichTextFormat (.rtf) -- if you require plain text just let me know.

Sep 20 2016, 1:23 PM · Bug Report, gnupg (gpg22), gnupg
justus claimed T2693: Compile error on iMac OS X El Capitan - dns-stuff.c.
Sep 20 2016, 9:24 AM · Bug Report, gnupg (gpg22), gnupg
justus added a comment to T2693: Compile error on iMac OS X El Capitan - dns-stuff.c.

Thanks for the report. Please attach the full output of configure.

Sep 20 2016, 9:24 AM · Bug Report, gnupg (gpg22), gnupg
justus added a project to T2693: Compile error on iMac OS X El Capitan - dns-stuff.c: gnupg (gpg22).
Sep 20 2016, 9:24 AM · Bug Report, gnupg (gpg22), gnupg

Sep 14 2016

justus changed Version from 2.0.22 to 1.4, 2.0.22, master on T2684: GPG encrypts using a key of a partial recipient match instead of exact match.
Sep 14 2016, 3:25 PM · gnupg (gpg14), Bug Report
justus added a project to T2684: GPG encrypts using a key of a partial recipient match instead of exact match: gnupg (gpg22).
Sep 14 2016, 3:25 PM · gnupg (gpg14), Bug Report

Sep 5 2016

aheinecke added a comment to T2405: Possible timing problem with TOFU.

Thanks for clarifying this.

I've update the comment in the test accordingly. This issue is resolved for me.

Sep 5 2016, 4:56 PM · gnupg, gnupg (gpg22), Bug Report
aheinecke removed a project from T2405: Possible timing problem with TOFU: Restricted Project.
Sep 5 2016, 4:56 PM · gnupg, gnupg (gpg22), Bug Report
aheinecke closed T2405: Possible timing problem with TOFU as Resolved.
Sep 5 2016, 4:56 PM · gnupg, gnupg (gpg22), Bug Report
aheinecke placed T2405: Possible timing problem with TOFU up for grabs.
Sep 5 2016, 4:56 PM · gnupg, gnupg (gpg22), Bug Report
werner added a comment to T2405: Possible timing problem with TOFU.

OpenPGP has a timestamp granularity of one second and thus you can't distinguish
non-RSA signature from each other if they are donewithin the same second.

Waiting a second is an old trick which is even employed somewhere inside gpg.

Sep 5 2016, 4:51 PM · gnupg, gnupg (gpg22), Bug Report
aheinecke added a comment to T2405: Possible timing problem with TOFU.

Thanks, this works now as expected.

While enabling the checks for signcount in gpgme/lang/qt/tests/t-tofuinfo.cpp
I've noticed though that if I sign and verify the same plaintext twice
immediately after another the signcount is not incremented correctly.

In line 266 of that test. The call to signAndVerify leads to an Assert if you
remove the " World" part of the "Hello World" message.

Alternatively adding a QTest::qWait(1000); before that line also results in a
success.

You can trigger this also by modifing the strings in line 233ff to contain the
same message.

Not really important imo as this is a constructed problem. The main issue here
is resolved for me.

Sep 5 2016, 1:06 PM · gnupg, gnupg (gpg22), Bug Report
aheinecke lowered the priority of T2405: Possible timing problem with TOFU from Normal to Low.
Sep 5 2016, 1:06 PM · gnupg, gnupg (gpg22), Bug Report

Sep 1 2016

neal added a project to T2405: Possible timing problem with TOFU: Restricted Project.
Sep 1 2016, 1:03 PM · gnupg, gnupg (gpg22), Bug Report
neal added a comment to T2405: Possible timing problem with TOFU.

I believe that this bug has been fixed. Both Andre's and Justus' test cases now
emit the same information for all user ids (see below).

If you agree that this issue is resolved, please change the status appropriately.

us@grit:~/neal/work/gpg/build/gpgme/tests/gpg$ rm -f $GNUPGHOME/tofu.db && ( gpg
--verify --with-colons --status-fd=1 /tmp/testmsg )2>/dev/null
[GNUPG:] NEWSIG
[GNUPG:] KEY_CONSIDERED A0FF4590BB6122EDEF6E3C542D727CC768697734 0
[GNUPG:] SIG_ID QfzOUKyR2prNsVx/GI/4A5q2AxU 2002-03-03 1015172412
[GNUPG:] KEY_CONSIDERED A0FF4590BB6122EDEF6E3C542D727CC768697734 0
[GNUPG:] GOODSIG 2D727CC768697734 Alfa Test (demo key) <alfa@example.net>
[GNUPG:] VALIDSIG A0FF4590BB6122EDEF6E3C542D727CC768697734 2002-03-03 1015172412
0 4 0 17 2 00 A0FF4590BB6122EDEF6E3C542D727CC768697734
[GNUPG:] KEY_CONSIDERED A0FF4590BB6122EDEF6E3C542D727CC768697734 0
[GNUPG:] TOFU_USER A0FF4590BB6122EDEF6E3C542D727CC768697734 alfa@example.net
[GNUPG:] TOFU_STATS 2 1 0 auto 1472727595 1472727595
[GNUPG:] TOFU_STATS_LONG Verified 1 message signed by "Alfa Test (demo key)
<alfa@example.net>"%0Ain the past 0~seconds.
[GNUPG:] TOFU_USER A0FF4590BB6122EDEF6E3C542D727CC768697734 alpha@example.net
[GNUPG:] TOFU_STATS 2 1 0 auto 1472727595 1472727595
[GNUPG:] TOFU_STATS_LONG Verified 1 message signed by "Alpha Test (demo key)
<alpha@example.net>"%0Ain the past 0~seconds.
[GNUPG:] TOFU_USER A0FF4590BB6122EDEF6E3C542D727CC768697734 alice%20(demo%20key)
[GNUPG:] TOFU_STATS 2 1 0 auto 1472727595 1472727595
[GNUPG:] TOFU_STATS_LONG Verified 1 message signed by "Alice (demo key)"%0Ain
the past 0~seconds.
[GNUPG:] TRUST_MARGINAL 0 tofu

us@grit:~/neal/work/gpg/build/gpgme/tests/gpg$ ../../../gpgme/tests/run-verify
/tmp/testmsg
Original file name: [none]
Signature 0

status ....: Success
summary ...:
fingerprint: A0FF4590BB6122EDEF6E3C542D727CC768697734
created ...: 1015172412
expires ...: 0
validity ..: marginal
val.reason : Success
pubkey algo: 17 (DSA)
digest algo: 2 (SHA1)
pka address: [none]
pka trust .: n/a
other flags:
primary fpr: A0FF4590BB6122EDEF6E3C542D727CC768697734
tofu addr .: alfa@example.net
  validity : 2 (little history)
  policy ..: 1 (auto)
  sigcount : 1
  firstseen: 1970-01-01 00:01:46
  lastseen : 1970-01-01 00:01:46
  desc ....: Verified 1 message signed by "Alfa Test (demo key)

<alfa@example.net>"

             in the past 1 minute, 46 seconds.
tofu addr .: alpha@example.net
  validity : 2 (little history)
  policy ..: 1 (auto)
  sigcount : 1
  firstseen: 1970-01-01 00:01:46
  lastseen : 1970-01-01 00:01:46
  desc ....: Verified 1 message signed by "Alpha Test (demo key)

<alpha@example.net>"

             in the past 1 minute, 46 seconds.
tofu addr .: [none]
  validity : 2 (little history)
  policy ..: 1 (auto)
  sigcount : 1
  firstseen: 1970-01-01 00:01:46
  lastseen : 1970-01-01 00:01:46
  desc ....: Verified 1 message signed by "Alice (demo key)"
             in the past 1 minute, 46 seconds.
Sep 1 2016, 1:03 PM · gnupg, gnupg (gpg22), Bug Report

Aug 31 2016

neal closed T2391: Assertion "! db->batch_update" in tofu_closedbs failed (../../g10/tofu.c:1083) as Resolved.
Aug 31 2016, 11:03 AM · gnupg (gpg22), Bug Report, gnupg
neal added a comment to T2391: Assertion "! db->batch_update" in tofu_closedbs failed (../../g10/tofu.c:1083).

Since the split format has been removed, the relevant code is gone, and I'm not
able to reproduce the issue with your test case on HEAD, I think this issue is
also gone and I'm marking it resolved. Please reopen if necessary.

Aug 31 2016, 11:03 AM · gnupg (gpg22), Bug Report, gnupg

Aug 18 2016

werner added a project to T2400: GnuPG 2.1 regression in unattended key generation: gnupg (gpg22).
Aug 18 2016, 12:51 PM · gnupg (gpg22), Bug Report, gnupg

Aug 12 2016

werner removed a project from T2359: Query which key will be used for a given mailbox: gnupg (gpg21).
Aug 12 2016, 11:16 AM · gnupg (gpg22), gnupg, Feature Request
werner added a project to T2359: Query which key will be used for a given mailbox: gnupg (gpg22).
Aug 12 2016, 11:16 AM · gnupg (gpg22), gnupg, Feature Request
werner removed a project from T2360: Add support for TOFU in GpgME: gnupg (gpg21).
Aug 12 2016, 11:14 AM · gnupg (gpg22), gpgme, Feature Request
werner added a project to T2360: Add support for TOFU in GpgME: gnupg (gpg22).
Aug 12 2016, 11:14 AM · gnupg (gpg22), gpgme, Feature Request

Aug 4 2016

justus added a comment to T2425: 2.1.14 intermittent `make check` failure on gpgtar.scm.

Can you please tell us what version of ssh you are using (ssh -V)?

Aug 4 2016, 11:58 AM · MacOS, gnupg, gnupg (gpg22), Bug Report

Jul 26 2016

ilovezfs added a comment to T2425: 2.1.14 intermittent `make check` failure on gpgtar.scm.

Hi Justus,

Thanks for your response. In further testing, I was able to trigger the "FAIL:
gpgtar.scm" during a make check for 2.1.13 (actually "FAIL: gpgtar.test" for
2.1.13 since it's pre-tiny-scheme). In particular, it's vanilla 2.1.13 + your
fix in 8f79c31b. So I think what may be going on is that 8f79c31b didn't
actually fully resolve that problem after all since I've now seen it occur, with
that commit included, in 2.1.13, and in 2.1.14, and in HEAD.

Tbere were two cases where a more specific error was emitted:

In one run, I saw this:

((/private/tmp/gnupg21-20160725-43964-l18ixl/gnupg-2.1.14/tools/gpgtar --gpg
/private/tmp/gnupg21-20160725-43964-l18ixl/gnupg-2.1.14/g10/gpg --gpg-args
--no-permission-warning --always-trust --tar-args --directory=. --decrypt
/tmp/gpgscm-PgAlmV/archive) failed: gpgtar: gpg: [don't know]: invalid packet
(ctb=2d)
gpgtar: gpg: [don't know]: invalid packet (ctb=2a)
gpgtar: error running
'/private/tmp/gnupg21-20160725-43964-l18ixl/gnupg-2.1.14/g10/gpg': exit status 2
) 
FAIL: gpgtar.scm

and in another run I saw this

Checking gpgtar with signature 
((/private/tmp/gnupg21-20160726-74591-maikty/gnupg-2.1.14/tools/gpgtar --gpg
/private/tmp/gnupg21-20160726-74591-maikty/gnupg-2.1.14/g10/gpg --gpg-args
--no-permission-warning --always-trust --tar-args --directory=. --decrypt
/tmp/gpgscm-0U4bUB/archive) failed: gpgtar: gpg: Fatal: zlib inflate problem:
invalid block type
gpgtar: error running
'/private/tmp/gnupg21-20160726-74591-maikty/gnupg-2.1.14/g10/gpg': exit status 2
) 
FAIL: gpgtar.scm

It's also worth noting that I've only been able to trigger the problem on
Jenkins during CI, not locally, so I don't know if the lack of TTY is relevant
or something like that.

I will do the ssh check you requested.

Jul 26 2016, 6:37 PM · MacOS, gnupg, gnupg (gpg22), Bug Report
justus added a comment to T2425: 2.1.14 intermittent `make check` failure on gpgtar.scm.

Thanks for letting us know. Unfortunately, we do not test on MacOS yet, but we are working
on that.

I have neither experience with debugging on MacOS, nor do I have access to such a machine.
I'm afraid you are on your own for now.

The ssh test is new, so we need to figure out why it does not work. Please do

  make -C tests/openpgp check TESTS="setup.scm ssh.scm" verbose=2

This lets us see what ssh-add prints to stderr. It might be related to the version of
OpenSSH shipped with the OS.

Jul 26 2016, 4:43 PM · MacOS, gnupg, gnupg (gpg22), Bug Report
justus claimed T2425: 2.1.14 intermittent `make check` failure on gpgtar.scm.
Jul 26 2016, 4:43 PM · MacOS, gnupg, gnupg (gpg22), Bug Report
justus added projects to T2425: 2.1.14 intermittent `make check` failure on gpgtar.scm: gnupg (gpg22), gnupg.
Jul 26 2016, 4:43 PM · MacOS, gnupg, gnupg (gpg22), Bug Report

Jul 21 2016

justus updated subscribers of T2405: Possible timing problem with TOFU.
Jul 21 2016, 6:57 PM · gnupg, gnupg (gpg22), Bug Report
justus reassigned T2405: Possible timing problem with TOFU from justus to neal.
Jul 21 2016, 6:57 PM · gnupg, gnupg (gpg22), Bug Report